PAINTSTRUCT ps;
HWND hwnd;
GetDlgItem(hwnd, IDC_View);//
HDC hdc = BeginPaint(hwnd,&ps);//
DrawIcon(hdc,5,5,g_icon);
EndPaint(hwnd,&ps);//错误如下:
E:\vc程序\FilePro\new.cpp(86) : error C2664: 'void __thiscall CWnd::GetDlgItem(int,struct HWND__ ** ) const' : cannot convert parameter 1 from 'struct HWND__ *' to 'int'
This conversion requires a reinterpret_cast, a C-style cast or function-style cast
E:\vc程序\FilePro\new.cpp(87) : error C2660: 'BeginPaint' : function does not take 2 parameters
E:\vc程序\FilePro\new.cpp(89) : error C2660: 'EndPaint' : function does not take 2 parameters
弄了很久不知道什么原因??
解决方案 »
- 当我创建 checkbox (WS_CHILD | BS_AUTOCHECKBOX |BS_OWNERDRAW)点击系统未调用DrawItem
- 枚举一个进程的所有线程后,如何通过线程的句柄来取得该线程所在的DLL名?
- 100分求 :如何检测一个URL是否可用??
- 下雪了,散分~~~~~~~~~~~~~~~
- 老婆怀孕了,散分
- 这个头文件<strstrea.h>为什么不能放在我的.cpp文件中,高手快来看看呀!
- 请教SetParent()函数的用法,在线等各位援助!
- VC++ 多线程 报错问题
- (百分求教)如何调用DLL中的类的成员函数(带参数)??
- 求助:C++ 如何解析 Thu, 8 Mar 2012 23:13:06 +0800 (CST) 这种时间串
- 关于生成程序问题?
- XML文件为什么有错!!!
PAINTSTRUCT ps;
HWND hwnd;
::GetDlgItem(hwnd, IDC_View);//
HDC hdc = ::BeginPaint(hwnd,&ps);//
::DrawIcon(hdc,5,5,g_icon);
::EndPaint(hwnd,&ps);//
HWND hDlg,
int nIDDlgItem
); Parameters
hDlg
[in] Handle to the dialog box that contains the control. nIDDlgItem
[in] Specifies the identifier of the control to be retrieved.