SetGadgetStyle

Core

SetGadgetStyle changes the current style of the given Gadget. Only the styles specified by nMask are actually changed. If multiple style changes are requested, but any changes fail, the successfully change styles will not be reverted back.

BOOL SetGadgetStyle(
    HGADGET hgadChange,         // Gadget to change
    UINT nNewStyle,             // New style
    UINT nMask                  // Style bits to change
);

Parameters

hgadChange
[in] Gadget to change
nNewStyle
[in] nNewStyle can be a combination of the following flags:

Value Meaning
GS_RELATIVE The position of the Gadget is internally stored relative to parent. This is the preferred style if the Gadget will be moved more frequently, such as when scrolling.
GS_VISIBLE The Gadget is visible.
GS_ENABLED The Gadget can receive input.
GS_BUFFERED Drawing of the Gadget is double-buffered.
GS_ALLOWSUBCLASS Gadget supports being subclassed.
GS_WANTFOCUS Gadget can receive keyboard focus.
GS_BUFFERED Drawing of the Gadget is double-buffered.
GS_CLIPINSIDE Drawing of this Gadget will be clipped inside the Gadget.
GS_CLIPSIBLINGS Drawing of this Gadget will exclude any area of overlapping siblings that are higher in z-order.
GS_OPAQUE HINT: Support for composited drawing is unnecessary.
GS_NOZEROORIGIN HINT: Setting the origin to (0,0) is unnecessary.
nMask
[in] Style bits to change

Return Values

All style changes were successful.

See Also

GetGadgetStyle, GM_CHANGESTATE, Gadget Styles

 


Internal Only

Build on Friday, March 17, 2000
Copyright © 2000 by Microsoft Corporation.  All rights reserved
Send feedback to Jeff Stall