CDialogBase MFC dialog base class

Based on the dialog base class abstracted from message mapping, business development only needs to inherit this class. This parent class can already meet a large number of business scenarios. For example, creating a modal dialog box or a non-modal dialog box, etc., is only encapsulated. #pragma once #include “common.h” /****************************************************** ************************/ /* \t Based […]

vc++ big job mfc simple drawing program

Major job requirements: a drawing program Using VC++, MFC can draw at least 4 types of graphics; it has functions such as adding, deleting, modifying, (checking, optional, and adding attribute functions) to fill in unlimited amounts, and stroked graphics can be saved and opened. I’m really busy, but there are still people urging me to […]

Use of CDC in CView class (MFC)

Article directory 1.Preliminary knowledge 2. Experimental purpose 3.Experimental content 4. Code implementation 5. Running results 6. Summary 1. Difficulties encountered in the experiment How to set the color and width of the drawn curve How to draw axes How to graph a function 2. Experience 1. Preliminary knowledge MFC (Microsoft Foundation Classes) is a set […]

MFC—SaleSystem project (Part 2)

8 Sales Management Window 8.1 UI design 1) Add a dialog box resource (change the ID to DIALOG_SELL) and add the required controls. In the window properties, change Border to None and Style to Child: 2) Select the dialog box -> right-click -> Add class -> Class name: CSellDlg, select CFormView as the base class […]

MFC mouse and keyboard programming experiment

Article directory 1.Preliminary knowledge 1.Visual Studio program debugging method 2. Operation steps of MFC message mapping 3. How to handle keyboard and mouse messages in MFC programs Handle mouse messages Handling keyboard messages 2. Experimental purpose 3.Experimental content 4. Code implementation 1.Mouse move message 2. Mouse click message 3. Keyboard press message 4. Print initial […]

C++ MFC Socket communication ini configuration file reading + ASCLL code data transmission and segmentation to implement string split function

Introduction to ini files The ini file is a file with the suffix ini. It can be the initialization configuration file of the project. That is to say, after the project is released, the information in the configuration file can be modified according to the needs without modifying the project source code. The following is […]

[MFC] Creating (non-)modal dialog boxes and possible problems

s1. Create a new project s2. Find Dialog in the resource view, right-click and insert to generate a new Dialog. Repeat the operation to generate another one s3, drag two buttons from the main Dialog s4. Create a modal dialog box. Double-click to create the first button Note 1 Here, a CDialog object named dlg […]

MFC—SaleSystem project (middle)

4 Static split window 4.1 Custom MFC view class Customize two classes: CSelectView and CDispalyView (its base class must be a view class). CSelectView inherits from CTreeView, and CDispalyView inherits from CFormView. 4.2 Split the window through the CSplitterWnd class 1) In the CMainFrame class, declare an object of type CSplitterWnd: private: CSplitterWnd m_spliter; // […]

MFC—SaleSystem project (Part 1)

New project 1.1 Create a project according to the wizard First, create a new MFC project (SaleSystem), based on a single document, MFC standard project, and remove the toolbar: 1.2 Add preprocessing instructions Since Microsoft no longer recommends using the traditional C/C++ library functions scanf, strcpy, sprintf, etc. in VS2013, directly using these library functions […]