L_DispContainerGetBounds
#include "ltivw.h"
L_INT EXT_FUNCTION L_DispContainerGetBounds(hCon, lpRect, uFlags)
HDISPCONTAINER hCon; |
/* handle to the container */ |
RECT L_FAR * lpRect; |
/* pointer to a structure */ |
L_UINT uFlags; |
/* reserved for future use */ |
Gets the bounding rectangle for the container. This function is available only in the Medical Imaging Suite toolkits.
Parameter |
Description |
hCon |
Handle to the container. |
lpRect |
A pointer to a RECT structure to be updated with the bounding rectangle of the container. |
uFlags |
Reserved for future use. Must be zero. |
Returns
SUCCESS |
The function was successful. |
< 1 |
An error occurred. Refer to Return Codes. |
Comments
The coordinates of lpRect are relative to the parent window coordinates. If the container window has no parent, the coordinates will be relative to the screen coordinates.
To set the bounding rectangle for the container, call L_DispContainerSetBounds.
Required DLLs and Libraries
LTIVW For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application. |
See Also
Functions: |
L_DispContainerCreate, L_DispContainerSetBounds, L_DispContainerSetProperties, L_DispContainerGetProperties, L_DispContainerGetWindowHandle, L_DispContainerDestroy |
Topics: |
|
|
Example
// This function determines whether the container's client area is different than its parent's.
L_VOID FitContainerToParent(HDISPCONTAINER hCon)
{
RECT rcRect;
RECT rcParentRect;
HWND hWndParent;
// Get the container window's parent
hWndParent = GetParent(L_DispContainerGetWindowHandle (hCon, 0));
// if the container has no parent then abort.
if (hWndParent == NULL)
return;
// Get the container's bonding rectangle.
L_DispContainerGetBounds(hCon, &rcRect, 0);
GetClientRect(hWndParent, &rcParentRect);
// check if the container's client area is different than the parent's client area.
if ((RECTWIDTH(&rcRect) != RECTWIDTH(&rcParentRect)) || (RECTHEIGHT(&rcRect) != RECTHEIGHT(&rcParentRect)))
L_DispContainerSetBounds(hCon, &rcParentRect, 0);
}