   recieving input while window not active?
  im using case WM_KEYDOWN:in my windows procedure to accept input from the keyboard but i stop recieving input when the window is not active or when i dont have a window how do i still recieve a window message when i have no active window? or is there another form of input i should use?   
AttachThreadInput with GetFocus or GetForegroundWindow.   ;  thanks! anyone have any tips on searching the msdn? i can never seem to find what i want lol and feel stupid asking these questions all the time   ;  Honestly, the key is becoming familiar with the Win32 API. You'll get a feel for how functions are named, and which functions are related to which other functions (at the bottom of every function page you'll see a list of related concepts/keywords/APIs). Then you can just use Google for your "starting point" and click around from there. For instance, I found the information you needed in a few minutes by starting with a Google search for "SetFocus."   ;  ok i tried thisif(foregroundid!=GetWindowThreadProcessId(GetForegroundWindow(),NULL)){foregroundid = GetWindowThreadProcessId(GetForegroundWindow(),NULL);AttachThreadInput(foregroundid, ourid, true);}i also tried replacing foregroundid and ourid i get ourid through GetCurrentThreadId()and i get foreground id withGetWindowThreadProcessId(GetForegroundWindow(),NULL);couldnt ge tit to work :S   ;  I'm just going to hazard a guess here but, you never created a window, did you? That's not a problem of itself, but you must start a message pump or your application a.) will not create a thread for the message queue, and b.) will not process messages that should have been sent to it.Show your code in context. (I'm off to bed, though, so you're on your own for about 16 hours - I have to work, too!)   ;  yes i created a window :P   ;  ok i got it to work i needed to use GetKeyboardState to retrieve the status of the keyboard :)   