Vc6.0Program, To vs2008, compilation is normal, but in debug mode, an error is reported during running, and in release mode, no problem occurs. Then I asked the omnipotent Gu Ge and Du Niang to find a lot.ArticleBut most of them are copied from each other. I used the guidance of the two articles to eliminate this issue and paste it for future reference.
This problem is caused by resources. It is said that this problem occurs because another language was selected when the project was created and then changed to Chinese. I checked it in my project, including Chinese, English, and inexplicable Italian. I created a Chinese project and modified it against the differences between the two.
# If! Defined (afx_resource_dll) | defined (Afx_targ_chs)
# Ifdef _ Win32
Language4, 2
# Pragma code_page (936)
# Endif // _ Win32
Find afx_resource_dll, and you will probably find 4-5 content. Then pay attention to the red part. The format of other parts is not the same, but the modified content is the same.
Language4, 2 can also be written as language lang_chinese, sublang_chinese_simplified
If a macro is used, it looks intuitive. However, in vs2008, numbers are used by default.
After the modification is completed, the problem persists and the search continues.
# Include "res \Xxx. RC2"// Non-Microsoft Visual C ++ edited Resources
A problem occurs here. Due to the order of inclusion, the language problem may occur. For details, refer to the article.
# Include"Res \ XXX. RC2"//Resources not edited by Microsoft Visual C ++# Include"Afxres. RC"//Standard Components# Include"Afxprint. RC"//Print/print preview resources
Change
# Include"Afxres. RC"//Standard Components# Include"Afxprint. RC"//Print/print preview resources# Include"Res \ XXX. RC2"//Resources not edited by Microsoft Visual C ++
You can adjust the order. At this point, the problem is solved.
Reference: http://www.wuroom.com/post/116/
Http://www.codelast.com /? P = 1888