當前位置:編程學習大全網 - 網站源碼 - C語言怎麽獲得鼠標在當前窗口的位置,像gotoxy(x, y);裏面的參數壹樣的位置

C語言怎麽獲得鼠標在當前窗口的位置,像gotoxy(x, y);裏面的參數壹樣的位置

用 API GetCursorPos(),參考:

#include?<stdio.h>

#include?<windows.h>

void?main()

{

POINT?pt;

GetCursorPos(&pt);?

printf("%ld?%ld\n",pt.x,pt.y);

}

  • 上一篇:投資字節跳動賺了多少
  • 下一篇:phpstudy裝好之後能不能放ASP的網頁代碼然後訪問
  • copyright 2024編程學習大全網