Introduction to various visual classes in MFC

Source: Internet
Author: User

 

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.

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.