In a dialog app, there is the API function GetDlgItem that retrieves the window handle of a child given it's ID number. Is there a method to do the same with an arbitrary window (not in a dialog, it's a free TOOLWINDOW style)?
You can use GetDlgItem with regular windows too. This message was edited by Soul~Drudge, on 3/30/2001 2:57:07 PM
You can get the handle of any child window provided you assign unique ID's and you know the parent. But GetDlgItem doesn't work with WS_POPUP and WS_OVERLAPPED windows, because the ID's are stored in the same place as menu bar handles. (A bad legacy optimization.)
Nahhhhh.... it was a trick question There IS no sanity clause!!!! And top windows have an hMenu, not a child ID. (I keep forgetting this because I swap this window back and fourth from being a top to a child). --------------------------- "Marge, donít discourage the boy. Weaseling out of things is important to learn. Itís what separates us from the animals except the weasel."