Keeping focus in Pane of splitter pane.
Posted on 2003-03-31
I have a CSplitterPane which is set up in CMainFrame. I have it setup as top and bottom instead of the usual left and right. The top is just a CView with the bottom being a CHTMLView. The top is a 3D graphics window in which the user can fly around in using the arrow keys to move forward, backward, and strafe and the mouse to look around by left clicking and moving the mouse. The problem happens when the user moves the splitter bar that separates the top and bottom pane. After this the arrow keys work but the mouse will not work until the user clicks the bottom pane and then the top again. I can click all I want in the top pane but the mouse will not work until the bottom is clicked and then the top. At first this seems like something else has focus but then why would the arrow keys work in the top pane? If I click the bottom pane the arrow will scroll up and down. This seems to happen other times on occasion but I haven't been able to track the exact reason down. One fix I thought of was to catch a "move splitter bar message" but I can't find that message, I thought maybe OnSize but that doesn't seem to be it.
Any way to fix this?