Screen scraping

Started by
4 comments, last by jbattist 22 years, 5 months ago
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?
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.
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?
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
- defster
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.
Lestat3D, Do you know how to do this or are you a newbie? :-)

This topic is closed to new replies.

Advertisement