Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Keeping focus in Pane of splitter pane.

Posted on 2003-03-31
2
Medium Priority
?
382 Views
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?

Thanks,

Micah
0
Comment
Question by:mvoiers
2 Comments
 
LVL 3

Accepted Solution

by:
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...

HTH,
--Razvan
0
 

Author Comment

by:mvoiers
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.

Thanks
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Introduction: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
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.
As many of you are aware about Scanpst.exe utility which is owned by Microsoft itself to repair inaccessible or damaged PST files, but the question is do you really think Scanpst.exe is capable to repair all sorts of PST related corruption issues?

564 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