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.
SaveScreenBitmap
                                                     Up Next Previous
────────────────────────────────────────────────────────────────────────────
 
WORD SaveScreenBitmap(lpRect, wCommand)
LPRECT lpRect;
WORD wCommand;
 
The SaveScreenBitmap function saves a single bitmap from the display or
restores a single (previously stored) bitmap to the display. It is used, for
example, when a menu is pulled down, to store the part of the screen that is
"behind" the menu until the menu is closed.
 
Parameter  Description
────────────────────────────────────────────────────────────────────────────
 
lpRect     Points to a RECT structure containing the rectangle to use.
 
wCommand   Specifies the action to take. It can be one of the following
           values:
 
           Value  Meaning
           ─────────────────────────────────────────────────────────────────
           0      Saves the rectangle.
 
           1      Restores the rectangle.
 
           2      Discards previous save, if there was one.
 
Return Value
 
The return value is AX=1 if successful. Otherwise, AX=0 for any of the
following error conditions:
 
♦  "Shadow memory" does not exist (save, restore, ignore).
 
♦  "Shadow memory" is already in use (save).
 
♦  "Shadow memory" is not in use (restore).
 
♦  "Shadow memory" has been stolen or trashed (restore).
 
Comments
 
The export ordinal for this function is 92.
 
Because SaveScreenBitmap can save only one bitmap at a time, the device
driver must maintain a record of whether or not the save area is currently
in use.
 
The bitmap is stored in "shadow memory" (that is, memory for which the
device has control of allocation). Therefore, the device can save the bitmap
in whatever form is most convenient for it, without the rest of Windows
worrying about where it goes.
 
                                      ♦