Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

gph-gw

DC grabbing

This topic is 6246 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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.

Share this post


Link to post
Share on other sites
Advertisement
I think GetDC(NULL) with give you the HDC for the whole screen. Could be wrong though.

Share this post


Link to post
Share on other sites
Yeah, but I don''t think it gets each individual window, so if it''s overlapping I don''t know what''s under it.

Share this post


Link to post
Share on other sites
EnumWindows()
EnumChildWindows()

is what you''re looking for

menu''s don''t have a HWND though...

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
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.

Share this post


Link to post
Share on other sites
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]

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!