<< Return to Main Index

< Return to Class Index

class CGXMaskData: public CObject

CGXMaskData encapsulates all the mask functionality for the CGXMaskControl class. You normally don’t need to call any functions from this class, because data exchange with mask cells is not different from any other cells. Simply use the SetStyleRange, GetStyleRowCol and CGXControl API for accessing and changing data in mask cells.

However, if you want to customize the mask control and add support for additional mask characters, you have to subclass CGXMaskData.

Here are the steps necessary for customizing a CGXMaskControl:

a) Derive class from CGXMaskData. Make sure you insert GRID_DECLARE_DYNCREATE in the class declaration.

b) Override the IsCharValid and IsMaskChar member functions.

c) When registering the mask control in OnInitialUpdate, pass runtime class information for your CGXMaskData derivative to the CGXMaskControl constructor.

Example:


RegisterControl(
      GX_IDS_CTRL_MASKEDIT,
      new CGXMaskControl(this, GX_IDS_CTRL_MASKEDIT, RUNTIME_CLASS(CMyMaskData)));

#include <gxall.h>

See Also

CGXGridCore CGXMaskControl

CGXMaskData

Class Members