Difference between revisions of "GreQueryLogicalFont"
From EDM2
(Created page with "GreQueryLogicalFont returns the 8-character name and attributes for the logical font that is defined for the specified lcid. This function is supported by the graphics engin...") |
(No difference)
|
Revision as of 03:52, 16 January 2020
GreQueryLogicalFont returns the 8-character name and attributes for the logical font that is defined for the specified lcid.
This function is supported by the graphics engine.
Contents
Syntax
GreQueryLogicalFont(hdc, lcid, pchName, pLogFont, cLogFont, pInstance, lFunction);
Parameters
- hdc (HDC) - input
- Device context handle.
- lcid (LONG) - input
- Local identifier for the logical font.
- pchName (PSTR8) - input
- Pointer to an 8-character name used to describe the logical font.
- pLogFont (PFATTRS) - input
- Pointer to a font attribute structure.
- cLogFont (ULONG) - input
- Number of bytes of font attribute information requested.
- pInstance (PVOID) - input
- Pointer to instance data.
- lFunction (ULONG) - input
- High-order WORD=flags; low-order WORD=NGreQueryLogicalFont.
Returns
- fSuccess (BOOL) - returns
- Return codes.
- On completion, the handling routine must return BOOLEAN (fSuccess).
- TRUE Successful
- FALSE Error
- 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_LENGTH_OR_COUNT
- PMERR_INV_SETID
- Refer to the "Error Explanations" section of the Presentation Manager Programming Reference for further explanation.
Sample
#define INCL_GRE_FONTS #include <os2.h> HDC hdc; /* Device context handle. */ LONG lcid; /* Local identifier for the logical font. */ PSTR8 pchName; /* Pointer to an 8-character name used to describe the logical font. */ PFATTRS pLogFont; /* Pointer to a font attribute structure. */ ULONG cLogFont; /* Number of bytes of font attribute information requested. */ PVOID pInstance; /* Pointer to instance data. */ ULONG lFunction; /* High-order WORD=flags; low-order WORD=NGreQueryLogicalFont. */ BOOL fSuccess; /* Return codes. */ fSuccess = GreQueryLogicalFont(hdc, lcid, pchName, pLogFont, cLogFont, pInstance, lFunction);
Remarks
The data is returned in the locations addressed by pchName and pLogFont. When lcid identifies a bit-map ID, an error is raised by the graphics engine.