Home > Back-end >  A small game source code
A small game source code

Time:10-11

C how to read the left mouse button pressed and obtain access to the current mouse coordinates?

CodePudding user response:

API GetCursorPos

CodePudding user response:

Only C, processing WM_LBUTTONDOWN message, LPARAM parameter is the corresponding window trigger coordinates of the mouse the left key click message,
Can also use the API GetCursorPos, relevant API functions and ClientToScreen, ScreenToClient to transform coordinate system,

CodePudding user response:

WM_LBUTTONDOWN
  • Related