?? childview.~pas
字號:
unit ChildView;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, OleCtrls, EDITVIEWLib_TLB,MAPGISBASCOM1Lib_TLB,MAPGISDspCOMLib_TLB,
comobj;
type
TMDIChild = class(TForm)
EditView: TEditView;
procedure mydraw(Sender: TObject; const MpDC: IDispatch);
procedure setfocus(Sender: TObject; xPos, yPos: Double);
procedure resizeform(Sender: TObject);
procedure getPnt(Sender: TObject; xPos, yPos: Double);
private
{ Private declarations }
public
ai:Iworkarea;
aitype:integer;
{ Public declarations }
end;
var
MDIChild: TMDIChild;
implementation
{$R *.dfm}
procedure TMDIChild.mydraw(Sender: TObject; const MpDC: IDispatch);
var
mapDC:iMapGisDC;
begin
mapDC:= mpDC as imapgisdc;
mapDC.DispArea (ai,0);
mapDC := nil;
end;
procedure TMDIChild.setfocus(Sender: TObject; xPos, yPos: Double);
begin
editview.SetFocus;
end;
procedure TMDIChild.resizeform(Sender: TObject);
begin
editview.Left:=0;
editview.Top:=0;
editview.Height:=clientheight;
editview.Width:=clientwidth;
end;
procedure TMDIChild.getPnt(Sender: TObject; xPos, yPos: Double);
var
pntai:pntarea;
xy:D_Dot;
pntNum:longint;
outdis:double;
ai:workarea;
begin
pntai:=CreateComObject(class_pntarea) as Ipntarea;
xy:=CreateComObject(class_D_Dot) as ID_Dot;
xy.x:=xPos;
xy.y:=yPos;
pntNum:=pntai.Near(xy,nil,outdis);
editview.FlashAPnt(ai,pntNum);
end;
end.
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -