Hi!
The thing is that I don't really understand how to handle the keyboard and mouse. I think this is reffered as focus or something...

My program consists of a main window containing a 3d scene. The user can open other windows that displays information about the scene and selected components of it. No of the windows is set to modal ( no window freeze the others ) or what it's called.

If the user have opened on of the additional windows, we'll call it window A and has the main window, window M, in focus there are no problem when handling keyboard and mouse input. M takes both the mouse and keyboard. But if I have A in focus and I then want to spin the scene in the M window by holding down Ctrl and drag the mouse over it, the Ctrl is catched by the A window ( which also uses it ) and only the mouse is catched by M.

Whats happeing is that when I move the mouse over to the M window and pressing Ctrl , the A window catches that and then when the mouse is dragged over the M window it can't register any Ctrl pressed... because A has already taken care of it, in the wrong way.

So I wonder if there is any way to let the Window that lies under the current position of the mouse also catch the keyboard input, or something similar? Maybe that solution would lead to some other anyoing things... like if I want to type text in a window but places the mouse pointer over another window after selecting the textfield which is supposed to be filled...

Or do I need some kind of administrator interpreting the combinations of events that is sent from the mouse and keyboard. If so, how do I implement something like that?

thanks for reading
pir