LVectorWindow::EnableAlwaysEndNotification

#include "ltwrappr.h"

L_BOOL LVectorWindow::EnableAlwaysEndNotification(bEnable)

Enables or disables the calling of the LVectorWindow::EndChanging member function.

Parameters

L_BOOL bEnable

Flag that indicates whether to enable or disable the calling of the LVectorWindow::EndChanging member function if the operation on the bitmap failed. Possible values are:

Value Meaning
TRUE The LVectorBase::EndChanging() member function will be called even if the operation function returned an error code.
FALSE The LVectorBase::EndChanging() member function will not be called if the operation function fails.

Returns

The previous setting.

Comments

Call this function to enable or disable the calling of the LVectorWindow::EndChanging function if the operation on the bitmap failed. The EndChanging function is normally called only if the operation was successful. Calling EnableAlwaysEndNotification with bEnable = TRUE will cause the EndChanging() member function to be called even if the operation function returned an error code.

Required DLLs and Libraries

See Also

Functions

Topics

Example

class LMyNewVectorWindow: public LVectorWindow 
{ 
private: 
   L_BOOL m_bChanged; 
 
   virtual L_INT  StartChanging(L_UINT nChangeType,L_UINT nChangeCategory); 
   virtual L_VOID EndChanging(L_UINT nChangeType,L_UINT nChangeCategory,L_INT nRetCode); 
}; 
L_INT LMyNewVectorWindow::StartChanging(L_UINT nChangeType,L_UINT nChangeCategory) 
{ 
   switch(nChangeType) 
   { 
   case NC_VECTOR_ROTATE: 
      MessageBox(NULL, TEXT("StartChanging: NC_VECTOR_ROTATE"), TEXT(""), MB_OK); 
      break; 
 
   case NC_VECTOR_TRANSLATE: 
      MessageBox(NULL, TEXT("StartChanging: NC_VECTOR_TRANSLATE"), TEXT(""), MB_OK); 
      break; 
 
   case NC_VECTOR_SCALE: 
      MessageBox(NULL, TEXT("StartChanging: NC_TRANSFORM_SCALE"), TEXT(""), MB_OK); 
      break; 
 
      /* 
      case ...: 
      do other things 
      */ 
   } 
   return(LVectorWindow::StartChanging(nChangeType,nChangeCategory)); 
} 
 
L_VOID LMyNewVectorWindow::EndChanging(L_UINT nChangeType,L_UINT nChangeCategory,L_INT nRetCode) 
{ 
   switch(nChangeType) 
   { 
   case NC_VECTOR_ROTATE: 
      MessageBox(NULL, TEXT("EndChanging: NC_VECTOR_ROTATE"), TEXT(""), MB_OK); 
      if(nRetCode==SUCCESS) 
         m_bChanged=TRUE; 
      break; 
 
   case NC_VECTOR_TRANSLATE: 
      MessageBox(NULL, TEXT("EndChanging: NC_VECTOR_TRANSLATE"), TEXT(""), MB_OK); 
      if(nRetCode==SUCCESS) 
         m_bChanged=TRUE; 
      break; 
 
   case NC_VECTOR_SCALE: 
      MessageBox(NULL, TEXT("EndChanging: NC_VECTOR_SCALE"), TEXT(""), MB_OK); 
      if(nRetCode==SUCCESS) 
         m_bChanged=TRUE; 
      break; 
 
 
      /* 
      case ...: 
      do other things 
      */ 
   } 
   LVectorWindow::EndChanging(nChangeType,nChangeCategory,nRetCode); 
} 
 
L_INT LVectorWindow__EnableAlwaysEndNotificationExample(HWND hWnd, LVectorWindow *pMyVectorWindow) 
{ 
   L_INT nRet; 
   UNREFERENCED_PARAMETER(hWnd); 
 
   if (!pMyVectorWindow->IsChangeNotificationEnabled()) 
   { 
      MessageBox(hWnd, TEXT("ChangeNotification NOT enabled.  Enabling..."), TEXT(""), MB_OK); 
      pMyVectorWindow->EnableChangeNotification(TRUE); 
   } 
 
   if (!pMyVectorWindow->IsAlwaysEndNotification()) 
   { 
      MessageBox(hWnd, TEXT("EndNotification NOT enabled.  Enabling..."), TEXT(""), MB_OK); 
      pMyVectorWindow->EnableAlwaysEndNotification(TRUE); 
   } 
 
 
   //Change rotation 
   VECTORPOINT rotatePoint; 
   nRet = pMyVectorWindow->GetRotation(&rotatePoint); 
   if(nRet != SUCCESS) 
      return nRet; 
   rotatePoint.x += 30.0F; 
   rotatePoint.y -= 20.0F; 
   rotatePoint.z += 50.0F; 
   nRet = pMyVectorWindow->SetRotation(&rotatePoint); 
   if(nRet != SUCCESS) 
      return nRet; 
 
   //Change translation 
   VECTORPOINT translatePoint; 
   nRet = pMyVectorWindow->GetTranslation(&translatePoint); 
   if(nRet != SUCCESS) 
      return nRet; 
   translatePoint.x += 0.5F; 
   nRet = pMyVectorWindow->SetTranslation(&translatePoint); 
   if(nRet != SUCCESS) 
      return nRet; 
 
   //Change scale 
   VECTORPOINT scalePoint; 
   nRet = pMyVectorWindow->GetScale(&scalePoint); 
   if(nRet != SUCCESS) 
      return nRet; 
   scalePoint.x *= 0.5F; 
   scalePoint.y *= 0.5F; 
   scalePoint.z *= 0.5F; 
   nRet = pMyVectorWindow->SetScale(&scalePoint); 
   if(nRet != SUCCESS) 
      return nRet; 
 
   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