Windows screen scrape app using C++?

K

ken

i'm trying to figure out the complexity of writing a Windows C++ app
that will automatically read a Poker window and then be able to make
odds estimates based on that. there are applications out there, like
Texas Calculatem, which do exactly this, and i'm trying to write one myself.

figuring out the poker logic part is fine, but it's the screen scraping
of a remote windows app that i'm trying to get a handle on.

will this problem boil down to getting a bitmap capture of the desktop
area where the poker window resides? are there win32 api calls that will
make this easier? anything that will give me ascii data or will i
ultimately have to parse a bitmap for card images? if so, are there any
bitmap parsing tools to make that easier than writing my own pixel
matching routines?

i'm linux programmer, so new to win32 programming. i appreciate any
suggestions in where to look for tackling this project. also, i'm
planning to use mingw as my compiler package. will that give me the
necessary tools to write this kind of application?

thank you!
ken
 
M

Moonlit

Hi

I suggest looking on msdn (I believe http://msdn.microsoft.com)

A bitmap structure is actually quite straight forward so I think it would be
something like getting a dump from the desktop window (I am sure there is a
call or window handle for that) then the bitmap (assuming a 32 bit
resolution) just consist of a reserved byte, Red, Green and Blue byte (not
sure if I got the order correct though).

EnumWindows would get you all the top level windows. There is also a
function to get all child windows i.e. with the two you can browse the
windows hierarchy.

http://msdn.microsoft.com/library/d...ndowreference/windowfunctions/enumwindows.asp
--


Regards, Ron AF Greve

http://moonlit.xs4all.nl
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,066
Latest member
VytoKetoReviews

Latest Threads

Top