LAnnotationWindow::StartChanging

#include "ltwrappr.h"

virtual L_INT LAnnotationWindow::StartChanging(nChangeType, nChangeCategory)

This function is called by every function that affects the bitmap.

Parameters

L_UINT nChangeType

The type of change to be done to the bitmap. For a list of all the change types and notifications refer to Bitmap Change Notifications and Notification Categories.

L_UINT nChangeCategory

The change category. For a list of all the change types and notifications refer to Bitmap Change Notifications and Notification Categories.

Returns

Value Meaning
SUCCESS Continue the operation without interrupting it.
< 1 An error occurred. Refer to Return Codes. This will halt the operation and stop it.

Comments

This function is called by every function that affects the bitmap. You can override this function to have control over the different operations that are done to the bitmap. This function is called before doing any changes to the bitmap. If you want to cancel the operation, you can return an error code that is less than SUCCESS. If you return SUCCESS, the operation will continue executing. For a list of all the change types and notifications refer to Bitmap Change Notifications and Notification Categories.

The high level window classes override this function so it will be notified of any changing done to the bitmap object. This allows these classes to do some special processing before starting the changing operation.

If you override this function you must do one of the following:

  1. To stop an operation, return an error code (anything other than SUCCESS). In this case the operation will stop and the parent class will not have a chance to do any default processing for the operation.

  2. Do your customer processing, and then call the parent-class implementation for this function to let the parent do default processing for this function.

Required DLLs and Libraries

Platforms

Win32, x64.

See Also

Example

class MyBitmap: public LAnnotationWindow 
 
{ 
 
   protected: 
 
      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 MyBitmap::StartChanging(L_UINT nChangeType,L_UINT nChangeCategory) 
{ 
 
   switch(nChangeType) 
 
   { 
 
   case NC_TRANSFORM_FLIP: 
 
      /*the image is to be flipped*/ 
      break; 
 
      /* 
 
   case ….: 
 
      do other things 
 
      */ 
 
   } 
 
 
 
   return(LAnnotationWindow::StartChanging(nChangeType,nChangeCategory)); 
 
} 
 
 
 
L_VOID MyBitmap::EndChanging(L_UINT nChangeType,L_UINT nChangeCategory,L_INT nRetCode) 
 
{ 
 
   switch(nChangeType) 
 
   { 
 
   case NC_TRANSFORM_FLIP: 
 
      if(nRetCode==SUCCESS) 
 
         m_bChanged=TRUE; 
 
      break; 
 
   /* 
 
   case ….: 
 
      do other things 
 
   */ 
 
   } 
 
 
 
   LAnnotationWindow::EndChanging(nChangeType,nChangeCategory,nRetCode); 
 
} 
Help Version 21.0.2021.7.2
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2021 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS Raster Imaging C++ Class Library Help

Products | Support | Contact Us | Intellectual Property Notices
© 1991-2021 LEAD Technologies, Inc. All Rights Reserved.