PRB: Processing the WM_QUERYOPEN Message in an MDI Application (99411)
The information in this article applies to:
- Microsoft Platform Software Development Kit (SDK) 1.0
- Microsoft Windows Software Development Kit (SDK) 3.1
This article was previously published under Q99411 SYMPTOMS
When a multiple document interface (MDI) child window processes the
WM_QUERYOPEN message to prevent the child from being restored out of a
minimized state, the system menu and restore button are not removed
from the menu bar when a maximized MDI child loses the focus or is
closed.
This problem occurs only when the maximized MDI child loses the focus
or is closed and the focus is given to an MDI child that returns 0
(zero) on the WM_QUERYOPEN message.
CAUSE
When an MDI child is maximized, the system menu and restore button are
added to the frame menu as bitmap menu items. When a maximized MDI
child is destroyed or another MDI child is given the focus, the MDI
child given the focus afterwards is maximized to replace the old MDI
child. Windows cannot maximize an MDI child when it is processing the
WM_QUERYOPEN message, and therefore the child is not maximized.
Unfortunately, the system menu and restore button bitmaps are not
removed from the menu bar.
RESOLUTION
To prevent this problem, restore the maximized MDI child before giving
the focus to another child.
Modification Type: | Minor | Last Reviewed: | 7/11/2005 |
---|
Keywords: | kbMDI kbprb kbWndw KB99411 |
---|
|