PRB: USER Resource Leak when Improperly Using CFormViewLast reviewed: July 10, 1997Article ID: Q118876 |
1.00 1.50 1.51 1.52 | 1.00 2.00 2.10 4.00
WINDOWS | WINDOWS NTkbprg kbprb The information in this article applies to:
SYMPTOMSIf a menu is specified for the dialog-box template of a CFormView, then a permanent USER resource leak occurs.
CAUSEA CFormView object uses a dialog-box template with a child style. It is not valid for a child window to have a menu. If a menu is specified for a child window, the menu will be created when the template is created but it will not be attached to the CFormView and it will therefore not be destroyed when the CFormView object is destroyed.
RESOLUTIONMake sure none of the dialog-box templates for your CFormView objects have menus specified for them. To assist in this endeavor, starting with Visual C++, 32-bit Edition, version 4.0, the Dialog Editor will disable the Menu option on the Dialog Properties dialog box if the loaded dialog template has the Child style (WS_CHILD).
MORE INFORMATIONIf you are still encountering the resource leak, there are several other articles in the Knowledge Base that discuss possible causes: ARTICLE-ID: Q71455 TITLE: Tracking Down Lost System Resources ARTICLE-ID: Q66654 TITLE: Possible Causes for System Resource Reduction ARTICLE-ID: Q72236 TITLE: Maximizing the Use of Available Memory in Windows
|
Additional reference words: 1.00 1.50 1.51 1.52 2.00 2.10 2.50 2.51 2.52
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |