Original Post
Well I have a small and easy problem right now and I can''t seem to find any good source on how to resolve it.
My problem is that DirectInput translates all keyboard-input it gets and my program starts to run wild whenever I switch windows and things like that. I know that the solution would be to only handle input when the window is in focus(active) but as I stated earlier I can''t find any good information on how to do it(the function for it).
So what I''m searching for is simply something that will tell me if the windows is in focus or not, can anybody help me with this simple problem?