原来编过一个工程,里面用到了
CWindow cw;
cw.m_hWnd=GetSafeHwnd();
hDC=cw.GetDC();
编译通过。可是今天编了一个,就出现了错误,错误为:
d:\microsoft visual studio\vc98\atl\include\atlwin.h(65) : error C2065: '_Module' : undeclared identifier
d:\microsoft visual studio\vc98\atl\include\atlwin.h(2912) : error C2228: left of '.GetModuleInstance' must have class/struct/union type
d:\microsoft visual studio\vc98\atl\include\atlwin.h(2974) : error C2228: left of '.GetModuleInstance' must have class/struct/union type
D:\FRJanitor\FR\CameraOp.cpp(74) : error C2352: 'CWnd::GetSafeHwnd' : illegal call of non-static member function
d:\microsoft visual studio\vc98\mfc\include\afxwin.h(1912) : see declaration of 'GetSafeHwnd'
Error executing cl.exe.我已经
#include <atlbase.h>
#include <atlwin.h>
为什么会这样?????
还有,原来CClientDC dc(this);可以通过,现在也不行了,不知道为什么?那位大虾帮助一下,bow
CWindow cw;
cw.m_hWnd=GetSafeHwnd();
hDC=cw.GetDC();
编译通过。可是今天编了一个,就出现了错误,错误为:
d:\microsoft visual studio\vc98\atl\include\atlwin.h(65) : error C2065: '_Module' : undeclared identifier
d:\microsoft visual studio\vc98\atl\include\atlwin.h(2912) : error C2228: left of '.GetModuleInstance' must have class/struct/union type
d:\microsoft visual studio\vc98\atl\include\atlwin.h(2974) : error C2228: left of '.GetModuleInstance' must have class/struct/union type
D:\FRJanitor\FR\CameraOp.cpp(74) : error C2352: 'CWnd::GetSafeHwnd' : illegal call of non-static member function
d:\microsoft visual studio\vc98\mfc\include\afxwin.h(1912) : see declaration of 'GetSafeHwnd'
Error executing cl.exe.我已经
#include <atlbase.h>
#include <atlwin.h>
为什么会这样?????
还有,原来CClientDC dc(this);可以通过,现在也不行了,不知道为什么?那位大虾帮助一下,bow
解决方案 »
- VC6.0两个按钮间消息会冲突吗?这样能行吗?这次粘上代码,希望高手能帮帮忙。
- 求助:怎么使得MDI的面板上的一个按钮变灰色
- 初学VC,求教一文字显示问题
- 请教各位星星,如何不用+,-,*,/,实现四则运算,很急的,明天揭帖
- 关于GlobalLock和GlobalUnlock
- 怎样解决鼠标移出客户区时的消息捕获问题
- 工具箱里的控件各属于什么类阿?模糊!
- fopen函数如何与已经打开的文件关联
- winamp那么多可视化效果,有办法去用起来吗?
- CArray.Add(*(new CMyClass))怎么不行呢?报什么构造函数方面的错.
- 请问CSocket::Create()失败的原因?
- 鼠标问题-->如何能让鼠标自己响应消息,例如让鼠标自己跟踪网页上的按钮。
extern CComModule _Module;
// or project specific include files that are used frequently, but
// are changed infrequently
//#if !defined(AFX_STDAFX_H__2FAA7322_B9EA_413F_B2FB_5A77FE97503F__INCLUDED_)
#define AFX_STDAFX_H__2FAA7322_B9EA_413F_B2FB_5A77FE97503F__INCLUDED_#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers
//extern CComModule _Module#include <afxwin.h> // MFC core and standard components
#include <afxext.h> // MFC extensions
#include <afxdisp.h> // MFC Automation classes
#include <afxdtctl.h> // MFC support for Internet Explorer 4 Common Controls
#ifndef _AFX_NO_AFXCMN_SUPPORT
#include <afxcmn.h> // MFC support for Windows Common Controls
#endif // _AFX_NO_AFXCMN_SUPPORTextern CComModule _Module
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.#endif // !defined(AFX_STDAFX_H__2FAA7322_B9EA_413F_B2FB_5A77FE97503F__INCLUDED_)