Windows 3.1 Device Drivers (ddag31qh.hlp) (Table of Contents; Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
Physical Objects
                                                     Up Next Previous
────────────────────────────────────────────────────────────────────────────
 
Physical objects are device-dependent representations of the logical pens,
brushes, and fonts that Windows applications use to perform output. GDI
directs a printer driver to create physical objects whenever an application
selects a logical object for subsequent drawing. The process of converting a
logical object into a physical object is called realizing the object, and
every printer driver provides a RealizeObject function to carry out this
task.
 
GDI calls the RealizeObject function when an application calls the
SelectObject function (GDI.45) to select a logical object for a device
context. GDI calls the function twice: once to retrieve the size of the
physical object, and a second time to realize the object. Although the
printer driver realizes an object, GDI manages it, allocating memory for the
object, passing the object to the driver to perform output, and deleting the
object when it is no longer needed.
 
GDI realizes a physical object when it is selected to avoid the overhead of
realizing the object each time it is used for drawing. The contents and
organization of the structure defining a physical object are specific to the
driver. Usually, the structure includes the logical object plus any other
information that the driver needs.
 
 
                                      ♦