LBitmapBase::StartChanging

#include "ltwrappr.h"

virtual L_INT LBitmapBase::StartChanging(nChangeType, nChangeCategory)

L_UINT nChangeType;

/* type of change */

L_UINT nChangeCategory;

/* the change category */

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

Parameter

Description

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.

nChangeCategory

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

Returns

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.

Required DLLs and Libraries

LTDIS
LTFIL

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:

LBitmapBase::EndChanging, LBitmapBase::EnableChangeNotification, LBitmapBase::IsChangeNotificationEnabled, LBitmapBase::EnableAlwaysEndNotification, LBitmapBase::IsAlwaysEndNotification, Class Members

Example

class MyBitmap: public LBitmapBase
{
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 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(LBitmapBase::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
      */
   }
   LBitmapBase::EndChanging(nChangeType,nChangeCategory,nRetCode);
}