VC++6.0我包含了自己写的Application.h 出错了 请高手指点

来源:百度知道 编辑:UC知道 时间:2024/06/03 09:19:25
VC++6.0
我包含了自己写的Application.h 出错了 请高手指点

#ifndef __Application_h__
#define __Application_h__
#define WM_KICKIDLE 0X036A

#include "Windows.h"

class CWinApp{
public:
CWinApp();
~CWinApp();
void SetWinMainArgs(HINSTANCE hInstance, LPSTR lpszCmdLine, int nCmdShow);
BOOL RegisterWndClass(const char *name, UINT classStyle,HCURSOR hCursor=0,HBRUSH hbrBackground=(HBRUSH)(COLOR_WINDOW+1),HICON hIcon=0);
virtual BOOL InitInstance();
virtual BOOL OnIdle(long count);
virtual BOOL PreTranslateMessage(MSG *msg);
int Run();
HRSRC FindResource(const char *name,const char *type);
HGLOBAL LoadResource(HRSRC hres);
HACCEL LoadAccelerators(const char *name);
HMENU LoadMenu(const char *name);
HMENU LoadMenu(int resId);
HICON LoadIcon(const char *name);
HICON LoadIcon(int resId);
HINSTANCE GetInstance() const {return Instance;}
operator HIN

粗粗看了一下,你第26行的CWindow没有定义,应该包含CWindow类的头文件atlwin.h。另外,第32行的CWindows写成了Cwindow,也是错的。第36行的SetWinMainArgs函数在你的类里没有声明,且把int nCmdShow写成了intnCmdShow,少了个空格。

ff