Skip to main content
GameDev.net gamedev.net
🔒 Locked

SendInput

Started by Spark Jul 5, 2000 at 4:43 PM 1 replies 450+ views
Original Post
Spark
Spark
Hello, I''m trying to simulate mouse clicks using the SendInput function, but I can''t get it working. Can anyone please show me an example of using the SendInput function? // Spark
tcs
tcs
Hmmm... you are using VB, right ? Maybe you should mention this !
As far as I know, this isn''t possible. But there are win32 api functions that can acomplish this task.

Have you read "Appleman32" ? It''s a must-have book for EVERY VB coder that has such win32 related questions...

Tim

--------------------------
www.gamedev.net/hosted/glvelocity
glvelocity.gamedev.net
www.glvelocity.com
Tim--------------------------glvelocity.gamedev.netwww.gamedev.net/hosted/glvelocity
win32mfc
win32mfc
You can do it with the Win32 PostMessage() API call. You just need to get a window handle (hWnd in code below). If you're using VB, you can grab the declaration for PostMessage() from the API Viewer utility.

// CHRIS

        
// Example

PostMessage(hWnd, WM_LBUTTONDOWN, 0 ,0);
PostMessage(hWnd, WM_LBUTTONUP, 0, 0);




Edited by - win32mfc on July 7, 2000 11:05:13 PM
// CHRIS [win32mfc]

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.