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)?
Posted on 2001-03-30 10:35:00 by Ernie
You can use GetDlgItem with regular windows too. This message was edited by Soul~Drudge, on 3/30/2001 2:57:07 PM
Posted on 2001-03-30 13:56:00 by Soul~Drudge
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.)
Posted on 2001-03-30 14:51:00 by tank
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."
Posted on 2001-03-30 17:59:00 by Ernie