BCGSuite for MFC
CBCGPEditView

Detailed Description

The CBCGPEditView class simplifies use of the advanced edit control CBCGPEditCtrl with MFC's document-view architecture.

To use CBCGPEditView class in your application:

  • Derive a view class from CBCGPEditView (let's say CMyEditView).
  • Register the application's document templates using this view.
  • If you want to customize CBCGPEditCtrl and derive your own edit control class from it, override CBCGPEditView::CreateEdit. Embed a pointer to the object of derived class in CMyEditView.
  • Add processing for the WM_CREATE message (CMyEditView::OnCreate). This is a good place to make some initializations for the embedded edit control enabling tooltips, creating image lists, setting fonts and so on.
  • Add processing for CMyEditView::OnInitialUpdate. Here you can load XML settings for syntax highlighting, enable IntelliSense support, preset markers.

CBCGPEditView handles the following standard edit commands:

ID_EDIT_CUT, ID_EDIT_COPY, ID_EDIT_PASTE, ID_EDIT_SELECT_ALL, ID_EDIT_FIND, ID_FILE_PRINT_PREVIEW, ID_FILE_PRINT, ID_FILE_PRINT_DIRECT, ID_EDIT_REDO, ID_EDIT_UNDO, WM_FINDREPLACE

It automatically sets "dirty" (modified) flag to the related document when receives the BCGM_ON_EDITCHANGE registered message.

See also
CBCGPEditCtrl

.

Inherits CView.

Public Member Functions

 GetEditCtrlReturns a pointer to the embedded edit control.
 

Protected Member Functions

 CreateEditCalled by the edit view when it needs to create the embedded edit control.
 
 OnScaleChangedCalled by the framework when control font has been scaled.