DC grabbing

Started by
5 comments, last by gph-gw 22 years, 10 months ago
I know theres a function for this, how do I get the dc for every window open? I want to take the image in it (including menus)? I guessed you have to get the hwnd using some kind of enum function. I don''t have the SDK reference installed right now and I don''t want to go to the MSDN site.
Advertisement
I think GetDC(NULL) with give you the HDC for the whole screen. Could be wrong though.
Yeah, but I don''t think it gets each individual window, so if it''s overlapping I don''t know what''s under it.
EnumWindows()
EnumChildWindows()

is what you''re looking for

menu''s don''t have a HWND though...
Thanks. By menus I meant each hwnd can have no more than one menu list, right? I''m just trying to get a screenshot of all windows at once, including overlapped parts.
It think you could use "EnumWindows()" (or "GetWindow()", though is less reliable), then "GetWindowDC()" and dump the device context content somewhere...



---
[home page] [e-mail]
---[home page] [[email=karmalaa@inwind.it]e-mail[/email]]
That should work. Thanks.

This topic is closed to new replies.

Advertisement