Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

using FindWindow with multiple root windows

So I'm building an app that uses win32's SendMessage as IPC.

I'm using FindWindow to get the hWnd based on className and windowName. This has all being going fine and dandy until I want to talk to a root (as in child of the desktop) Window that has the same name / class name as other root Windows.

Is there an alternative to FindWindow I can use to select the hWnd I want?

like image 488
Corin Blaikie Avatar asked Nov 03 '08 03:11

Corin Blaikie


1 Answers

Can you locate a child window of the window you want? If so, you can use FindWindowEx to walk up to the root window. If not, then you need to use EnumWindows and determine what attributes set the root window you are looking for apart from the other root windows with the same caption and class.

like image 68
cfeduke Avatar answered Oct 13 '22 16:10

cfeduke