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
create successfully After that, the resource file includes the following parts:
3 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")]
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.
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.
6 Add the initial state to the radio box as selected: (Set the initial state of the
radio box 100 to be selected) 7 The result is as follows: (The initial state of radio box 100 is selected)
According to different scores, different weights, calculate the result: