A bug in VC.NET?

zhaozj2021-02-16  45

I believe that all friends must develop regular MFC DLLs that can display the dialog, such as displaying a login dialog and check the password check. I didn't do it under VC6. But after transferring to the Chinese version of VC.NET, it is coming. The following operations, you can try (must use the Chinese version, English version I don't know if it will be wrong)

1. Use VC.Net to create a regular MFC DLL item; 2. In the resource editor, insert a dialog resource; 3, compile this project, the system will prompt: "DLGDLL.RC (158): Error RC2135: File Not Found: 936 "

What's the problem? I look at the task list window, with the following information: "E: /Study/dlgdll/dlgdll.rc (158): Error RC2135: File Not Found: 936", originally added dialogs to make compilation failed. What is going on? After comparing the similar projects generated by VC6, I finally found a solution, steps very simple: 1. In the VC.NET "Solution Explorer" window, use the mouse to the RC file of the project, this example Is DLGDLL.RC, select "Open Mode" in the pop-up menu, then select the Source Code (Text) Editor "in the dialog that appears, then click the" Open "button; 2, position to the RC file in the text form The last few lines, you look back similar to the following code: #IF! Defined (AFX_RESOURCE_DLL) || Defined (AFX_TARG_CHS) Language 4, 2 #pragma code_page (936) #include "res / dlggdll.rc2" // Non Microsoft Visual C Edit Resources #include "AfxRes.rc" // Standard Components #ENDIF 3, change the "language 4, 2" in this code to "Language 4, 2"; 4, save and recompile, all OK ! I don't know if there is the same BUG under the English version, Microsoft is really not enough! :-)

转载请注明原文地址:https://www.9cbs.com/read-26358.html

New Post(0)