Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Docking Pane
  New Posts New Posts RSS Feed - Docking pane edit commands
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Docking pane edit commands

 Post Reply Post Reply
Author
Message
desrupali View Drop Down
Newbie
Newbie


Joined: 26 March 2008
Status: Offline
Points: 8
Post Options Post Options   Thanks (0) Thanks(0)   Quote desrupali Quote  Post ReplyReply Direct Link To This Post Topic: Docking pane edit commands
    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.
 
Back to Top
znakeeye View Drop Down
Senior Member
Senior Member
Avatar

Joined: 26 July 2006
Status: Offline
Points: 1672
Post Options Post Options   Thanks (0) Thanks(0)   Quote znakeeye Quote  Post ReplyReply Direct Link To This Post 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!
Back to Top
desrupali View Drop Down
Newbie
Newbie


Joined: 26 March 2008
Status: Offline
Points: 8
Post Options Post Options   Thanks (0) Thanks(0)   Quote desrupali Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
desrupali View Drop Down
Newbie
Newbie


Joined: 26 March 2008
Status: Offline
Points: 8
Post Options Post Options   Thanks (0) Thanks(0)   Quote desrupali Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.172 seconds.