Dialog in pane, handling Alt+F, etc. |
Post Reply |
Author | |
CyberSky
Groupie Joined: 15 February 2010 Status: Offline Points: 15 |
Post Options
Thanks(0)
Posted: 15 February 2010 at 5:08am |
I just started using the Xtreme Toolkit Pro (latest version 13.2.1, using VS2008 on Windows 7 64-bit) a week ago and am having a tough time replacing dialog bars with docking panes containing dialog resources. (Control messages aren't automatically sent to my program's view, etc. There are many differences and more to do than I had imagined.)
I just discovered that when any of my docking panes have focus, pressing Alt+F doesn't open the File menu, etc.
I checked the Active Pane View sample program and found the same thing there. If you click on the Options or Properties pane and they then have focus, you can press Alt+F to open the File menu. But, if you click on the Dialog pane and it has focus, Alt+F doesn't work.
Can anybody offer a hint about what I need to do to make things work as they did with dialog bars? I noticed another sample uses a splitter with a form view and am thinking maybe I need to forget about the docking panes and use that approach instead.
|
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hi,
Most easy way is to add such virtual method.
BOOL CPaneDialog::PreTranslateMessage(MSG* pMsg) { // Don't call CDialog::PreTranslateMessage to prevent eating keys. return CWnd::PreTranslateMessage(pMsg); } |
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
CyberSky
Groupie Joined: 15 February 2010 Status: Offline Points: 15 |
Post Options
Thanks(0)
|
Thank you! This reminded me that I could just grab the code from MFC's CControlBar::PreTranslateMessage() and adapt it for use in the classes for my docking panes. Works great now! |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |