Re: MFC & WTL
От: Ахет  
Дата: 24.06.03 10:28
Оценка:
если кому-то это пригодиться,

решение №1

#define CDC CDCImpl
#define _WTL_NO_AUTOMATIC_NAMESPACE
#define _ATL_APARTMENT_THREADED
#include <atlbase.h>
#include <atlapp.h>
extern WTL::CAppModule _Module;
#include <atlcom.h>
#include <atlwin.h>
#include <atlframe.h>
#include <atlgdi.h>
#include <AtlSplit.h>
#undef CDC

namespace WTL
{
  class CDC:public CDCImpl {};
}


решение №2:

включить atl до описания CDC От MFC, тогда точно будет использована CDC от WTL

#include <AFX.H>

#define _WTL_NO_AUTOMATIC_NAMESPACE
#define _ATL_APARTMENT_THREADED
#include <atlbase.h>
#include <atlapp.h>
extern WTL::CAppModule _Module;
#include <atlcom.h>
#include <atlwin.h>
#include <atlframe.h>
#include <atlgdi.h>
#include <AtlSplit.h>

#include <afxwin.h>
#include <afxext.h>
#include <afxdisp.h>
#include <afxdtctl.h>
#ifndef _AFX_NO_AFXCMN_SUPPORT
#include <afxcmn.h>
#endif // _AFX_NO_AFXCMN_SUPPORT
 
Подождите ...
Wait...
Пока на собственное сообщение не было ответов, его можно удалить.