Jump to content
  • Advertisement

Archived

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

jbattist

Screen scraping

This topic is 6068 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

How do I grab a rect of a window and get the data in the rect as a bitmap? I want to see if a certain bitmap is on the screen so I guess I''ll have to compare it bit for bit?

Share this post


Link to post
Share on other sites
Advertisement
JAJAJA!! you''re a newbie, aren''t you?
you have to make a structure or variable that store the current bitmap loaded, and then you have just to check that structure or variable to know which bitmap is the currently showed.

Share this post


Link to post
Share on other sites
Yeah, I guess I''m a newbie at Windows GDI bitmap grabbing.

I''ve got a DC to the window I want to grab rects from, do I just use BitBlt to copy that rect to a new in memory bitmap? From the memory DC, how do you read the bitmap data bit for bit?

Share this post


Link to post
Share on other sites
I''m not sure what you mean. You want to check to see if a window is within the boundaries of the screen? You dont need to store a bitmap to find that out.

As for your question. If you want to blit your WHOLE window into a bitmap, i think someone else has to help. Blitting (using the windows DC) will only blit the contents of the window, not the borders and menu-bar and all that. If you have a borderless window, you''re fine.

Checking bit by bit to see if the bitmap is off the screen sounds slightly over-complicated. Just compare the boundaries to the main screen and see if its outside. Maybe you should explain a bit better

defster

Share this post


Link to post
Share on other sites
I''m writing a Minesweeper solver. So I want to grab the minesweeper window DC, grab the playing area to a butmap and start sending keystrokes down to solve the puzzle.

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!