case WM_MOUSEMOVE:
HDC hdc1;
hdc1=GetDC(hwnd);
POINT point;
GetCursorPos(&point );// address of structure for cursor position
int x=point.x;
int y=point.y;
TextOutA(...);
...全文
1368打赏收藏
处理鼠标移动事件
我想实现在鼠标移时输出它的坐标,这段代码错在哪啊?谢谢 case WM_MOUSEMOVE: HDC hdc1; hdc1=GetDC(hwnd); POINT point; GetCursorPos(&point );// address of structure for cursor position int x=point.x; int y=point.y; TextOutA(...);
1>c:\documents and settings\杰拉德\my documents\visual studio 2008\projects\myfirst\myfirst\myfirst.cpp(88) : error C2361: “default”标签跳过“y”的初始化操作
1> c:\documents and settings\杰拉德\my documents\visual studio 2008\projects\myfirst\myfirst\myfirst.cpp(81) : 参见“y”的声明
1>c:\documents and settings\杰拉德\my documents\visual studio 2008\projects\myfirst\myfirst\myfirst.cpp(88) : error C2361: “default”标签跳过“x”的初始化操作
1> c:\documents and settings\杰拉德\my documents\visual studio 2008\projects\myfirst\myfirst\myfirst.cpp(80) : 参见“x”的声明