While compiling
#include "windows.h"
#include "stdafx.h"
#include "resource.h"
#include "ProgressDlg.h"
....
...
rItem.lParam = (LPARAM)(DWORD_PTR) m_lsStatusMessages.back().c_str();
I am ge开发者_开发百科tting the error C2065: 'DWORD_PTR' : undeclared identifier
Am I missing any Includes.
#include "windows.h"
#include "stdafx.h"
Assuming you actually use the precompiled headers support in MSVC, this is your problem. You (try to) include windows.h
before stdafx.h
. Every line of code before #include "stdafx.h"
is ignored. IIRC MSVC also give some warning about it in some versions.
Either put the #include "windows.h"
into stdafx.h
or move it below #include "stdafx.h"
.
DWORD_PTR
is defined in basetsd.h
but you should include windows.h
If I remember correctly, you need at least one define. The basetsd.h
contains something like
#if(_WIN32_WINNT >= 0x0400)
or
#if(WINVER >= 0x0502)
You can give it a shot and add
#define _WIN32_WINNT 0x0501
#define WINVER 0x0501
before you include your windows.h
for Windows XP requirement settings.
An overview on preprocessor defines and windows header files can be found here.
精彩评论