Article ID: 318677 - Last Review: November 21, 2006 - Revision: 2.1

PRB: Cannot Create More Child Windows and Other Problems When You Reach the Maximum Number of Allowable Child Windows in an MDI Application

This article was previously published under Q318677
Expand all | Collapse all

SYMPTOMS

When a multiple-document interface (MDI) application runs and creates many child windows, the following problems may occur:
  • You cannot create any more child windows.
  • The Start button or menu items do not respond.
  • You cannot run other applications.
  • Other applications may be adversely affected.
This problem may occur even when there is adequate physical memory available in Microsoft Windows NT, Microsoft Windows 2000, or Microsoft Windows XP. This lack of physical memory occurs when the desktop heap in the WIN32 subsystem is depleted.

STATUS

This behavior is by design.

MORE INFORMATION

You cannot determine the maximum number of child windows that can be created in an application because this depends on several factors:
  • How a program is implemented,
  • The environment of the program, such as:
    • Physical factors, such as implemented memory
    • Variable factors, such as the number of applications that are run concurrently.

NOTE: You cannot check the usage status of the desktop heap while an application is running.

You may also notice memory shortage problems when you run an MDI application that creates many document templates by using the same menu resource. MFC is not implemented with a function that deletes added document templates. For additional information about templates that share a menu resource, click the article number below to view the article in the Microsoft Knowledge Base:
118435  (http://support.microsoft.com/kb/118435/EN-US/ ) INFO: Sharing Menus Between MDI Child Windows

REFERENCES

For additional information about the desktop heap, click the article numbers below to view the articles in the Microsoft Knowledge Base:
126962  (http://support.microsoft.com/kb/126962/EN-US/ ) Increasing the Desktop Application Heap
184802  (http://support.microsoft.com/kb/184802/EN-US/ ) PRB: User32.dll or Kernel32.dll Fails to Initialize

APPLIES TO
  • Microsoft Foundation Class Library 4.2
  • Microsoft Visual C++ 4.0 Standard Edition
  • Microsoft Visual C++ 4.1 Subscription
  • Microsoft Visual C++ 4.2 Professional Edition
  • Microsoft Visual C++ 5.0 Standard Edition
  • Microsoft Visual C++ 6.0 Service Pack 5
Keywords: 
kbprb KB318677
Retired KB ArticleRetired KB Content Disclaimer
This article was written about products for which Microsoft no longer offers support. Therefore, this article is offered "as is" and will no longer be updated.
 

Article Translations