Page 1 of 1

Posted: Wed Sep 05, 2001 11:17 pm
by BackupUser
Restored from previous forum. Originally posted by Franco.

Can anybody tell me why this not works? Is something missing?

Structure pt
x.l
y.l
EndStructure

Dim Cursor.pt(8)
GetCursorPos_(Cursor)
xPos$=str(Cursor(0)\x)
yPos$=str(Cursor(4)\y)

MessageRequester("Cursor Position:",xPos$ + " , " + yPos$, 0)




Have a nice day...
Franco

Posted: Wed Sep 05, 2001 11:50 pm
by BackupUser
Restored from previous forum. Originally posted by Mr.Skunk.

Here it is a correction:

Structure pt
x.l
y.l
EndStructure

Cursor.pt
GetCursorPos_(Cursor)
xPos$=str(Cursor\x)
yPos$=str(Cursor\y)

MessageRequester("Cursor Position:",xPos$ + " , " + yPos$, 0)

You don't have to create an array as in your structure x.l and y.l are Long numbers (4 bytes), the space to store the values is already reserved.

Mr Skunk

Mr Skunk's PureBasic Web Page
http://www.skunknet.fr.st

Posted: Thu Sep 06, 2001 6:05 pm
by BackupUser
Restored from previous forum. Originally posted by blueb.

Thanks Mr. Skunk

I was unsure of how to use WinAPI structures
and this helped clear that up.

Regards,
Bob

Posted: Fri Sep 07, 2001 5:39 pm
by BackupUser
Restored from previous forum. Originally posted by Franco.

Thanks a lot Mr. Skunk, that works fine.
I appreciate it very much.




Have a nice day...
Franco