Windows.
- Delphi.
- . Delphi Button1.
- 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 .