编译时
#include "windows.h"
#include "stdafx.h"
#include "resource.h"
#include "ProgressDlg.h"
....
...
rItem.lParam = (LPARAM)(DWORD_PTR) m_lsStatusMessages.back().c_str();
I am getting the error C2065: 'DWORD_PTR' : undeclared identifier
我是否遗漏了任何包含内容。
最佳答案
#include "windows.h"
#include "stdafx.h"
假设您实际使用 MSVC 中的预编译 header 支持,这就是您的问题。您(尝试)在 stdafx.h
之前包含 windows.h
。 之前 #include "stdafx.h"
的每一行代码都将被忽略。 IIRC MSVC 在某些版本中也给出了一些警告。
将#include "windows.h"
放入stdafx.h
或将其移到#include "stdafx.h"
下方。
关于c++ - 错误 C2065 : 'DWORD_PTR' : undeclared identifier,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3778090/