SetDlgCtrlID() fails for popup dialog
-
Hi, I have a dialog that was previously a child window of another window. This dialog implements a custom control that notifies the parent using by sending custom WM_COMMAND messages. I want to change this window to be a popup window but to remain a control of the parent dialog. The problem is that once I change the window's style to popup() the SetDlgCtrlID() function fails. GetLastError() reports:
1401: Invalid menu handle.
I have tried setting the id using ::SetWindowLong() as well, but I got the same error message. Is it not possible to make a popup act as a control of another window? I need this control to be flexible enough so that it can be embedded in another window or to float on its own. I would prefer to use the WM_COMMAND message for sending notifications instead of defining a new window message for each notification. Any help is appreciated. Thank you, Tom