ElPolloFeo92
2008-01-15 17:07:20
I'm going to try and make a small macro in C++ (not to replace SCAR of course, but just to see if I could). I want to have something like in SCAR when you drag the crosshairs to the client window, how would you do this? Is there something in the Windows API to find a window on the screen, or is there some special graphics API?
n3ss3s
2008-01-16 06:53:15
You might find more information by searching for client focusing.
ElPolloFeo92
2008-01-18 14:44:21
Could you give me a link to something? I tried searching this forum and Google and found nothing.
R0b0t1
2008-01-18 17:43:10
Look at
http://www.cruels.net, there are some things like this.
It is very easy to convert VB code to C, and in fact:
From: Microsoft
All your VB are belong to C.
Cruel
2008-01-20 23:32:50
WindowFromPoint will get the window handle at a certain point on a screen (that point would be your cursor's position in this case):
http://msdn2.microsoft.com/en-us/library/ms633558(VS.85).aspx
R0b0t1
2008-01-21 12:58:30
Holy shit fuck crapper? Did cruel just post!?!?!?!
I didn't tell him that because I'd forgotten about the function… I've looked at your forums for some… 'inspiration' before :)
ElPolloFeo92
2008-01-22 11:24:25
Thanks, Cruel, that's exactly what I wanted. What is the different between WindowFromPoint( ) and WindowFromPhysicalPoint( )? Also, how would you get a bitmap of the window you selected?
Markus
2008-01-23 16:03:43
You can get a bitmap with GetWindowDC, then use that DC with something like BitBlt.