.


:




:

































 

 

 

 


c Windows API Delphi




Windows.

  1. Delphi.
  2. . Delphi Button1.
  3. Button1 , , .

:

 

procedure TForm1.Button1Click(Sender: TObject);

var

hdc: THandle;

begin

hdc:= GetDC(Form1.Handle);

LineTo(hdc,100,100);

ReleaseDC(Form1.Handle,hdc);

DeleteDC(hdc);

end;

Windows API. . , . LineTo, (x,y) . , hdc , . (Device Context). , , , , . , .

? , , , . , .

GetDC. , . Form1.Handle, Delphi, . HWND. GetDC HDC, Delphi THandle.

. , , .

, ReleaseDC, . , . DeleteDC(hdc) .

Windows API Windows, , Button1, , , . Form1.Handle Button1.Handle. Windows . , . Form1.Handle 0, Windows.

. Windows API Delphi Windows.pas. , uses, , Windows.pas. , Unit1.pas .





:


: 2016-10-30; !; : 917 |


:

:

- , - .
==> ...

1461 - | 1378 -


© 2015-2024 lektsii.org - -

: 0.01 .