Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

How do I make a window recieve all keyboard inputs.

jedi06jedi06 Member Posts: 38
How do I make the keyboard output to a specific window?

This is what I got so far does not work.
[code]
HWND handle;
handle=FindWindow(NULL,"Name of Window In Task Bar");
//Not actual name of window.

if(EnableWindow(handle,TRUE)) //Sets the window to enabled.
cout<<"Enable window succeded"<<endl;
[/code]
I need a certain window to recieve all inputs from the keyboard until program ends.

Comments

  • happy_84khappy_84k Member Posts: 106
    : How do I make the keyboard output to a specific window?
    :
    : This is what I got so far does not work.
    : [code]
    : HWND handle;
    : handle=FindWindow(NULL,"Name of Window In Task Bar");
    : //Not actual name of window.
    :
    : if(EnableWindow(handle,TRUE)) //Sets the window to enabled.
    : cout<<"Enable window succeded"<<endl;
    : [/code]
    : I need a certain window to recieve all inputs from the keyboard until program ends.
    :

    try this:

    [code]
    ShowWindow(hWnd,SW_SHOWNORMAL);
    SetForegroundWindow(hWnd);
    [/code]
    ak

Sign In or Register to comment.