PRB: GDI Heap Fills Up While Playing a MetafileLast reviewed: July 23, 1997Article ID: Q119453 |
3.10
WINDOWS
kbprg kbprb
The information in this article applies to:
SYMPTOMSDuring the playback of a metafile or printing, the GDI heap fills up and it is not possible to create additional GDI objects.
CAUSEThis filling of the GDI heap can be caused by a metafile that does not contain any DELETEOBJECT metafile records. The GDI objects created during the metafile playback never get deleted, which fills up the GDI heap. An application that prints without using banding in Windows version 3.1 causes a metafile to be created on behalf of the application. The problem listed above then occurs. The DELETEOBJECT metafile record is a new feature developed for Windows version 3.1. This record is used to record DeleteObject() calls into the metafile, so that the specified GDI object is deleted during playback of the metafile. If you call DeleteObject() on an object that is currently selected into a metafile device context (DC), a DELETEOBJECT record will not be recorded into the metafile. The documentation for DeleteObject() states that the object must not be selected into a DC.
RESOLUTIONMake sure to deselect the object in your metafile DC before calling DeleteObject() to delete the object. For more information on calling DeleteObject() for a metafile object, please see the following article in the Microsoft Knowledge Base:
ARTICLE-ID: Q68296 TITLE : Windows 3.x Metafiles Support DeleteObject() |
Additional reference words: 3.10
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |