Click here to Skip to main content
15,885,767 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
This is a WINAPI question. as the title says, is there a function that retrieves a handle to highest up the hierarchy? like, if i have a child, who's parent is a child, who's parented to the main window, what is the function that retrieves the handle to that main window. GetParent just retrieves the next one up, right?
Posted

1 solution

You can use GetAncestor Function with GA_ROOT flag

http://msdn.microsoft.com/en-us/library/ms633502(v=vs.85).aspx[^]
 
Share this answer
 
Comments
FatalCatharsis 26-Aug-11 11:20am    
Bingo, that's exactly what i needed, thank you!
Sergey Alexandrovich Kryukov 26-Aug-11 14:12pm    
Yep, it does the trick, a 5.
--SA

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900