INFO: Windows 3.x Metafiles Support DeleteObject() (68296)
The information in this article applies to:
- Microsoft Windows Software Development Kit (SDK) 3.1
This article was previously published under Q68296
3.00 3.10
WINDOWS
kbprg
SUMMARY
In versions of Microsoft Windows earlier than 3.0, a metafile that
used a large number of brushes or pens could cause the GDI data
segment to fill up, which would interfere with playing the metafile.
To address this situation, metafiles were extended to support the
DeleteObject() API in Windows 3.0.
Standard Windows programming practice dictates that a GDI object, such
as a brush or a pen, must be deleted by DeleteObject() when the object is no longer required by an application. This same practice also applies to metafiles. When an application is drawing into a metafile Display Context (DC) and the application no longer requires a GDI object, the application must select the object out of the metafile DC, then call DeleteObject(). An example of this process is provided below.
During the process of creating a metafile, when an object is deleted,
Windows inserts a DeleteObject() record into the metafile. When an
application plays the metafile, the DeleteObject() record removes
unnecessary objects, which prevents the GDI data segment from filling.
Note that if an application calls DeleteObject() for an object that is selected into a metafile DC, the DeleteObject() call will succeed. However, no DeleteObject() record will be placed into the metafile.
Modification Type: | Minor | Last Reviewed: | 2/11/2005 |
---|
Keywords: | kb16bitonly kbinfo KB68296 |
---|
|