Jump to content

GreQuerySetIds: Difference between revisions

From EDM2
Created page with "GreQueryNumberSetIds returns the total number of lcids, such as logical fonts and bit-map IDs, that have been created. This function is supported by the graphics engine. =..."
 
Ak120 (talk | contribs)
mNo edit summary
 
Line 1: Line 1:
GreQueryNumberSetIds returns the total number of lcids, such as logical fonts and bit-map IDs, that have been created.  
GreQueryNumberSetIds returns the total number of lcids, such as logical fonts and bit-map IDs, that have been created.


This function is supported by the graphics engine.  
This function is supported by the graphics engine.


== Syntax ==  
== Syntax ==  
  GreQueryNumberSetIds(hdc, lRange, pInstance, lFunction);
  GreQueryNumberSetIds(hdc, lRange, pInstance, lFunction)


== Parameters ==
== Parameters ==
; hdc (HDC) - input : Device context handle.  
;hdc (HDC) - input : Device context handle.
 
;lRange (ULONG) - input : Indicates whether GPI, or AVIO lcids, or both are to be returned.  
; lRange (ULONG) - input : Indicates whether GPI, or AVIO lcids, or both are to be returned.  
:Valid ranges are:
: Valid ranges are:  
:LCID_RANGE_GPI GPI
:LCID_RANGE_GPI GPI  
:LCID_RANGE_AVIO AVIO
:LCID_RANGE_AVIO AVIO  
:LCID_RANGE_BOTH GPI and AVIO
:LCID_RANGE_BOTH GPI and AVIO  
;pInstance (PVOID) - input : Pointer to instance data.
 
;lFunction (ULONG) - input : High-order WORD=flags; low-order WORD=NGreQueryNumberSetIds.
; pInstance (PVOID) - input : Pointer to instance data.  
 
; lFunction (ULONG) - input : High-order WORD=flags; low-order WORD=NGreQueryNumberSetIds.  


== Returns ==
== Returns ==
; fSuccess (LONG) - returns : Return codes.  
;fSuccess (LONG) - returns : Return codes.
This function returns the number of lcids, or it returns GPI_ALTERROR if an error occurs.
This function returns the number of lcids, or it returns GPI_ALTERROR if an error occurs.
 
Possible Errors Detected:  When an error is detected, the graphics engine calls WinSetErrorInfo to post the condition. Reasons for failure of this function include:
 
*PMERR_HDC_BUSY
*PMERR_INV_HDC
*PMERR_INV_SETID
*PMERR_INV_SETID_TYPE
 
Refer to the "Error Explanations" section of the Presentation Manager Programming Reference for further explanation.  


Possible Errors Detected: When an error is detected, the graphics engine calls WinSetErrorInfo to post the condition. Reasons for failure of this function include:
*PMERR_HDC_BUSY
*PMERR_INV_HDC
*PMERR_INV_SETID
*PMERR_INV_SETID_TYPE
Refer to the "Error Explanations" section of the ''Presentation Manager Programming Reference'' for further explanation.


== Sample ==
== Sample ==
Line 44: Line 38:
LONG    fSuccess;  /*  Return codes. */
LONG    fSuccess;  /*  Return codes. */


fSuccess = GreQueryNumberSetIds(hdc, lRange,
fSuccess = GreQueryNumberSetIds(hdc, lRange, pInstance, lFunction);
            pInstance, lFunction);
</pre>
</pre>


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

Latest revision as of 01:09, 25 March 2020

GreQueryNumberSetIds returns the total number of lcids, such as logical fonts and bit-map IDs, that have been created.

This function is supported by the graphics engine.

Syntax

GreQueryNumberSetIds(hdc, lRange, pInstance, lFunction)

Parameters

hdc (HDC) - input
Device context handle.
lRange (ULONG) - input
Indicates whether GPI, or AVIO lcids, or both are to be returned.
Valid ranges are:
LCID_RANGE_GPI GPI
LCID_RANGE_AVIO AVIO
LCID_RANGE_BOTH GPI and AVIO
pInstance (PVOID) - input
Pointer to instance data.
lFunction (ULONG) - input
High-order WORD=flags; low-order WORD=NGreQueryNumberSetIds.

Returns

fSuccess (LONG) - returns
Return codes.

This function returns the number of lcids, or it returns GPI_ALTERROR if an error occurs.

Possible Errors Detected: When an error is detected, the graphics engine calls WinSetErrorInfo to post the condition. Reasons for failure of this function include:

  • PMERR_HDC_BUSY
  • PMERR_INV_HDC
  • PMERR_INV_SETID
  • PMERR_INV_SETID_TYPE

Refer to the "Error Explanations" section of the Presentation Manager Programming Reference for further explanation.

Sample

#define INCL_GRE_SETID
#include <os2.h>

HDC      hdc;        /*  Device context handle. */
ULONG    lRange;     /*  Indicates whether GPI, or AVIO lcids, or both are to be returned. */
PVOID    pInstance;  /*  Pointer to instance data. */
ULONG    lFunction;  /*  High-order WORD=flags; low-order WORD=NGreQueryNumberSetIds. */
LONG     fSuccess;   /*  Return codes. */

fSuccess = GreQueryNumberSetIds(hdc, lRange, pInstance, lFunction);