Jump to content

GreInitializeAttributes: Difference between revisions

From EDM2
Created page with "This function sets the current default attributes to the initial standard default values. This function is supported by the graphics engine. == Syntax == GreInitializeA..."
 
Ak120 (talk | contribs)
mNo edit summary
 
Line 1: Line 1:
This function sets the current default attributes to the initial standard default values.  
This function sets the current default attributes to the initial standard default values.


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


== Syntax ==  
== Syntax ==  
  GreInitializeAttributes(hdc, flOptions, pInstance, lFunction);
GreInitializeAttributes(hdc, flOptions, pInstance, lFunction)


== Parameters ==
== Parameters ==
;hdc (HDC) - input  
;hdc (HDC) - input:Device context handle.
:Device context handle.  
;flOptions (ULONG) - input:Option flags.
 
:Valid flags are:
;flOptions (ULONG) - input  
::INAT_DEFAULTATTRIBUTES: When set, all the current default attributes are set to their initial standard default values.
:Option flags.  
::INAT_CURRENTATTRIBUTES: When set, all the current attributes are set to their current default values.
 
:Note that when both flags are set, INAT_DEFAULTATTRIBUTES is processed first.
:Valid flags are:  
;pInstance (PVOID) - input:Pointer to instance data.
 
;lFunction (ULONG) - input:High-order WORD=flags; low-order WORD=NGreInitializeAttributes.
:;INAT_DEFAULTATTRIBUTES  
::When set, all the current default attributes are set to their initial standard default values.  
 
:;INAT_CURRENTATTRIBUTES  
::When set, all the current attributes are set to their current default values.  
 
:Note that when both flags are set, INAT_DEFAULTATTRIBUTES is processed first.  
 
;pInstance (PVOID) - input  
:Pointer to instance data.  
 
;lFunction (ULONG) - input  
:High-order WORD=flags; low-order WORD=NGreInitializeAttributes.  


== Returns ==
== Returns ==
;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
 
:*TRUE Successful  
:*FALSE Error  


== Remarks ==
== Remarks ==
This function can also be used to reset the current attributes to the current default values. GreInitializeAttributes affects all bundle attributes that can be set with GreSetAttributes, arc parameters, and viewing limits.  
This function can also be used to reset the current attributes to the current default values. GreInitializeAttributes affects all bundle attributes that can be set with [[GreSetAttributes]], arc parameters, and viewing limits.


== Sample ==
== Sample ==
<pre>
<pre>
#define INCL_GRE_DEVSUPPORT
#define INCL_GRE_DEVSUPPORT
#include <os2.h>
#include <os2.h>
Line 53: Line 36:
BOOL    fSuccess;  /*  Return codes. */
BOOL    fSuccess;  /*  Return codes. */


fSuccess = GreInitializeAttributes(hdc, flOptions,
fSuccess = GreInitializeAttributes(hdc, flOptions, pInstance, lFunction);
            pInstance, lFunction);
</pre>
</pre>


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

Latest revision as of 22:35, 24 March 2020

This function sets the current default attributes to the initial standard default values.

This function is supported by the graphics engine.

Syntax

GreInitializeAttributes(hdc, flOptions, pInstance, lFunction)

Parameters

hdc (HDC) - input
Device context handle.
flOptions (ULONG) - input
Option flags.
Valid flags are:
INAT_DEFAULTATTRIBUTES: When set, all the current default attributes are set to their initial standard default values.
INAT_CURRENTATTRIBUTES: When set, all the current attributes are set to their current default values.
Note that when both flags are set, INAT_DEFAULTATTRIBUTES is processed first.
pInstance (PVOID) - input
Pointer to instance data.
lFunction (ULONG) - input
High-order WORD=flags; low-order WORD=NGreInitializeAttributes.

Returns

fSuccess (BOOL) - returns
Return codes.
On completion, the handling routine must return BOOLEAN (fSuccess).
  • TRUE Successful
  • FALSE Error

Remarks

This function can also be used to reset the current attributes to the current default values. GreInitializeAttributes affects all bundle attributes that can be set with GreSetAttributes, arc parameters, and viewing limits.

Sample

#define INCL_GRE_DEVSUPPORT
#include <os2.h>

HDC      hdc;        /*  Device context handle. */
ULONG    flOptions;  /*  Option flags. */
PVOID    pInstance;  /*  Pointer to instance data. */
ULONG    lFunction;  /*  High-order WORD=flags; low-order WORD=NGreInitializeAttributes. */
BOOL     fSuccess;   /*  Return codes. */

fSuccess = GreInitializeAttributes(hdc, flOptions, pInstance, lFunction);