windows编程可以使用AfxMessageBox来弹窗显示消息
相关介绍:
https://blog.csdn.net/xhhjin/article/details/6456205
https://www.cnblogs.com/ZHENGJUNupperclassman/p/7496722.html
示例代码:
CString msg = "hello world";
::AfxMessageBox(msg );
编译错误1:函数undef
确保创建工程时已勾选MFC,或者右击工程名 —〉Property—〉General中的use of MFC中选择Use MFC in shared DLL/Use MFC in a Static Library
编译错误2:
Error 1 error C2440: 'initializing' : cannot convert from 'const char [5]' to 'ATL::CStringT<wchar_t,StrTraitMFC_DLL<wchar_t,ATL::ChTraitsCRT<wchar_t>>>'
右击工程名 —〉Property—〉General中的Character Set中选择Not Set