Search results for 'TDesktopCanvas'. 1 post(s) found.

  1. 2007/09/11 TDesktopCanvas - draw on Windows Desktop
2007/09/11 08:01

TDesktopCanvas - draw on Windows Desktop


This canvas class allows you to access the Windows Desktop, and draw on it.

type
   TDesktopCanvas = class(TCanvas)
   private
     DC : hDC;
     function GetWidth:Integer;
     function GetHeight:Integer;
   public
     constructor Create;
     destructor Destroy; override;
   published
     property Width: Integer read GetWidth;
     property Height: Integer read GetHeight;
   end;

{ TDesktopCanvas object }
function TDesktopCanvas.GetWidth:Integer;
begin
   Result:=GetDeviceCaps(Handle,HORZRES) ;
end;

function TDesktopCanvas.GetHeight:Integer;
begin
   Result:=GetDeviceCaps(Handle,VERTRES) ;
end;

constructor TDesktopCanvas.Create;
begin
   inherited Create;
   DC := GetDC(0) ;
   Handle := DC;
end;

destructor TDesktopCanvas.Destroy;
begin
   Handle := 0;
   ReleaseDC(0, DC) ;
   inherited Destroy;
end;
Trackback 4 Comment 0

Trackback : Cannot send a trackbact to this post.

  1. Subject Buy vicodin online.

    Tracked from Buy cheap no prescription vicodin. 2010/01/20 00:39 delete

    Buy vicodin no prescription. Buy vicodin online. Buy vicodin without a prescription. Buy vicodin without script. Buy vicodin. Buy vicodin from mexico.

  2. Subject different money making ideas

    Tracked from moneyideas 2010/01/29 02:15 delete

    moneyideas

  3. Subject different money making ideas

    Tracked from moneyideas 2010/01/29 10:43 delete

    moneyideas

  4. Subject different money making ideas

    Tracked from moneyideas 2010/01/31 16:39 delete

    moneyideas