Home > Back-end >  How to eliminate mistakes in the Debug an Assertion Failed
How to eliminate mistakes in the Debug an Assertion Failed

Time:09-18

In the vc + + 2015, in the CVIEW dialog box controls the variable times wrong Debug an Assertion Failed, how should solve?

Void CMFCApplication4View: : OnMydialog ()
{
//TODO: add the command handler code

CMFCApplication4Doc * pDoc=GetDocument ();//definition document pointer
Cstrings s;

CCommunitionSetting MyDlg;
If (IDOK==MyDlg. DoModal ())
{
MyDlg. MCommPort. GetLBText (0, s);//to run to the other error, delete this sentence can run; MCommPort is dialog box controls CComboBox class variables;
PDoc - & gt; CommSet. Add=MyDlg. MCommAdd;//this sentence can run; MCommAdd is dialog box controls CComboBox class variables; CommSet variables defined in the DOC
}
}

CodePudding user response:

Winctrl1. CPP is your own code or library code? Compilation can Release way? I also encountered a similar,

CodePudding user response:

Winctrl1. CPP is VS own, click on the button, Release way compile time can't the pop-up dialog box, do not know what to do,

CodePudding user response:

The code that you write new or old project? If the old project with the corresponding versions of VS a try,

CodePudding user response:

The
reference 3 floor u010165006 response:
is the code you write new or old project? If the old project with the corresponding versions of VS a try,


Open the project file with notepad can view the Version of the project, such as the Format Version 11.00 for VS2010, the Format for the VC 6.00 Version 6.0

CodePudding user response:

Don't direct operation modal dialog box after the execution of control object, but rather the user to select data exchange (DDX way to correspond to the values of the variables,

CodePudding user response:

reference 4 floor u010165006 response:
Quote: reference u010165006 reply: 3/f

The code that you write new or old project? If the old project with the corresponding versions of VS a try,


Open the project file with notepad can view the Version of the project, such as the Format Version 11.00 for VS2010, Format Version 6.00 for VC 6.0

Excuse me, there are other ways? If the code is copied to the current version, can you run?

CodePudding user response:

refer to 6th floor sinat_37855921 response:
Quote: refer to 4th floor u010165006 response:

Quote: refer to the third floor u010165006 response:

The code that you write new or old project? If the old project with the corresponding versions of VS a try,


Open the project file with notepad can view the Version of the project, such as the Format Version 11.00 for VS2010, Format Version 6.00 for VC 6.0

Excuse me, there are other ways? If the code is copied to the current version, can you run?


Is not very clear, you give it a try,
  • Related