Jump to content

GreGetStyleRatio: Difference between revisions

From EDM2
Created page with "GreGetStyleRatio stores the style ratio X-direction and Y-direction step values at the location addressed by pRatio. ; Simulation support: This function is mandatory for disp..."
 
Ak120 (talk | contribs)
mNo edit summary
 
Line 1: Line 1:
GreGetStyleRatio stores the style ratio X-direction and Y-direction step values at the location addressed by pRatio.  
GreGetStyleRatio stores the style ratio X-direction and Y-direction step values at the location addressed by pRatio.
; Simulation support: This function is mandatory for display drivers. For other drivers, it is simulated by a handling routine in the graphics engine.  
;Simulation support: This function is mandatory for display drivers. For other drivers, it is simulated by a handling routine in the graphics engine.


== Syntax ==  
== Syntax ==  
  GreGetStyleRatio(hdc, pRatio, pInstance, lFunction);
  GreGetStyleRatio(hdc, pRatio, pInstance, lFunction)
 
== Parameters ==
== Parameters ==
; hdc (HDC) - input  
;hdc (HDC) - input:The device context handle.
:The device context handle.  
;pRatio (PBYTE) - input: A pointer to a style ratio value.
 
: The style ratio is defined as a 2-byte value. The low-order byte indicates a step in the X-direction, the high-order byte a step in the Y-direction.
; pRatio (PBYTE) - input  
;pInstance (PVOID) - input: A pointer to instance data.
: A pointer to a style ratio value.  
;lFunction (ULONG) - input: High-order WORD=flags; low-order WORD=NGreGetStyleRatio.
 
: The style ratio is defined as a 2-byte value. The low-order byte indicates a step in the X-direction, the high-order byte a step in the Y-direction.  
 
; pInstance (PVOID) - input  
: A pointer to instance data.  
 
; lFunction (ULONG) - input  
: High-order WORD=flags; low-order WORD=NGreGetStyleRatio.  


== Returns ==
== Returns ==
; fSuccess (BOOL) - returns : Return codes.  
;fSuccess (BOOL) - returns : Return codes.
 
On completion, the handling routine must return BOOLEAN (fSuccess).
On completion, the handling routine must return BOOLEAN (fSuccess).  
* TRUE Successful
 
* FALSE Error
* TRUE Successful  
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:
* FALSE Error  
* PMERR_DEV_FUNC_NOT_INSTALLED
 
* PMERR_INV_HDC
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_DEV_FUNC_NOT_INSTALLED  
* PMERR_INV_HDC  
 
 
== Sample ==
<pre>
#define INCL_GRE_DEVMISC2
#include <os2.h>
 
HDC      hdc;        /*  The device context handle. */
PBYTE    pRatio;    /*  A pointer to a style ratio value. */
PVOID    pInstance;  /*  A pointer to instance data. */
ULONG    lFunction;  /*  High-order WORD=flags; low-order WORD=NGreGetStyleRatio. */
BOOL    fSuccess;  /*  Return codes. */
 
fSuccess = GreGetStyleRatio(hdc, pRatio, pInstance, lFunction);
</pre>


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

Latest revision as of 12:35, 20 January 2020

GreGetStyleRatio stores the style ratio X-direction and Y-direction step values at the location addressed by pRatio.

Simulation support
This function is mandatory for display drivers. For other drivers, it is simulated by a handling routine in the graphics engine.

Syntax

GreGetStyleRatio(hdc, pRatio, pInstance, lFunction)

Parameters

hdc (HDC) - input
The device context handle.
pRatio (PBYTE) - input
A pointer to a style ratio value.
The style ratio is defined as a 2-byte value. The low-order byte indicates a step in the X-direction, the high-order byte a step in the Y-direction.
pInstance (PVOID) - input
A pointer to instance data.
lFunction (ULONG) - input
High-order WORD=flags; low-order WORD=NGreGetStyleRatio.

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 handling routine must call WinSetErrorInfo to post the condition. Error codes for conditions that the handling routine is expected to check include:

  • PMERR_DEV_FUNC_NOT_INSTALLED
  • PMERR_INV_HDC