Jump to content

GreUnLoadFont: Difference between revisions

From EDM2
Created page with "GreUnLoadFont unloads the private font definitions previously loaded from the resource file indicated by pszFilename. This function is supported by the graphics engine. ==..."
 
Ak120 (talk | contribs)
mNo edit summary
 
Line 1: Line 1:
GreUnLoadFont unloads the private font definitions previously loaded from the resource file indicated by pszFilename.  
GreUnLoadFont unloads the private font definitions previously loaded from the resource file indicated by pszFilename.


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


==Syntax==
==Syntax==
  GreUnLoadFont(pszFilename, pInstance, lFunction);
GreUnLoadFont(pszFilename, pInstance, lFunction)


==Parameters==
==Parameters==
;pszFilename (PSZ) - input  
;pszFilename (PSZ) - input:Pointer to a NULL-terminated string containing the file path and name of the font file.
:Pointer to a NULL-terminated string containing the file path and name of the font file.  
;pInstance (PVOID) - input:Pointer to instance data.
 
;lFunction (ULONG) - input:High-order WORD=flags; low-order WORD=NGreUnLoadFont.
;pInstance (PVOID) - input  
:Pointer to instance data.  
 
;lFunction (ULONG) - input  
:High-order WORD=flags; low-order WORD=NGreUnLoadFont.  


==Return Code==
==Return Code==
;fSuccess (BOOL) - returns  
;fSuccess (BOOL) - returns:Return codes.
:Return codes.  
:On completion, the handling routine must return BOOLEAN (fSuccess).
 
:*TRUE Successful
:On completion, the handling routine must return BOOLEAN (fSuccess).  
:*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:
:*TRUE Successful  
:*PMERR_BASE_ERROR
:*FALSE Error  
:*PMERR_FONT_FILE_NOT_LOADED
 
: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_BASE_ERROR  
:*PMERR_FONT_FILE_NOT_LOADED  
 
:Refer to the "Error Explanations" section of the Presentation Manager Programming Reference for further explanation.  


==Remarks==
==Remarks==
Before unloading any fonts, the caller must ensure that:  
Before unloading any fonts, the caller must ensure that:
 
*The fonts are not in use for the current character set.
*The fonts are not in use for the current character set.  
*The relevant lcids have been deleted (see [[GreDeleteSetId]]).
*The relevant lcids have been deleted (see GreDeleteSetId).  
 
 
==Sample Code==
<PRE>
#define INCL_GRE_FONTS
#include <os2.h>
 
PSZ      pszFilename;
PVOID    pInstance;    /*  Pointer to instance data. */
ULONG    lFunction;    /*  High-order WORD=flags; low-order WORD=NGreUnLoadFont. */
BOOL    fSuccess;    /*  Return codes. */
 
fSuccess = GreUnLoadFont(pszFilename, pInstance, lFunction);
 
</PRE>


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

Latest revision as of 23:22, 17 January 2020

GreUnLoadFont unloads the private font definitions previously loaded from the resource file indicated by pszFilename.

This function is supported by the graphics engine.

Syntax

GreUnLoadFont(pszFilename, pInstance, lFunction)

Parameters

pszFilename (PSZ) - input
Pointer to a NULL-terminated string containing the file path and name of the font file.
pInstance (PVOID) - input
Pointer to instance data.
lFunction (ULONG) - input
High-order WORD=flags; low-order WORD=NGreUnLoadFont.

Return Code

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_BASE_ERROR
  • PMERR_FONT_FILE_NOT_LOADED
Refer to the "Error Explanations" section of the Presentation Manager Programming Reference for further explanation.

Remarks

Before unloading any fonts, the caller must ensure that:

  • The fonts are not in use for the current character set.
  • The relevant lcids have been deleted (see GreDeleteSetId).