怎样使用VC++6.0显示图象句柄?
请VC++60高手帮忙
想把当前图象的句柄显示在窗口某位置,代码如下,不知道那些地方出错,请修改.语言VC++6.0.
……
LRESULT CALLBACK WndProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
static HWND hwndButton[NUM] ;
static TCHAR szFormat[]= TEXT ("%-16s%04X-%04X %04X-%04X") ,
szbuffer[50];
static int cxChar, cyChar ;
HDC hdc ;
PAINTSTRUCT ps;
int i ;
TCHAR * POINT point;
Static HANDLE hwnd ;
switch (message)
case WM_RBUTTONDOWN:
hdc = GetDC (hwnd);
GetCursorPos(&point);
handle=WindowFromPoint(point);
TextOut (hdc, 24 * cxChar, cyChar, szBuffer, wsprintf (szBuffer, szFormat,handle)) ;
ReleaseDC (hwnd, hdc) ;
break ;
…….