LVectorDialog::DoModalVectorRotate

#include "ltwrappr.h"

virtual L_INT LVectorDialog::DlgRotate(hWndParent=NULL, pRotation=NULL, pOrigin=NULL)

Brings up the Vector Rotation dialog.

Parameters

HWND hWndParent

Handle of the window that owns the dialog.

pVECTORPOINT pRotation

Pointer to a VECTORPOINT structure that contains rotation values. The values present in pRotation when the function is called are used to initialize the dialog. If this parameter is NULL when the function is called, the values used to initialize the dialog will come from the vector handle. When this function returns, this parameter is updated with the values entered through the dialog.

const pVECTORPOINT pOrigin

Pointer to a VECTORPOINT structure that contains the origin of the rotation. (The point about which the rotation occurs.) If pOrigin is not NULL, rotation occurs around this point. If pOrigin is NULL, the center of rotation is the accumulative center of the objects to be rotated.

Returns

Value Meaning
SUCCESS The function was successful.
ERROR_DLG_CANCELED User clicked the Cancel button.

Comments

If no objects are currently selected in the source vector handle, all of the objects in the vector handle will be rotated in the dialog.

If there are selected objects inside the source vector handle, only those objects will be rotated in the dialog.

Required DLLs and Libraries

See Also

Functions

Topics

Example

L_INT LVectorDialog__DoModalVectorRotateExample(HWND hWnd) 
{ 
   L_INT          nRet; 
   L_TCHAR        szTemp[100]; 
   VECTORPOINT    rotatePoint = {90,0,0,0}; 
   VECTORPOINT    originPoint = {0,0,0,0}; 
   LVectorBase    Vector; 
   LVectorDialog  VectorDlg; 
 
   nRet = Vector.Load(MAKE_IMAGE_PATH(TEXT("random.dxf"))); 
   if(nRet != SUCCESS) 
      return nRet; 
 
   VectorDlg.SetVector(&Vector); 
 
   VectorDlg.EnablePreview(); 
 
   VectorDlg.EnableAutoProcess(); 
 
   //Set initial rotate values 
   rotatePoint.x = 90; 
   rotatePoint.y = 0; 
   rotatePoint.z = 0; 
 
   nRet = VectorDlg.DoModalVectorRotate(hWnd, &rotatePoint, &originPoint); 
   if(nRet != SUCCESS) 
      return nRet; 
 
   wsprintf(szTemp, 
            TEXT("Rotation(%d, %d, %d)"), 
            (int)rotatePoint.x, 
            (int)rotatePoint.y, 
            (int)rotatePoint.z      ); 
   MessageBox(hWnd, szTemp,TEXT(""), MB_OK); 
 
   return SUCCESS; 
} 
Help Version 21.0.2021.4.7
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2021 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS Vector C++ Class Library Help