MFC Windows programming experiment--- Computation of score based on the score and the weight

1 实验描述:Design a program by using MFC AppWizard to realize the computation of score based on the score and the weight.

2 Create MFC project (VC++6.0): select MFC AppWizard(exe) --> fill in the project name --> click "OK" --> select "Basic Dialog" --> click "Finish" to
Insert picture description here
Insert picture description here
create successfully After that, the resource file includes the following parts:
Insert picture description here3 Add the controls required by the title to the resource file Diglog:
you can adjust the size and position of the controls through the layout --> guide line --> adjust the size and position of the controls. You can
group and sort the controls through the layout --> Tab order ( You can also use "Ctrl + D" to open) [The first control of each group (right-click, select "Properties" --> select "Group")]
Insert picture description here
4 Add types for class members: View --> Create Class Wizard - >Add Variable for the required control --> Select "Type" and "Member" according to the actual situation.
Insert picture description here
5 Add a function for each control: Double-click each control, the page will directly jump to the function of the corresponding control, directly in the jump area Write the function of the corresponding control.
Insert picture description here
Insert picture description here
6 Add the initial state to the radio box as selected: (Set the initial state of the
Insert picture description here
radio box 100 to be selected) 7 The result is as follows: (The initial state of radio box 100 is selected)
Insert picture description here
According to different scores, different weights, calculate the result:
Insert picture description here

Guess you like

Origin blog.csdn.net/weixin_43574277/article/details/106111149