PRB: Hidden MDI Child Window Causes Corrupted MDI Window MenuLast reviewed: July 10, 1997Article ID: Q125435 |
1.00 1.50 | 1.00 2.00 4.00
WINDOWS | WINDOWS NTkbprg kbprb The information in this article applies to:
SYMPTOMSIf an MDI child window is hidden or disabled, the Window menu is not properly updated for the visible MDI child windows. Specifically, the Window menu will continue to show deleted MDI child windows or will fail to add new MDI child windows to the list.
CAUSEThese problems occur only after at least one MDI child window has been destroyed. When Windows destroys an MDI child window, it moves activation to a different window. This activation change causes MFC to change and refresh the MDI frame window's menu. Windows does not handle this menu refresh message correctly while in the process of destroying an MDI child window when other windows are hidden or disabled. This problem does not occur if the window being destroyed is hidden or disabled.
RESOLUTIONTo work around this problem, program your application to ensure that that an MDI child window is always hidden or disabled before it is destroyed. The destruction of MDI child windows is managed by the MDICLIENT window in the processing of the WM_MDIDESTROY message. You can customize the behavior of this message as follows:
|
KBCategory: kbprg kbprb
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |