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

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

ppt……



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

5come5帮你背单词 [ pocket /'pokit/ n. 小袋,钱袋,衣袋;a. 袖珍的,小型的;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 | [楼 主]
流星月



性别: 保密 状态: 该用户目前不在线
等级: 鹤立鸡群
发贴: 1015
威望: 2
浮云: 1105
在线等级:
注册时间: 2003-09-24
最后登陆: 2008-03-10

5come5帮你背单词 [ intensive /in'tensiv/ a. 精心的,专心致志的,深入细致的 ]


把代码文件发上来。
BEGIN_MESSAGE_MAP(CMainWnd,CFrameWnd);
ON_MESSAGE(WM_LBUTTONDOWN,Function1);
ON_MESSAGE(WM_LBUTTONDOWN,Function1);
//>>>ON_MESSAGE(WM_RBUTTONDOWN,Function1);
只发现了这个问题哈。
顶端 Posted: 2006-10-17 08:21 | [1 楼]
我来我网·5come5 Forum » 程序员之家

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