Home > database >  The GetCursorPos function call problems
The GetCursorPos function call problems

Time:09-29

The Function ulong GetCursorPos (ref POINTAPI lpPoint) LIBRARY 'user32. DLL'
I defined 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,
And, I am also in the insert into the named pointapi structure and its parameters for long x, long y

CodePudding user response:

Lzp_lrp eldest brother has been in the post back to you, I have just tested the whole can be so:

1, the structure is defined like this:

Global type pointapi from structure
Long x
Long y
End type

2, refer to this:

Pointapi lppoint1
The GetCursorPos (ref lpPoint1)

/* test
Messagebox (' ', a string (lpPoint1. X) + ":" + string (lpPoint1. Y))
*/

Test results are data suggest.

CodePudding user response:

I am using pb7.0, unable to define your own structure, you use what version of the "" "?????

CodePudding user response:

? ! Won't you?
Define global structure, try: new - & gt; Pb Object - & gt; Structure
Define objects (such as Windows) structure to try:
1, open the window object in PB,
2, click on the view menu - & gt; Structure list
3, in the open Structure list tags, right-click in the pop-up menu, select Add
4 when can define structure. After the completion of the save name is pointapi.

Quote as above the second floor.
  • Related