08. februar 2001 - 11:41Der er
3 kommentarer og 1 løsning
change mouse position in visual c++
hvordan flytter man musens position, ved klik på en button på skærmen med musen?? Skal fx. flyttes til et andet x,y punkt som er defineret. Helst en lille demo af programmet, hvis det er muligt, jeg er helt nybegynder, tak.
Hvis nu ellers jeg kunne stave ville det måske hjælpe dig .....
Functionen hedder SetCursorPos()
FRA MSDN :
The SetCursorPos function moves the cursor to the specified screen coordinates. If the new coordinates are not within the screen rectangle set by the most recent ClipCursor function call, the system automatically adjusts the coordinates so that the cursor stays within the rectangle.
BOOL SetCursorPos( int X, // horizontal position int Y // vertical position ); 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 Values 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.
Håber du har fået dine point...jeg accepteret ihvertfald dit svar, Tak
Synes godt om
Ny brugerNybegynder
Din løsning...
Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.