Jump to content

GreQueryDevResource: Difference between revisions

From EDM2
Ak120 (talk | contribs)
Ak120 (talk | contribs)
mNo edit summary
 
Line 1: Line 1:
GreQueryDevResource indicates whether a specified resource is available. If the resource is loaded, its handle is returned so that it can be selected into the device context.  
GreQueryDevResource indicates whether a specified resource is available. If the resource is loaded, its handle is returned so that it can be selected into the device context.


This function must be supported by the display drivers, which must support the full range of requests. GreQueryDevResource is used internally by the graphics engine. Hardcopy drivers are required to provide a minimal level of support. At a minimum, the hardcopy driver must return 0 to indicate that a requested resource is not available. If a hardcopy driver has a raster or outline font that it requests the graphics engine to use as the default, then the presentation driver must return the address of its raster or outline font when the parameter id is equal to RT_FONT.  
This function must be supported by the display drivers, which must support the full range of requests. GreQueryDevResource is used internally by the graphics engine. Hardcopy drivers are required to provide a minimal level of support. At a minimum, the hardcopy driver must return 0 to indicate that a requested resource is not available. If a hardcopy driver has a raster or outline font that it requests the graphics engine to use as the default, then the presentation driver must return the address of its raster or outline font when the parameter id is equal to RT_FONT.


;Simulation support: None. This function is mandatory for all drivers.  
;Simulation support: None. This function is mandatory for all drivers.


==Syntax==
==Syntax==
  GreQueryDevResource(hdc, lType, id, pInstance, lFunction);
  GreQueryDevResource(hdc, lType, id, pInstance, lFunction)
 


==Parameters==
==Parameters==
;hdc (HDC) - input  
;hdc (HDC) - input:Device context handle.
:Device context handle.  
;lType (ULONG) - input:Resource type.
 
:Resource types returned by the presentation driver:
;lType (ULONG) - input  
:;RT_DISPLAYINFO:A structure containing some of the display constants required by the Window Manager. This information is required for all display devices that support windows. The format of the DISPLAYINFO structure is:
:Resource type.  
:;cb:Size of this structure (always set to 26).
 
:;cxIcon:Count of pels for x-width of icon.
:Resource types returned by the presentation driver:  
:;cyIcon:Count of pels for y-height of icon. When WinLoadPointer is used to load the icon, it is stretched or compressed to the size indicated by cxIcon and cyIcon.
 
:;cxPointer:Count of pels for x-width of pointer.
:;RT_DISPLAYINFO  
:;cyPointer:Count of pels for y-height of pointer. When WinLoadPointer is used to load the pointer, it is stretched or compressed to the size indicated by cxPointer and cyPointer.
::A structure containing some of the display constants required by the Window Manager. This information is required for all display devices that support windows. The format of the DISPLAYINFO structure is:  
:;cxBorder:Count of pels for X-width of horizontal border.
 
:;cyBorder:Count of pels for Y-height vertical border.
::;cb
:;cxHSlider:Count of pels for X-width of horizontal scroll bar slider.
:::Size of this structure (always set to 26).  
:;cyVSlider:Count of pels for Y-height of vertical scroll bar slider.
 
:;cxSizeBorder:Count of pels for X-width of default border.
::;cxIcon
:;cySizeBorder:Count of pels for Y-height of default border.
:::Count of pels for x-width of icon.  
:;cxDeviceAlign:Count of pels for horizontal device alignment.
 
:;cyDeviceAlign:Count of pels for vertical device alignment. Some display devices operate faster when operation coordinates are aligned to a BYTE, WORD or DWORD boundary.
::;cyIcon
:::The cxDeviceAlign and cyDeviceAlign parameters allow the presentation driver to align windows on these boundaries and so optimize window management operations.
:::Count of pels for y-height of icon. When WinLoadPointer is used to load the icon, it is stretched or compressed to the size indicated by cxIcon and cyIcon.  
:;RT_POINTER:Defined system pointers are:
 
::;SPTR_ARROW:Left-pointing arrow, usually the system default.
::;cxPointer
::;SPTR_TEXT:Text-insertion pointer, typically used when the mouse pointer is on an edit control.
:::Count of pels for x-width of pointer.  
::;SPTR_WAIT:An hourglass used to tell the user to wait while the system is busy.
 
::;SPTR_MOVE:Four arrows together, pointing north, south, east and west, that tell the user that window can be dragged in any of these directions.
::;cyPointer
::;SPTR_SIZENWSE:An arrow pointing northwest and southeast, that tells the user that the window can be sized in these directions.
:::Count of pels for y-height of pointer. When WinLoadPointer is used to load the pointer, it is stretched or compressed to the size indicated by cxPointer and cyPointer.  
::;SPTR_SIZENESW:An arrow pointing northeast and southwest, that tells the user that the window can be sized in these directions.
 
::;SPTR_SIZEWE:An arrow pointing east and west, that tells the user that the window can be sized in these directions.
::;cxBorder
::;SPTR_SIZENS:An arrow pointing north and south, that tells the user that the window can be sized in these directions.
:::Count of pels for X-width of horizontal border.  
::;SPTR_APPICON:Usually a blank icon. This is used when a window that has been sized down to its minimum (and has no normal icon) is dragged across the screen.
 
::;SPTR_ICONINFORMATION:Pointer used as part of a message box when specified in a call to WinMessageBox.
::;cyBorder
::;SPTR_ICONQUESTION:Pointer used as part of a message box when specified in a call to WinMessageBox.
:::Count of pels for Y-height vertical border.  
::;SPTR_ICONERROR:Pointer used as part of a message box when specified in a call to WinMessageBox.
 
::;SPTR_ICONWARNING:Pointer used as part of a message box when specified in a call to WinMessageBox.
::;cxHSlider
::;SPTR_ILLEGAL:Pointer used by the filing system to notify the user of an illegal mouse-directed copy or move operation.
:::Count of pels for X-width of horizontal scroll bar slider.  
::;SPTR_MULTFILE:Pointer used by the file system to indicate a multiple file copy or move operation.
 
::;SPTR_PROGRAM:Pointer used by the file system to indicate a copy or move operation on an executable program file.
::;cyVSlider
::;SPTR_FILE:Pointer used by the file system to indicate a copy or move operation on an ordinary file.
:::Count of pels for Y-height of vertical scroll bar slider.  
::;SPTR_FOLDER:Pointer used by the file system to indicate a copy or move operation on an entire directory.
 
:;RT_BITMAP:The following defined system bit maps are required in display drivers:
::;cxSizeBorder
::;SBMP_BTNCORNERS:Contains the rounded corners for push buttons. It is arranged as three bit maps divided into 2x2 bit-map arrays describing the corners of each bit map. The three bit maps are defined as follows:
:::Count of pels for X-width of default border.  
:::*Contains the corners of an unselected push button that is not a default push button.
 
:::*Holds the corners of a default push button that is currently not selected.
::;cySizeBorder
:::*Contains the corners of a currently selected push button, which can be either a default or nondefault push button.
:::Count of pels for Y-height of default border.  
::;SBMP_DRIVE
 
:::Used by the file system to display the logical disk drive.
::;cxDeviceAlign
::;SBMP_FILE
:::Count of pels for horizontal device alignment.  
:::Used by the file system to indicate an unknown file type.
 
::;SBMP_FOLDER
::;cyDeviceAlign  
:::Used by the file system to display a directory.
:::Count of pels for vertical device alignment. Some display devices operate faster when operation coordinates are aligned to a BYTE, WORD or DWORD boundary.  
::;SBMP_MENUATTACHED
 
:::Drawn on the right edge of a menu item to indicate that a pull down menu is attached to that item.
:::The cxDeviceAlign and cyDeviceAlign parameters allow the presentation driver to align windows on these boundaries and so optimize window management operations.  
::;SBMP_MENUCHECK
 
:::Displayed next to a menu item when the item is checked. Menu items are displayed in the system font and the menu checks are vertically aligned next to them. The height of this bit map must be no greater than the system font height to ensure that consecutive menu-check bit maps do not overlap. Its width is arbitrary, but is normally the same as the system font width.
:;RT_POINTER
::;SBMP_PROGRAM
::Defined system pointers are:  
:::Used by the file system to mark EXE and COM files.
 
::;SBMP_SIZEBOX
::;SPTR_ARROW
:::Used by some applications to display a "sizebox" in the bottom-right corner of a frame window.
:::Left-pointing arrow, usually the system default.  
::;SBMP_TREEMINUS
 
:::Used by the file system to indicate there are no more subdirectories to view.
::;SPTR_TEXT
::;SBMP_TREEPLUS
:::Text-insertion pointer, typically used when the mouse pointer is on an edit control.  
:::Used by the file system to indicate there are more subdirectories to view.
 
::The following defined system bit maps are also required to ensure compatibility with OS/2 Version 1.x applications:
::;SPTR_WAIT
::*SBMP_OLD_CHILDSYSMENU
:::An hourglass used to tell the user to wait while the system is busy.  
::*SBMP_OLD_CHECKBOXES
 
::*SBMP_OLD_MAXBUTTON
::;SPTR_MOVE
::*SBMP_OLD_MINBUTTON
:::Four arrows together, pointing north, south, east and west, that tell the user that window can be dragged in any of these directions.  
::*SBMP_OLD_RESTOREBUTTON
 
::*SBMP_OLD_SBDNARROW
::;SPTR_SIZENWSE
::*SBMP_OLD_SBLFARROW
:::An arrow pointing northwest and southeast, that tells the user that the window can be sized in these directions.  
::*SBMP_OLD_SBRGARROW
 
::*SBMP_OLD_SBUPARROW
::;SPTR_SIZENESW
::*SBMP_OLD_SYSMENU.
:::An arrow pointing northeast and southwest, that tells the user that the window can be sized in these directions.  
::The following defined system bit maps are provided by PMWIN.DLL and are optional in display drivers:
 
::*SBMP_CHECKBOXES
::;SPTR_SIZEWE
::*SBMP_CHILDSYSMENU
:::An arrow pointing east and west, that tells the user that the window can be sized in these directions.  
::*SBMP_CHILDSYSMENUDEP
 
::*SBMP_CLOSEBUTTON
::;SPTR_SIZENS
::*SBMP_CLOSEBUTTONDEP
:::An arrow pointing north and south, that tells the user that the window can be sized in these directions.  
::*SBMP_COMBODOWN
 
::*SBMP_MAXBUTTON
::;SPTR_APPICON
::*SBMP_MAXBUTTONDEP
:::Usually a blank icon. This is used when a window that has been sized down to its minimum (and has no normal icon) is dragged across the screen.  
::*SBMP_MINBUTTON
 
::*SBMP_MINBUTTONDEP
::;SPTR_ICONINFORMATION
::*SBMP_RESTOREBUTTON
:::Pointer used as part of a message box when specified in a call to WinMessageBox.  
::*SBMP_RESTOREBUTTONDEP
 
::*SBMP_SBDNARROW
::;SPTR_ICONQUESTION
::*SBMP_SBDNARROWDEP
:::Pointer used as part of a message box when specified in a call to WinMessageBox.  
::*SBMP_SBDNARROWDIS
 
::*SBMP_SBLFARROW
::;SPTR_ICONERROR
::*SBMP_SBLFARROWDEP
:::Pointer used as part of a message box when specified in a call to WinMessageBox.  
::*SBMP_SBLFARROWDIS
 
::*SBMP_SBRGARROWDEP
::;SPTR_ICONWARNING
::*SBMP_SBRGARROWDIS
:::Pointer used as part of a message box when specified in a call to WinMessageBox.  
::*SBMP_SBRGARRROW
 
::*SBMP_SBUPARROW
::;SPTR_ILLEGAL
::*SBMP_SBUPARROWDEP
:::Pointer used by the filing system to notify the user of an illegal mouse-directed copy or move operation.  
::*SBMP_SBUPARROWDIS
 
::*SBMP_SYSMENU
::;SPTR_MULTFILE
::*SBMP_SYSMENUDEP
:::Pointer used by the file system to indicate a multiple file copy or move operation.  
::Refer to the function "WinGetSysBitmap" in Presentation Manager Programming Reference for further explanation.
 
:;RT_FONT:The default system fonts are:
::;SPTR_PROGRAM
::;SFONT_RASTER:Default image font.  
:::Pointer used by the file system to indicate a copy or move operation on an executable program file.  
::;SFONT_OUTLINE:Default outline font.
 
;id (ULONG) - input:Defined resource value.
::;SPTR_FILE
;pInstance (PVOID) - input:Pointer to instance data.
:::Pointer used by the file system to indicate a copy or move operation on an ordinary file.  
;lFunction (ULONG) - input:High-order WORD=flags; low-order WORD=NGreQueryDevResource.
 
::;SPTR_FOLDER
:::Pointer used by the file system to indicate a copy or move operation on an entire directory.  
 
:;RT_BITMAP
:::The following defined system bit maps are required in display drivers:  
 
::;SBMP_BTNCORNERS
:::Contains the rounded corners for push buttons. It is arranged as three bit maps divided into 2x2 bit-map arrays describing the corners of each bit map. The three bit maps are defined as follows:  
:::*Contains the corners of an unselected push button that is not a default push button.  
:::*Holds the corners of a default push button that is currently not selected.  
:::*Contains the corners of a currently selected push button, which can be either a default or nondefault push button.  
 
::;SBMP_DRIVE
:::Used by the file system to display the logical disk drive.  
 
::;SBMP_FILE
:::Used by the file system to indicate an unknown file type.  
 
::;SBMP_FOLDER
:::Used by the file system to display a directory.  
 
::;SBMP_MENUATTACHED
:::Drawn on the right edge of a menu item to indicate that a pull down menu is attached to that item.  
 
::;SBMP_MENUCHECK
:::Displayed next to a menu item when the item is checked. Menu items are displayed in the system font and the menu checks are vertically aligned next to them. The height of this bit map must be no greater than the system font height to ensure that consecutive menu-check bit maps do not overlap. Its width is arbitrary, but is normally the same as the system font width.  
 
::;SBMP_PROGRAM
:::Used by the file system to mark EXE and COM files.  
 
::;SBMP_SIZEBOX
:::Used by some applications to display a "sizebox" in the bottom-right corner of a frame window.  
 
::;SBMP_TREEMINUS
:::Used by the file system to indicate there are no more subdirectories to view.  
 
::;SBMP_TREEPLUS  
:::Used by the file system to indicate there are more subdirectories to view.  
 
::The following defined system bit maps are also required to ensure compatibility with OS/2 Version 1.x applications:  
 
::*SBMP_OLD_CHILDSYSMENU  
::*SBMP_OLD_CHECKBOXES  
::*SBMP_OLD_MAXBUTTON  
::*SBMP_OLD_MINBUTTON  
::*SBMP_OLD_RESTOREBUTTON  
::*SBMP_OLD_SBDNARROW  
::*SBMP_OLD_SBLFARROW  
::*SBMP_OLD_SBRGARROW  
::*SBMP_OLD_SBUPARROW  
::*SBMP_OLD_SYSMENU.  
 
::The following defined system bit maps are provided by PMWIN.DLL and are optional in display drivers:  
::*SBMP_CHECKBOXES  
::*SBMP_CHILDSYSMENU  
::*SBMP_CHILDSYSMENUDEP  
::*SBMP_CLOSEBUTTON  
::*SBMP_CLOSEBUTTONDEP  
::*SBMP_COMBODOWN  
::*SBMP_MAXBUTTON  
::*SBMP_MAXBUTTONDEP  
::*SBMP_MINBUTTON  
::*SBMP_MINBUTTONDEP  
::*SBMP_RESTOREBUTTON  
::*SBMP_RESTOREBUTTONDEP  
::*SBMP_SBDNARROW  
::*SBMP_SBDNARROWDEP  
::*SBMP_SBDNARROWDIS  
::*SBMP_SBLFARROW  
::*SBMP_SBLFARROWDEP  
::*SBMP_SBLFARROWDIS  
::*SBMP_SBRGARROWDEP  
::*SBMP_SBRGARROWDIS  
::*SBMP_SBRGARRROW  
::*SBMP_SBUPARROW  
::*SBMP_SBUPARROWDEP  
::*SBMP_SBUPARROWDIS  
::*SBMP_SYSMENU  
::*SBMP_SYSMENUDEP  
 
::Refer to the function "WinGetSysBitmap" in Presentation Manager Programming Reference for further explanation.  
 
:;RT_FONT  
::The default system fonts are:  
 
::;SFONT_RASTER  
:::Default image font.  
::;SFONT_OUTLINE  
:::Default outline font.  
 
;id (ULONG) - input  
:Defined resource value.  
 
;pInstance (PVOID) - input  
:Pointer to instance data.  
 
;lFunction (ULONG) - input  
:High-order WORD=flags; low-order WORD=NGreQueryDevResource.  


==Return Code==
==Return Code==
;rc (LONG) - returns  
;rc (LONG) - returns:Return Code.
:Return Code.  
:This function returns the address of the indicated resource-0 if no address is available, or GPI_ALTERROR if an error occurs.
 
:Possible Errors Detected: When an error is detected, the handling routine must call WinSetErrorInfo to post the condition. Error codes for conditions that the handling routine is expected to check include:
:This function returns the address of the indicated resource-0 if no address is available, or GPI_ALTERROR if an error occurs.  
:*PMERR_BASE_ERROR
 
:*PMERR_DEV_FUNC_NOT_INSTALLED
:Possible Errors Detected: When an error is detected, the handling routine must call WinSetErrorInfo to post the condition. Error codes for conditions that the handling routine is expected to check include:  
:Refer to the "Error Explanations" section of the Presentation Manager Programming Reference for further explanation.
 
:*PMERR_BASE_ERROR  
:*PMERR_DEV_FUNC_NOT_INSTALLED  
 
:Refer to the "Error Explanations" section of the Presentation Manager Programming Reference for further explanation.  


==Remarks==
==Remarks==
The resources (display information, pointers, bit maps, and fonts) are stored in DLL files. Some of these resources are linked by the presentation driver when it is first enabled, others are loaded by the application with WinLoadPointer.  
The resources (display information, pointers, bit maps, and fonts) are stored in DLL files. Some of these resources are linked by the presentation driver when it is first enabled, others are loaded by the application with WinLoadPointer.
 
The two system fonts are queried by the graphics engine when the presentation driver is loaded. When the presentation driver has a default font, it returns the handle of the font, as requested. When this function returns a NULL handle for the system font, the graphics engine default fonts are used instead (see Font Functions).
 
==Sample Code==
<PRE>
 
#define INCL_GRE_DEVICE
#include <os2.h>
 
HDC      hdc;        /*  Device context handle. */
ULONG    lType;      /*  Resource type. */
ULONG    id;        /*  Defined resource value. */
PVOID    pInstance;  /*  Pointer to instance data. */
ULONG    lFunction;  /*  High-order WORD=flags; low-order WORD=NGreQueryDevResource. */
LONG    rc;        /*  Return Code. */
 
rc = GreQueryDevResource(hdc, lType, id, pInstance,
      lFunction);


</PRE>
The two system fonts are queried by the graphics engine when the presentation driver is loaded. When the presentation driver has a default font, it returns the handle of the font, as requested. When this function returns a NULL handle for the system font, the graphics engine default fonts are used instead (see Font Functions).


[[Category:Gre]]
[[Category:Gre]]

Latest revision as of 20:48, 23 March 2020

GreQueryDevResource indicates whether a specified resource is available. If the resource is loaded, its handle is returned so that it can be selected into the device context.

This function must be supported by the display drivers, which must support the full range of requests. GreQueryDevResource is used internally by the graphics engine. Hardcopy drivers are required to provide a minimal level of support. At a minimum, the hardcopy driver must return 0 to indicate that a requested resource is not available. If a hardcopy driver has a raster or outline font that it requests the graphics engine to use as the default, then the presentation driver must return the address of its raster or outline font when the parameter id is equal to RT_FONT.

Simulation support
None. This function is mandatory for all drivers.

Syntax

GreQueryDevResource(hdc, lType, id, pInstance, lFunction)

Parameters

hdc (HDC) - input
Device context handle.
lType (ULONG) - input
Resource type.
Resource types returned by the presentation driver:
RT_DISPLAYINFO
A structure containing some of the display constants required by the Window Manager. This information is required for all display devices that support windows. The format of the DISPLAYINFO structure is:
cb
Size of this structure (always set to 26).
cxIcon
Count of pels for x-width of icon.
cyIcon
Count of pels for y-height of icon. When WinLoadPointer is used to load the icon, it is stretched or compressed to the size indicated by cxIcon and cyIcon.
cxPointer
Count of pels for x-width of pointer.
cyPointer
Count of pels for y-height of pointer. When WinLoadPointer is used to load the pointer, it is stretched or compressed to the size indicated by cxPointer and cyPointer.
cxBorder
Count of pels for X-width of horizontal border.
cyBorder
Count of pels for Y-height vertical border.
cxHSlider
Count of pels for X-width of horizontal scroll bar slider.
cyVSlider
Count of pels for Y-height of vertical scroll bar slider.
cxSizeBorder
Count of pels for X-width of default border.
cySizeBorder
Count of pels for Y-height of default border.
cxDeviceAlign
Count of pels for horizontal device alignment.
cyDeviceAlign
Count of pels for vertical device alignment. Some display devices operate faster when operation coordinates are aligned to a BYTE, WORD or DWORD boundary.
The cxDeviceAlign and cyDeviceAlign parameters allow the presentation driver to align windows on these boundaries and so optimize window management operations.
RT_POINTER
Defined system pointers are:
SPTR_ARROW
Left-pointing arrow, usually the system default.
SPTR_TEXT
Text-insertion pointer, typically used when the mouse pointer is on an edit control.
SPTR_WAIT
An hourglass used to tell the user to wait while the system is busy.
SPTR_MOVE
Four arrows together, pointing north, south, east and west, that tell the user that window can be dragged in any of these directions.
SPTR_SIZENWSE
An arrow pointing northwest and southeast, that tells the user that the window can be sized in these directions.
SPTR_SIZENESW
An arrow pointing northeast and southwest, that tells the user that the window can be sized in these directions.
SPTR_SIZEWE
An arrow pointing east and west, that tells the user that the window can be sized in these directions.
SPTR_SIZENS
An arrow pointing north and south, that tells the user that the window can be sized in these directions.
SPTR_APPICON
Usually a blank icon. This is used when a window that has been sized down to its minimum (and has no normal icon) is dragged across the screen.
SPTR_ICONINFORMATION
Pointer used as part of a message box when specified in a call to WinMessageBox.
SPTR_ICONQUESTION
Pointer used as part of a message box when specified in a call to WinMessageBox.
SPTR_ICONERROR
Pointer used as part of a message box when specified in a call to WinMessageBox.
SPTR_ICONWARNING
Pointer used as part of a message box when specified in a call to WinMessageBox.
SPTR_ILLEGAL
Pointer used by the filing system to notify the user of an illegal mouse-directed copy or move operation.
SPTR_MULTFILE
Pointer used by the file system to indicate a multiple file copy or move operation.
SPTR_PROGRAM
Pointer used by the file system to indicate a copy or move operation on an executable program file.
SPTR_FILE
Pointer used by the file system to indicate a copy or move operation on an ordinary file.
SPTR_FOLDER
Pointer used by the file system to indicate a copy or move operation on an entire directory.
RT_BITMAP
The following defined system bit maps are required in display drivers:
SBMP_BTNCORNERS
Contains the rounded corners for push buttons. It is arranged as three bit maps divided into 2x2 bit-map arrays describing the corners of each bit map. The three bit maps are defined as follows:
  • Contains the corners of an unselected push button that is not a default push button.
  • Holds the corners of a default push button that is currently not selected.
  • Contains the corners of a currently selected push button, which can be either a default or nondefault push button.
SBMP_DRIVE
Used by the file system to display the logical disk drive.
SBMP_FILE
Used by the file system to indicate an unknown file type.
SBMP_FOLDER
Used by the file system to display a directory.
SBMP_MENUATTACHED
Drawn on the right edge of a menu item to indicate that a pull down menu is attached to that item.
SBMP_MENUCHECK
Displayed next to a menu item when the item is checked. Menu items are displayed in the system font and the menu checks are vertically aligned next to them. The height of this bit map must be no greater than the system font height to ensure that consecutive menu-check bit maps do not overlap. Its width is arbitrary, but is normally the same as the system font width.
SBMP_PROGRAM
Used by the file system to mark EXE and COM files.
SBMP_SIZEBOX
Used by some applications to display a "sizebox" in the bottom-right corner of a frame window.
SBMP_TREEMINUS
Used by the file system to indicate there are no more subdirectories to view.
SBMP_TREEPLUS
Used by the file system to indicate there are more subdirectories to view.
The following defined system bit maps are also required to ensure compatibility with OS/2 Version 1.x applications:
  • SBMP_OLD_CHILDSYSMENU
  • SBMP_OLD_CHECKBOXES
  • SBMP_OLD_MAXBUTTON
  • SBMP_OLD_MINBUTTON
  • SBMP_OLD_RESTOREBUTTON
  • SBMP_OLD_SBDNARROW
  • SBMP_OLD_SBLFARROW
  • SBMP_OLD_SBRGARROW
  • SBMP_OLD_SBUPARROW
  • SBMP_OLD_SYSMENU.
The following defined system bit maps are provided by PMWIN.DLL and are optional in display drivers:
  • SBMP_CHECKBOXES
  • SBMP_CHILDSYSMENU
  • SBMP_CHILDSYSMENUDEP
  • SBMP_CLOSEBUTTON
  • SBMP_CLOSEBUTTONDEP
  • SBMP_COMBODOWN
  • SBMP_MAXBUTTON
  • SBMP_MAXBUTTONDEP
  • SBMP_MINBUTTON
  • SBMP_MINBUTTONDEP
  • SBMP_RESTOREBUTTON
  • SBMP_RESTOREBUTTONDEP
  • SBMP_SBDNARROW
  • SBMP_SBDNARROWDEP
  • SBMP_SBDNARROWDIS
  • SBMP_SBLFARROW
  • SBMP_SBLFARROWDEP
  • SBMP_SBLFARROWDIS
  • SBMP_SBRGARROWDEP
  • SBMP_SBRGARROWDIS
  • SBMP_SBRGARRROW
  • SBMP_SBUPARROW
  • SBMP_SBUPARROWDEP
  • SBMP_SBUPARROWDIS
  • SBMP_SYSMENU
  • SBMP_SYSMENUDEP
Refer to the function "WinGetSysBitmap" in Presentation Manager Programming Reference for further explanation.
RT_FONT
The default system fonts are:
SFONT_RASTER
Default image font.
SFONT_OUTLINE
Default outline font.
id (ULONG) - input
Defined resource value.
pInstance (PVOID) - input
Pointer to instance data.
lFunction (ULONG) - input
High-order WORD=flags; low-order WORD=NGreQueryDevResource.

Return Code

rc (LONG) - returns
Return Code.
This function returns the address of the indicated resource-0 if no address is available, or GPI_ALTERROR if an error occurs.
Possible Errors Detected: When an error is detected, the handling routine must call WinSetErrorInfo to post the condition. Error codes for conditions that the handling routine is expected to check include:
  • PMERR_BASE_ERROR
  • PMERR_DEV_FUNC_NOT_INSTALLED
Refer to the "Error Explanations" section of the Presentation Manager Programming Reference for further explanation.

Remarks

The resources (display information, pointers, bit maps, and fonts) are stored in DLL files. Some of these resources are linked by the presentation driver when it is first enabled, others are loaded by the application with WinLoadPointer.

The two system fonts are queried by the graphics engine when the presentation driver is loaded. When the presentation driver has a default font, it returns the handle of the font, as requested. When this function returns a NULL handle for the system font, the graphics engine default fonts are used instead (see Font Functions).