Ciao a tutti!!
come faccio a sapere le coordinate del mouse...
Vorrei sapere se esiste qualche API oppure una qualche normale funzione...
ciao ciao e grazie!!
Ciao a tutti!!
come faccio a sapere le coordinate del mouse...
Vorrei sapere se esiste qualche API oppure una qualche normale funzione...
ciao ciao e grazie!!
"Penso che nel mondo ci sia mercato per quattro o cinque computer"... Thomas Watson, presidente della IBM, 1943
Beh ci sono le API di Windows....
Windows Xp
[Java]
[PHP]Notepad++
[Fortran90-77] elf90 g77
[C++ /WinAPI] DevC++ VisualC++
Si lo sò che è cn le api...
Ma Quale?
"Penso che nel mondo ci sia mercato per quattro o cinque computer"... Thomas Watson, presidente della IBM, 1943
Ma stai programmando con le API di windows?
Windows Xp
[Java]
[PHP]Notepad++
[Fortran90-77] elf90 g77
[C++ /WinAPI] DevC++ VisualC++
Si...
Infatti includo la windows.h...
"Penso che nel mondo ci sia mercato per quattro o cinque computer"... Thomas Watson, presidente della IBM, 1943
Allora quando nella windowProcedure gestisci l'evento del mouse, le sue coordinate ti sono passate attraverso lParam:
codice:x = LOWORD (lParam) ; y = HIWORD (lParam) ;
Windows Xp
[Java]
[PHP]Notepad++
[Fortran90-77] elf90 g77
[C++ /WinAPI] DevC++ VisualC++
Grazie cmq ho risolto usando l'api getCursorPos..
ciao ciao
"Penso che nel mondo ci sia mercato per quattro o cinque computer"... Thomas Watson, presidente della IBM, 1943
e per spostare il puntatore ad una data posizione ?
codice:Syntax BOOL SetCursorPos( int X, int Y ); Parameters X [in] Specifies the new x-coordinate of the cursor, in screen coordinates. Y [in] Specifies the new y-coordinate of the cursor, in screen coordinates. Return Value If the function succeeds, the return value is nonzero. If the function fails, the return value is zero. To get extended error information, call GetLastError. Remarks The cursor is a shared resource. A window should move the cursor only when the cursor is in its client area. The calling process must have WINSTA_WRITEATTRIBUTES access to the window station.
Windows Xp
[Java]
[PHP]Notepad++
[Fortran90-77] elf90 g77
[C++ /WinAPI] DevC++ VisualC++