Discussion:
drawing graphics on the wallpaper directly
(too old to reply)
Pat_C
2005-03-13 07:04:30 UTC
Permalink
hi,

I want to draw graphics on the wallpaper directly using Delphi5.
not in a window but directly on the Desktop wallpaper.

Does anyone know how to code this?

Regards
Patrick
Nicolai Hansen
2005-03-14 14:18:15 UTC
Permalink
Post by Pat_C
hi,
I want to draw graphics on the wallpaper directly using Delphi5.
not in a window but directly on the Desktop wallpaper.
Does anyone know how to code this?
Regards
Patrick
I haven't tried this myself but I can maybe give you some ideas on how
to solve the problem:

You would need the window handle (hWnd) of your desktop, and from that
get its graphic device (HDC).


check out functions

function GetDesktopWindow: HWND; stdcall;

function GetWindowDC(hWnd: HWND): HDC; stdcall;

function StretchBlt(DestDC: HDC; X, Y, Width, Height: Integer; SrcDC:
HDC;
XSrc, YSrc, SrcWidth, SrcHeight: Integer; Rop: DWORD): BOOL;
stdcall;


all defined in Windows.h

but I got no idea if it works ^^
Richard Haven
2005-03-26 17:12:03 UTC
Permalink
Create a new bmp file and tell windows to use that as wallpaper.

Cheers
Post by Pat_C
I want to draw graphics on the wallpaper directly using Delphi5.
not in a window but directly on the Desktop wallpaper.
Loading...