Home > database >  Pb GetCursorPos function called take the mouse coordinates
Pb GetCursorPos function called take the mouse coordinates

Time:09-25

The Function ulong GetCursorPos (ref POINTAPI lpPoint) LIBRARY 'user32. DLL'
I define a POINTAPI structure, and declared a global variable (POINTAPI lpPoint1), but when the call GetCursorPos (lpPoint1), there was an error: the type of actual parameter always be ancestor of formal reference parameter type, please advice

CodePudding user response:

Pay attention to two points:

POINTAPI structure of 1, the statement is correct (for more information, you can check the MSDN)

2, should be used when calling: GetCursorPos (ref lpPoint1)

CodePudding user response:

Should be your pointapi this structure has a problem of the definition of

Type point from structure
Long xpos
Long ypos
End type

CodePudding user response:

Well, is the parameter structure problem

CodePudding user response:

No problem, the first floor said I do, just structure inserted in the inside of the insert

CodePudding user response:

learning

CodePudding user response:

BOOL GetCursorPos (LPPOlNT IpPoint)
This function is not uLong, are you?
  • Related