C++, send keystroke to background window without focusing it
$10-30 USD
Paid on delivery
I'm building a complex software. This software works as a dll inside another random third party softwares. Usually the third party software catches the VK_SPACE key from the dll's window, when the lastest has the focus.
However my *.dll supports multiple windows which aren't inside the main window. It means when one of such secondary windows are focused, the third party software doesn't detect the VK_SPACE.
So, I want to emulate the VK_SPACE in the main window when it's pressed on one of the secondaries ones without moving the keyboard focus.
As data I only have the HWND of all the dll windows (including the main one).
I tried to use PostMessage, SendMessage to the HWND of the main window without sucess. However, changing temporally the focus to the main window, using SendInput or keybd_event, and then returning the focus, DOES work. But I do not want to move the focus, right?
So, your job is quite simple. You need to to the same job that keybd_event does to send the VK_SPACE to another window which is not focused.
A function like this:
void sendSpacebar(HWND target)
{
//.... do your stuff....
// .... Func(HWND, VK_SPACE, paramx, paramy);
}
Your job is just that function.
NOTE: Using third party libraries are NOT allowed, just std, or basics like windows.h
Project ID: #18197850
About the project
1 freelancer is bidding on average $45 for this job
Thanks for share the project. I can provide to you a exe example before to choose me. If you approves we can disccuss the final goal.