移动鼠标坐标显示

#include "stdio.h"

case WM_MOUSEMOVE:
  x=LOWORD(lParam);
  y=HIWORD(lParam);
  sprintf_s(str,"X的坐标%d  ",x);
  TextOut(hdc,0,0,str,strlen(str));
  sprintf_s(str,"Y的坐标%d  ",y);
  TextOut(hdc,0,20,str,strlen(str));
  break;

你可能感兴趣的:(移动)