MFC provides a wide range of visual classes for developers to use. The following describes various classes:
The CView class is the most basic view class that only supports the most basic operations.
CScrollView class provides the scroll function. You can use void CScrollView: SetScrollSizes (int nMapMode, SIZE sizeTotal, const SIZE & sizePage = sizeDefault, const SIZE & sizeLine = sizeDefault) set the scroll size and coordinate ing mode. However, the coordinates must be converted when drawing and receiving user input. See receive user input.
The CFormView class allows you to define interfaces in resource files and bind subwindows and variables. Use the UpdateData function to exchange data between variables and subwindows.
The CTreeView class uses the TreeCtrl interface as the visual interface and calls CTreeCtrl & CTreeView: GetTreeCtrl () const to get the reference of CTreeCtrl.
The CListView class uses the ListCtrl interface as the visual interface and calls CTreeCtrl & CTreeView: GetTreeCtrl () const to get the reference of CListCtrl.
The CEditView class uses Edit to receive user input. It has all the functions of the input box. Call CEdit & CEditView: GetEditCtrl () const to get the reference of Edit. Void CEditView: SetPrinterFont (CFont * pFont) can be used to set the print font.
The CRichEditView class is used as the View class for Rich Text Edit (Rich Text input). It provides the ability to display Text in the format. CRichEditDoc is required for use.