LVectorBase::GetObjectRect
#include "ltwrappr.h"
virtual L_INT LVectorBase::GetObjectRect(pRect, dwFlags=0)
RECT L_FAR *pRect; |
/* pointer to a RECT structure */ |
L_UINT32 dwFlags; |
/* flag that indicates which object(s) to use */ |
Gets the physical bounding rectangle for the specified object(s).
Parameter |
Description |
|
pRect |
Pointer to a RECT structure to be updated with the bounding rectangle of the specified object(s). |
|
dwFlags |
Flag that indicates which rectangle to use when updating the pRect parameter. Possible values are: |
|
|
Value |
Meaning |
|
0 |
pRect will be updated with the rectangle containing all objects within the vector handle. |
|
VECTOR_FLAGS_SELECTED_ONLY |
pRect will be updated with the rectangle containing all selected objects within the vector handle. |
Returns
SUCCESS |
The function was successful. |
< 1 |
An error occurred. Refer to Return Codes. |
Comments
Obtains the physical bounding rectangle of a single object, all selected objects, or all objects within the specified vector handle.
Required DLLs and Libraries
LVKRN 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: |
LVectorBase::SelectObject, LVectorBase::IsObjectSelected, LVectorBase::GetObjectRect, LVectorBase::HitTest |
Topics: |
|
|
Example
//LVectorBasee::GetObjectRect()
//Shows the physical extent of the all objects inside drawing
void Example27(HWND hWnd)
{
RECT rect;
L_TCHAR szBuffer[100];
LVectorBase Vector;
Vector.Load(TEXT("test.dxf"));
Vector.AttachToWindow(hWnd);
GetClientRect(hWnd, &rect);
Vector.SetViewport(&rect);
// Get the rectangle of entire object
Vector.GetObjectRect(&rect);
wsprintf( szBuffer, TEXT("%d, %d, %d, %d"),
rect.left, rect.top, rect.right, rect.bottom );
MessageBox( NULL, szBuffer, TEXT("Selected Objects Physical Extent"), 0 );
}