SetGadgetRect

Core

SetGadgetRect changes the size or position of a given Gadget.

BOOL SetGadgetRect(
    HGADGET hgadChange,         // Gadget to change
    int x,                      // New horizontal position
    int y,                      // New vertical position
    int w,                      // New width
    int h,                      // New height
    UINT nFlags)                // Flags specifying what to change
);

Parameters

hgadChange
[in] Gadget to change
x
[in] New horizontal position
y
[in] New vertical position
w
[in] New width
h
[in] New height
nFlags
[in] nFlags can be a combination of the following flags:

Value Meaning
SGR_MOVE Move to Gadget to a new location specified by x, y.
SGR_SIZE Change the Gadget's size to width w and height h.
SGR_CLIENT Coordinates are relative to the Gadget itself.
SGR_PARENT Coordinates are relative to the Gadget's parent.
SGR_CONTAINER Coordinates are relative to the Gadget's root container.
SGR_DESKTOP Coordinates are relative to the Windows desktop.
SGR_OFFSET Coordinates are relative to the Gadget's current location.
SGR_ACTUAL Return the bounding rectangle of the Gadget. If this flag is specified, a bounding box is computed from all transformations applied from the root to the Gadget itself. If this flag is not specified, the rectangle returned will be in logical coordinates.


Return Values

Rectangle was successfully retreived.

See Also

AddGadgetMessageHandler,RegisterGadgetMessage, RegisterGadgetMessageString, RemoveGadgetMessageHandler, UnregisterGadgetMessage, UnregisterGadgetMessageString,  GMSG, Overview of Gadget Messaging

 


Internal Only

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