I need obtain a list of a class of all windows in order to pickup window handle of a hidden non visible child window. Using spy++ I can find the windows and see the windows not have setup a window name/caption, only a class and appear appear like this:
HwndWrapper[APPname.exe;;10c71dcc-1a19-4fdf-82f0-57195a824939]
HwndWrapper[APPname.exe;;3ce85673-ce1f-460f-b2c6-4d3c8ea30b6b]
The question is how I can search in all windows and obtain the class programmatically? There is some way to use this string: HwndWrapper[APPname.exe;;
That string is always is the same, can be used to list all windows class and then extract what I need (the window handle)
Basically I want pickup the window handle from all windows contain on the classname HwndWrapper[APPname.exe;;1 and the window title is empty or null.
Then with that i can pickup the handle
[DllImport("user32.dll")]
private static extern IntPtr FindWindow(string lpClassName, string lpWindowName);
public IntPtr GetHandleWindow(string classname)
{
return FindWindow(classname, null);
}
windowHandle = GetHandleWindow("HwndWrapper[APPname.exe;;10c71dcc-1a19-4fdf-82f0-57195a824939]");