Home > Software engineering >  Add a variable error for MFC check box controls
Add a variable error for MFC check box controls

Time:11-18

I within the dialog box to add a check box check box controls, then add it to a variable, the following figure

But when I run vs2017 error, the diagram below:



This I don't know where the wrong is wrong, I don't doubt is variable type right,
When I use the wizard to check box to add variables, is the default type CButton, change not to drop, then I go to change type in the code, change the CButton to CCheckBox, but found no CCheckBox this class, but I found CCheckListBox this class, I try to use it to replace CButton, but still not solve the mistake, then I tried the CWnd in turn, CListBox, have no purpose,
Why no CCheckBox in MFC class - this class? How to check box CCheckBox add variables?

CodePudding user response:

The password edit box and button? Is a low-level errors.

CodePudding user response:

reference 1st floor zgl7903 response:
the password edit box and button? Is a low-level mistakes.

Is remember password this Check box, I just can't understand why use the wizard to Check box control variable, the associated variable is the default type CButton, and run up and complains, I didn't find the right type of variable

CodePudding user response:

ID rearranged the look, could be repeated ID not corresponding or

CodePudding user response:

Manually modify, into a BOOL type, or when the wizard to generate categories do not use controls, with a variable

CodePudding user response:



CButton m_Check;

I here no problem can compile
  • Related