摘 要:如何在Windows 的桌面上直接作图 关键字:GetDC HDC 类 别:API
以下例子使用Windows API函数GetDc(0)返回的dc在Windows 的桌面上直接作图:procedure TForm1.Button1Click(Sender: TObject);vardc : hdc;begindc := GetDc(0);MoveToEx(Dc, 0, 0, nil);LineTo(Dc, 300, 300);end;
(出处:DelphiFans.com)