线程中如何使用pDC
//首先将窗体句柄传给线程参数
hWnd=GetSafeHwnd();
m_pThread=AfxBeginThread(ThreadAcquireData,hWnd);//启动线程
//接下来我在线程中新建CDC对象
UINT ThreadAcquireData(LPVOID ThreadParam)
{//新线程,读取采集卡数据
CDC* pDC=GetDC((HWND)ThreadParam);
......
}
但是提示错误:
error C2440: 'initializing' : cannot convert from 'struct HDC__ *' to 'class CDC *'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
请各位英雄帮忙啊!!!!