The documentation for user32.dll's SetParent
function states that
When you change the parent of a window, you should synchronize the UISTATE of both windows. For more information, see WM_CHANGEUISTATE and WM_UPDATEUISTATE.
I've looked through those pages, and the character sequence sync doesn't appear at all. My best guess is that I'm meant to send a WM_UPDATEUISTATE
message to the new parent window, but I have no idea what parameters to use.
- If it should be a
UIS_INITIALIZE
then I take the second paragraph of the remarks to indicate that the message might be discarded, so I don't have any confidence that it will guarantee synchronisation of state between the parent and the child. - If it should be two messages, one with
UIS_CLEAR
and the other withUIS_SET
, then I can't understand why theSetParent
documentation doesn't also mentionWM_QUERYUISTATE
, so this option doesn't convince me either.
What is the correct interpretation of "synchronize the UISTATE"?