My single-document project of MFC has an incorrect question. This error occurs after the LoadStringW function of the CString class is used, but it is also wrong after being annotated:
1 CString str;
2 str = "video monitoring ";
3 pDC-> TextOutW (50, 20, str );
4
5 str. LoadStringW (IDS_STRING312 );
6 pDC-> TextOutW (300, 20, str );
Follow the Netizen's method: Modify the following settings: project-> properties-> Configuration properties-> c/c ++-> code generation-> Runtime Library-> multi-thread debugging DLL (/MDd ).
Still failed to solve...
The problem is found here:
1 void CTextApp: PreLoadState ()
2 {
3 BOOL bNameValid;
4 CString strName;
5 bNameValid = strName. LoadString (IDS_EDIT_MENU );
6 ASSERT (bNameValid); // This line does not run, but debug is not available here, but I cannot think of any problems or change them.
7 GetContextMenuManager ()-> AddMenu (strName, IDR_POPUP_EDIT );
8 bNameValid = strName. LoadString (IDS_EXPLORER );
9 ASSERT (bNameValid );
10 GetContextMenuManager ()-> AddMenu (strName, IDR_POPUP_EXPLORER );
11}
Experts can solve the problem ~~~