![]()  | 
 
Docking pane edit commands | 
 
    Post Reply  
   | 
  
| Author | |
   
   desrupali  
   
   Newbie  
   Joined: 26 March 2008 Status: Offline Points: 8  | 
  
   
      Post Options
    
        Thanks(0)
      Quote   Reply
   
     Topic: Docking pane edit commandsPosted: 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. 
 | 
 |
![]()  | 
 |
   
   znakeeye  
   
   Senior Member  
   Joined: 26 July 2006 Status: Offline Points: 1672  | 
  
   
      Post Options
    
        Thanks(0)
      Quote   Reply
   
     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! 
    | 
 |
![]()  | 
 |
   
   desrupali  
   
   Newbie  
   Joined: 26 March 2008 Status: Offline Points: 8  | 
  
   
      Post Options
    
        Thanks(0)
      Quote   Reply
   
     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. 
    | 
 |
![]()  | 
 |
   
   desrupali  
   
   Newbie  
   Joined: 26 March 2008 Status: Offline Points: 8  | 
  
   
      Post Options
    
        Thanks(0)
      Quote   Reply
   
     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. 
    | 
 |
![]()  | 
 |
   
   Oleg  
   
   Senior Member  
   Joined: 21 May 2003 Location: United States Status: Offline Points: 11234  | 
  
   
      Post Options
    
        Thanks(0)
      Quote   Reply
   
     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  | 
 |
![]()  | 
 |
    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  |