Original Post
🔒 Locked
Manipulate windows screen
Advertisement
There are a couple of articles at Angelcode Resources that might point you on your way.
The brutal (but very unclean) way is to access the desktop DC directly. This will cause a lot of flickering though, so not preferrable.
The other way, since Windows 2000 you can do layered windows, they allow for alpha transparency. Combine that with regions and make them not appear clickable and there's your watermark.
The other way, since Windows 2000 you can do layered windows, they allow for alpha transparency. Combine that with regions and make them not appear clickable and there's your watermark.
Quote:
Original post by kekk0
Hi LessBread,
thanks for your reply. Actually what I am looking for is a way to read and write on the whole screen, including windows, taskbar, menus and everything else. The samples I found on angelcode just write on the desktop wallpaper.
Thanks for any help.
I see. The short of that is to get the HDC from the target window using it's HWND and then start drawing. Subclassing the target window helps. Look up user drawn windows. Check out the tutorials at catch22.net.
Quote:
Original post by Endurion
The brutal (but very unclean) way is to access the desktop DC directly. This will cause a lot of flickering though, so not preferrable.
The other way, since Windows 2000 you can do layered windows, they allow for alpha transparency. Combine that with regions and make them not appear clickable and there's your watermark.
I tried this once (something along the lines of GetDC(0), where '0' is the window handle of the desktop).
It's a tricky process as the framebuffer will not "clean" itself. So whatever you put on the framebuffer will stay there until you explicitly invalidate that part of the screen. So when you move a window over that part of the screen, whatever you drew there will be gone.
I have to agree with Endurion, the transparent window is a much cleaner solution in my opinion.
Topic Locked
This topic has been locked by a moderator. New replies are not allowed.
Sign in to reply to this topic.
Advertisement