Click here to Skip to main content
14,636,564 members
Rate this:
Please Sign up or sign in to vote.
See more:
I have used Findwindow & findwindowEX to get dialog box handle. But it's always returning 0 value.

I saw in Spy++ that this dialog box is not under Parent window child tree where it supposed to, but it was above the parent window, means on Main Desktop Process window child tree list. Even I used only FindWindow to find dialog box, I got again 0 value in return. This dialog box has only class name, no windows name.

Also I have checked that in spy++ that this dialog box showing parent window name & it's handle.
This dialog box look like global dialog box with having parent window mentioned in spy++ properties window, but not under child tree of his own parent window. Thats why FindWindowEx also not returning handle to this dialog box.

Anybody know why both findwidnow & findwindowEX not working on such dialog box windows. Please let me know if you have solution for getting such type of tricky dialog windows handles. I used C# for my project.
Posted

1 solution

Rate this:
Please Sign up or sign in to vote.

Solution 1

You could traverse all windows until you find the one you need.

Have a look at this codeproject article:
Window Hiding with C#[^]


or maybe something like this:

http://channel9.msdn.com/forums/TechOff/258171-How-to-iterate-through-ALL-Window-handles-in-C/[^]

Good luck!
   

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100