Keeping focus in Pane of splitter pane.

Posted on 2003-03-31
Medium Priority
Last Modified: 2013-11-20
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?


Question by:mvoiers
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions

Accepted Solution

Nosfedra earned 750 total points
ID: 8244272
Maybe this is trivial, but have you tried to set the mouse capture on the view window you want (using SetCapture)?

As for messages sent when the splitter is moved... there aren't any that I know of.
At some point, I wanted to disable the moving of the splitter, so what I did was intercepting the WM_LButtonDown and WM_MouseMove message in a class derived from CSplitterWnd and set that class as the splitter class in the application.

I was simply ignoring the messages in the overriden methods (OnLButtonDown, OnMouseMove), but you could , after calling the base class members, try to set the capture to the window you want...


Author Comment

ID: 8245694
Opps I had it backwards.  It is the mouse that works, and the keyboard arrows the stop working.  I would think that if I could spin around in the view with the mouse that the frame would have focus.  The 3D engine I am using is 3rd party(Multigen Vega Prime), so I wonder if it could be something with their code.


Featured Post

Get MongoDB database support online, now!

At Percona’s web store you can order your MongoDB database support needs in minutes. No hassles, no fuss, just pick and click. Pay online with a credit card. Handle your MongoDB database support now!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
Suggested Courses

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question