So I created a parent window and then created a child window using CreateWindowEx. Now when I created the child window I gave it a style of WS_POPUP.
MSDN says:
WS_POPUP
0x80000000L
The windows is a pop-up window. This style cannot be used with the WS_CHILD style.
The window is a popup window, and is a child window of my other window. I guess I am confused with what the WS_CHILD style is for since I can still make my popup window a child of another window?
A window with the
WS_CHILDstyling must stay within its parent’s borders. A window with theWS_POPUPstyling does not, and furthermore returns the owner window (rather than the parent window) whenGetParent()is called.Since the primary difference is whether or not the window has to stay within the parent window’s borders, they are mutually exclusive and cannot be mixed, hence the note in the MSDN docs.