GetGadgetRect

Core

GetGadgetRect is a flexible mechanism of retreiving the Gadget's logical rectangle or actual bounding box.

BOOL GetGadgetRect(
    HGADGET hgad,               // Handle of Gadget
    RECT * prcPxl,              // Rectangle in specified pixels
    UINT nFlags                 // Rectangle to retrieve
);

Parameters

hgad
[in] Handle of Gadget
prcPxl
[out] Rectangle in specified pixels
nFlags
[in] Rectangle to retrieve

Value Meaning
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_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

GetGadgetRotation, GetGadgetScale, SetGadgetRect, SetGadgetRotation, SetGadgetScale

 


Internal Only

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