1

在我使用 WTL - Visual Studio 9 中的对话框向导创建了一个普通对话框之后,我已经包含了<atltime.h>标题,我得到了这个:

Error   2   error C2039: 'CString' : is not a member of 'WTL'   ...\wtl\include\atlctrls.h  5060    TASKSCHEDULER
Error   3   error C2039: 'CString' : is not a member of 'WTL'   ...\wtl\include\atlctrls.h  969 TASKSCHEDULER
Error   4   error C2039: 'CString' : is not a member of 'WTL'   ...\wtl\include\atldlgs.h   535 TASKSCHEDULER
Error   5   error C2039: 'CString' : is not a member of 'WTL'   ...\wtl\include\atldlgs.h   627 TASKSCHEDULER
Error   6   error C2039: 'CString' : is not a member of 'WTL'   ...\wtl\include\atldlgs.h

697 TASKSCHEDULER
4

1 回答 1

3

我遇到了类似的情况,有两件事帮助我摆脱了错误,也许对其他人有帮助。

  1. 包括atlstr.h以上atlapp.h
  2. 定义_WTL_NO_CSTRING
于 2015-11-25T09:09:07.363 回答