GreInitializeAttributes

From EDM2
Jump to: navigation, search

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);