Denis Adamchuk
2008-12-17 19:15:01 UTC
Hi everyone,
I see behavior which violates rules from the well-known article "Windows
Features"
http://msdn.microsoft.com/en-us/library/ms632599(VS.85).aspx
I have an MFC MDI application which is a bit different from a generated by
Visual Studio Wizard:
ChildFrames are not WS_CHILD but WS_POPUP. It allows to move MDI-childs out
of the MainFrame. Looks good!
Since ChildFrames are popup windows now, they are owned by the Mainframe.
On some user action I want to create a topmost window in a separate thread.
I design it to have WS_POPUP and WS_EX_TOPMOST styles and have the active
Child Frame as owner.
Then I start the application and open 2 child frames (A and B).
When the topmost window is created (say, with the child frame A as owner) -
appears the most weird Windows behavior I've ever seen:
If the topmost window is active now - a mouse click at the caption of the
child frame B brings this childframe to the bottom of Z-order, even behind
the Mainframe!
It's weird and it violates the rule from the "Windows Features":
"An owned window is always above its owner in the z-order."
Does anybody know what's wrong with TOPMOST windows in Win32?
Thanks a lot!
I see behavior which violates rules from the well-known article "Windows
Features"
http://msdn.microsoft.com/en-us/library/ms632599(VS.85).aspx
I have an MFC MDI application which is a bit different from a generated by
Visual Studio Wizard:
ChildFrames are not WS_CHILD but WS_POPUP. It allows to move MDI-childs out
of the MainFrame. Looks good!
Since ChildFrames are popup windows now, they are owned by the Mainframe.
On some user action I want to create a topmost window in a separate thread.
I design it to have WS_POPUP and WS_EX_TOPMOST styles and have the active
Child Frame as owner.
Then I start the application and open 2 child frames (A and B).
When the topmost window is created (say, with the child frame A as owner) -
appears the most weird Windows behavior I've ever seen:
If the topmost window is active now - a mouse click at the caption of the
child frame B brings this childframe to the bottom of Z-order, even behind
the Mainframe!
It's weird and it violates the rule from the "Windows Features":
"An owned window is always above its owner in the z-order."
Does anybody know what's wrong with TOPMOST windows in Win32?
Thanks a lot!