我来我网
https://5come5.cn
 
您尚未 登录  注册 | 菠菜 | 软件站 | 音乐站 | 邮箱1 | 邮箱2 | 风格选择 | 更多 » 
 

本页主题: [求助]蝈蝈们来看看一个简单的MFC程序 显示签名 | 打印 | 加为IE收藏 | 收藏主题 | 上一主题 | 下一主题

ppt……



性别: 保密 状态: 该用户目前不在线
等级: 品行端正
家族: ★课件天地★
发贴: 169
威望: 0
浮云: 1172
在线等级:
注册时间: 2006-06-27
最后登陆: 2007-04-01

5come5帮你背单词 [ detect /di'tekt/ vt. 发觉,检测 ]


[求助]蝈蝈们来看看一个简单的MFC程序

rt
一个简单的MFC程序
#include "afxwin.h"
class CMyApp:public CWinApp
{
public:
   virtual BOOL InitInstance();
   //rewrite the initinstance function in myapp
};
class CMainWnd:public CFrameWnd
{
protected:
   afx_msg void Function1(WPARAM wParam,LPARAM lParam)
       //function to deal with the information
   {
       MessageBox("左键单击");
   }
  afx_msg void Function1(WPARAM wParam,LPARAM lParam)
       //function to deal with the information
   {
       MessageBox("右键单击");
   }
DECLARE_MESSAGE_MAP();
};
BEGIN_MESSAGE_MAP(CMainWnd,CFrameWnd);
ON_MESSAGE(WM_LBUTTONDOWN,Function1);
ON_MESSAGE(WM_LBUTTONDOWN,Function1);
END_MESSAGE_MAP();
BOOL CMyApp::InitInstance()
{
   CFrameWnd*p=new CFrameWnd; //produce the win class
p->Create(0,"workspace");       //create the window
p->ShowWindow(SW_SHOWMAXIMIZED);//show the window
p->UpdateWindow();
AfxGetApp()->m_pMainWnd=p;     //focus on the mainwindow
return TRUE;
}
CMyApp myapp;

编译的时候出现的错误是
fatal error C1010: unexpected end of file while looking for precompiled header directive

蝈蝈们帮忙给找找原因吧
顶端 Posted: 2006-10-14 16:34 | [楼 主]
stam0



性别: 帅哥 状态: 该用户目前不在线
等级: 人见人爱
发贴: 2704
威望: 0
浮云: 1440
在线等级:
注册时间: 2005-11-22
最后登陆: 2012-12-29

5come5帮你背单词 [ define /di'fain/ vt. 解释,给…下定义,限定 ]


在“编译”菜单里面,选择“重建全部”,再重新编译一遍程序就OK了。这样以后两次编译这个工程的时候直接按Ctrl+F7就OK了,再也不需要点“重建全部”,但是如果你又重新建了一个工程,就又得点击“重建全部”。
这个问题主要是由于保存的工程文件不是VC++的默认路径造成的。
顶端 Posted: 2006-10-17 10:02 | [1 楼]
我来我网·5come5 Forum » 程序员之家

Total 0.009495(s) query 6, Time now is:06-26 18:10, Gzip enabled
Powered by PHPWind v5.3, Localized by 5come5 Tech Team, 黔ICP备16009856号