dcsimg
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: How to dispatch mouse movements to other windows without it being laggy

Hybrid View

  1. #1
    Join Date
    Aug 2019
    Posts
    1

    How to dispatch mouse movements to other windows without it being laggy

    Hi, so I have this program that makes a transparent window over a game window so I can make a kill-counter. However, because it is over the top of the window, I have to make sure it takes all clicks and mouse movements and sends them to the game window so I can play the actual game. Whenever I move my mouse it does send the message to the game, however the games response to the message is very laggy and is just snapping to other places instead of moving smoothly. Also, I can't even move my head left. I have done a lot of research and tried many things but nothing worked. Thanks in advance for all the help!

    Code that sends message to the game window:

    Code:
       case WM_MOUSEMOVE:
    	{
    		ShowCursor(false);
    		SetForegroundWindow(gameWnd);
    		SetCapture(gameWnd);
    		SendMessage(gameWnd, message, wParam, lParam);
    		return 0;
    	}break;

  2. #2
    Arjay's Avatar
    Arjay is offline Moderator / EX MS MVP Power Poster
    Join Date
    Aug 2004
    Posts
    13,175

    Re: How to dispatch mouse movements to other windows without it being laggy

    Try the SendInput api.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width




On-Demand Webinars (sponsored)