vs2008 MFC工程建立
愿鸡汤成为你前进的动力,愿梦想使你持之以恒,而非一时热血
本文总结了VS如何区建立MFC工程的步骤。
MFC,全称Microsoft Foudation Classes,是一种application framework,以VC++封装了windows API 的开发工具。
具体详细使用步骤:
1.Open VS2008,
2.File->New->Project:
As picture:
Visual C++ ->MFC->MFC Application
Enter project name, select location.
Next:
Select dialog based & Use MFC in a static library.
Next or finlish.
It will show interface as picture below
We can drag a key to UI,for example:
Double Click the key in UI
Input the code
MessageBox指的是显示一个模态对话框,其中包含一个系统图标、 一组按钮和一个简短的特定于应用程序消息,如状态或错误的信息。消息框中返回一个整数值,该值指示用户单击了哪个按钮。
----From Baidu Baike
Build project:
Build error, Error
error C2664: 'CWnd::MessageBoxW' : cannot convert parameter 1 from 'const char [3]' to 'LPCTSTR' e:\vs2008\test1\test1\test1\test1dlg.cpp 155 test1
solution:project->properties->configuration properties->character set->use multi-Byte character set
It’s OK.
Location:target folder/debug/<project_name>.exe