HINSTANCE -> HWND

Started by
1 comment, last by Serapth 12 years, 7 months ago
Hello.

Has loaded its own DLL into another process, so I have a variable: HINSTANCE.

I need to get the HWND (Window Handle).

How can I get it, knowing HINSTANCE?

Thank you and best regards.
Advertisement
There's no direct relationship between one and the other. A given HINSTANCE can use multiple HWNDs and the API has no way of knowing which one you intend. The best way is to write a getter function that returns the HWND you want.

Direct3D has need of instancing, but we do not. We have plenty of glVertexAttrib calls.

Our EnumWindows. This StackOverflow answer is probably as close as you can get to an answer. As mhagain said, there is not a 1 to 1 relationship.

http://stackoverflow.com/questions/3269390/how-to-get-hwnd-of-window-opened-by-shellexecuteex-hprocess/3269432#3269432

This topic is closed to new replies.

Advertisement