Print Page | Close Window

Docking pane edit commands

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Docking Pane
Forum Description: Topics Related to Codejock Docking Pane
URL: http://forum.codejock.com/forum_posts.asp?TID=10009
Printed Date: 12 December 2024 at 7:55pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Docking pane edit commands
Posted By: desrupali
Subject: Docking pane edit commands
Date Posted: 31 March 2008 at 1:55am
Hi,
 
I am using docking pane embedded CEditView in it.
In this dockable window Edit shortcut keys like Ctrl+C/Ctrl+V/Ctrl+X/Ctrl+Z do not work. Thses shortcuts are necessary to work.
 
The same issue you will find in your dymamic panes sample.
How to resolve this issue?
 
Thanks in advance.
 



Replies:
Posted By: znakeeye
Date Posted: 31 March 2008 at 2:39am

If the view is active (you need to call SetActiveView), it should work automatically. Otherwise, I think you need to explicitly call OnCmdMsg. See the MFC documentation for details regarding this function.

I did this in my application where I have no active view:
 
BOOL CMyFrame::OnCmdMsg(...)
{
     CWnd *pWnd = m_paneManager.GetActivePaneWindow();
     if (pWnd && pWnd->OnCmdMsg(...))
         return TRUE;
 
     return CFrameWnd::OnCmdMsg(...);
}
 
If you don't do that, the WM_KEYDOWN-message will not be propagated to your pane!


Posted By: desrupali
Date Posted: 31 March 2008 at 3:31am
Hi,
 
Thanks for the reply.
But your solution does not work.
I get stack overflow message if I handle OnCmdMsg.
 
 
Can you send me sample with the resolution?
 
Thanks in advance.


Posted By: desrupali
Date Posted: 01 April 2008 at 11:06am

Hi,

What happened next?

We have bought the product and using it.

So please give us support for these kind of bugs.


Posted By: Oleg
Date Posted: 01 April 2008 at 12:55pm
Hi,
 
It was right suggestion.
 
Add in our sample this code:
 
BOOL CMainFrame::OnCmdMsg(UINT nID, int nCode, void* pExtra, AFX_CMDHANDLERINFO* pHandlerInfo)
{
 CXTPDockingPane* pPane = m_paneManager.GetActivePane();
 CWnd* pWnd = pPane ? pPane->GetChild() : 0;
 
 if (pWnd && pWnd->OnCmdMsg(nID, nCode, pExtra, pHandlerInfo))
  return TRUE; 
 return CFrameWnd::OnCmdMsg(nID, nCode, pExtra, pHandlerInfo);
}
and it will work.


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net