hwnd and hdc
Posted on 2003-03-12
Sometime, we need the hdc of a windows, wich is easy to get with GetDC
sometime we need the hwnd (handle) in order to get the DC.
How do we get the hwnd ? for form or something from our project, it's easy, it's a property. How do I get the hwnd of the Main Windows of Win2k for exemple? from something I don'T know about ?
I know how to list all process currently running, I could get the hwnd from there, but is there any other mean ?
I want to use peekmessage to intercept and cancel all click from the mouse OUTSIDE my program. but peekmessage use hwnd.
I can get the DC of Windows 2k with GetDC(0) but the hwnd=0 doesn't work with peekmessage.
what do I do wrong ?