Jump to content

VioCreateLogFont: Difference between revisions

From EDM2
Ak120 (talk | contribs)
Ak120 (talk | contribs)
mNo edit summary
Line 1: Line 1:
==Description==
Specifies a font for use by a VIO session.
Specifies a font for use by a VIO session.
==Syntax==
==Syntax==
<PRE>
  VioCreateLogFont(attrs, lcid, Name, hvps);
#define INCL_VIO
#include <os2.h>
 
PFATTRS    attrs;  /*  Pointer to the font attribute structure. */
ULONG      lcid;  /*  Local identifier. */
STR8      Name;  /*  Logical font name. */
HVIO      hvps;  /*  VIO presentation-space handle. */
APIRET    rc;    /* Return code. */
 
rc = VioCreateLogFont(attrs, lcid, Name, hvps);
 
</PRE>


==Parameters==
==Parameters==
; attrs (PFATTRS) - input : Pointer to the font attribute structure.  
;attrs (PFATTRS) - input : Pointer to the font attribute structure.
 
;lcid (ULONG) - input : Local identifier.
; lcid (ULONG) - input : Local identifier.
:This must be a value in the range 1 to 3. It is an error if lcid is already in use.
This must be a value in the range 1 to 3. It is an error if lcid is already in use.  
;Name (STR8) - input : Logical font name.
 
:This string is optional and is used to describe the logical font.
; Name (STR8) - input : Logical font name.
;hvps (HVIO) - input : VIO presentation-space handle.
This string is optional and is used to describe the logical font.  
:This is either 0 to indicate the default VIO session, or a value returned by VioCreatePS.
 
; hvps (HVIO) - input : VIO presentation-space handle.
This is either 0 to indicate the default VIO session, or a value returned by VioCreatePS.


==Return Code==
==Return Code==
  rc (APIRET) - returns
  rc (APIRET) - returns
VioCreateLogFont returns one of the following values:
VioCreateLogFont returns one of the following values:
* 0          NO_ERROR  
* 0          NO_ERROR  
* 421        ERROR_VIO_INVALID_PARMS  
* 421        ERROR_VIO_INVALID_PARMS  
* 436        ERROR_VIO_INVALID_HANDLE
* 436        ERROR_VIO_INVALID_HANDLE
==Remarks==
==Remarks==
The system selects the font most closely matching the specified font from the set of monospaced fonts installed in the system.
The system selects the font most closely matching the specified font from the set of monospaced fonts installed in the system.


In OS/2 2.x, hvps cannot be 0.  
In OS/2 2.x, hvps cannot be 0.  
==Example Code==
<PRE>
</PRE>
==Related Functions==


[[Category:The OS/2 API Project]]
[[Category:Vio]]

Revision as of 07:18, 10 February 2017

Specifies a font for use by a VIO session.

Syntax

VioCreateLogFont(attrs, lcid, Name, hvps);

Parameters

attrs (PFATTRS) - input
Pointer to the font attribute structure.
lcid (ULONG) - input
Local identifier.
This must be a value in the range 1 to 3. It is an error if lcid is already in use.
Name (STR8) - input
Logical font name.
This string is optional and is used to describe the logical font.
hvps (HVIO) - input
VIO presentation-space handle.
This is either 0 to indicate the default VIO session, or a value returned by VioCreatePS.

Return Code

rc (APIRET) - returns

VioCreateLogFont returns one of the following values:

  • 0 NO_ERROR
  • 421 ERROR_VIO_INVALID_PARMS
  • 436 ERROR_VIO_INVALID_HANDLE

Remarks

The system selects the font most closely matching the specified font from the set of monospaced fonts installed in the system.

In OS/2 2.x, hvps cannot be 0.