![]()  | 
 
How can capture MDI Tab LBUTTONDBCLK | 
 
    Post Reply  
   | 
  
| Author | |
   
   zhou_wz  
   
   Groupie  
   Joined: 11 December 2003 Status: Offline Points: 44  | 
  
   
      Post Options
    
        Thanks(0)
      Quote   Reply
   
     Topic: How can capture MDI Tab LBUTTONDBCLKPosted: 12 November 2004 at 10:47pm  | 
 
| 
   
    I capture left button double click in TabMouseMsg() to close currenct view as samples do on RBUTTONDOWN to create a popup menu on MDITab but it doesnt work! I use XTP 8.70 I check the code and find LBUTTONDBCLK is the same position as RBUTTONDOWN, but why can't i catch LBUTTONDBCLK as sample does in MainFrm.cpp  | 
 |
![]()  | 
 |
   
   Oleg  
   
   Senior Member  
   Joined: 21 May 2003 Location: United States Status: Offline Points: 11234  | 
  
   
      Post Options
    
        Thanks(0)
      Quote   Reply
   
     Posted: 16 November 2004 at 3:46am | 
 
| 
   
    ON_MESSAGE(WM_XTP_PRETRANSLATEMOUSEMSG, OnTabbarMouseMsg) LRESULT CMainFrame::OnTabbarMouseMsg(WPARAM wParam,LPARAM lParam) if (wParam == WM_LBUTTONDBCLK) { ... return TRUE; return FALSE }  | 
 |
| 
   
     
     Oleg, Support Team 
   
  CODEJOCK SOFTWARE SOLUTIONS  | 
 |
![]()  | 
 |
   
   zhou_wz  
   
   Groupie  
   Joined: 11 December 2003 Status: Offline Points: 44  | 
  
   
      Post Options
    
        Thanks(0)
      Quote   Reply
   
     Posted: 16 November 2004 at 7:07pm | 
 
| 
   
    
   I had done that before I asked here! 
   
  Actually, I wrote as LRESULT CMainFrame::OnTabbarMouseMsg(WPARAM wParam,LPARAM lParam) if (wParam == WM_LBUTTONDBCLK) { return TRUE; Even in your mditab sample, i just add a branch do deal WM_LBUTTONDBCLK, it doesn't work too! I try another message WM_LBUTTONDOWN, it can be captured in ON_MESSAGE(WM_XTP_PRETRANSLATEMOUSEMSG, OnTabbarMouseMsg) Why this happens?  | 
 |
![]()  | 
 |
   
   Oleg  
   
   Senior Member  
   Joined: 21 May 2003 Location: United States Status: Offline Points: 11234  | 
  
   
      Post Options
    
        Thanks(0)
      Quote   Reply
   
     Posted: 16 November 2004 at 11:55pm | 
 
| 
   
    ok, you catch me, I didn't test it. :) You need to patch source code to make it work. Find AfxRegisterWndClass(0, LoadCursor(0, IDC_ARROW) in XTPTabClientWnd.cpp and replace it to AfxRegisterWndClass(CS_DBLCLKS, LoadCursor(0, IDC_ARROW) 
 
  | 
 |
| 
   
     
     Oleg, Support Team 
   
  CODEJOCK SOFTWARE SOLUTIONS  | 
 |
![]()  | 
 |
   
   zhou_wz  
   
   Groupie  
   Joined: 11 December 2003 Status: Offline Points: 44  | 
  
   
      Post Options
    
        Thanks(0)
      Quote   Reply
   
     Posted: 18 November 2004 at 7:37am | 
 
   
   ![]() It proved that you didnt't try your solution before you replied:) You are so kind:) THanks a lot ! I'll try it  | 
 |
![]()  | 
 |
   
   zhou_wz  
   
   Groupie  
   Joined: 11 December 2003 Status: Offline Points: 44  | 
  
   
      Post Options
    
        Thanks(0)
      Quote   Reply
   
     Posted: 18 November 2004 at 6:01pm | 
 
| 
   
    
   Sorry Oleg, I tried as you told! 
   
  But nothing changed! ![]() And I checked MSDN, AfxRegisterWndClass(0, LoadCursor(0, IDC_ARROW) if the first input parameter is NULL, that means the style is CS_DBLCLKS! Is this the solution for my question after testing?  | 
 |
![]()  | 
 |
   
   Oleg  
   
   Senior Member  
   Joined: 21 May 2003 Location: United States Status: Offline Points: 11234  | 
  
   
      Post Options
    
        Thanks(0)
      Quote   Reply
   
     Posted: 18 November 2004 at 11:30pm | 
 
| 
   
    
   Yes, I tested it. Be sure you rebuild dll and _use it_ (may be you need to copy it in debug folder)
    
   
   | 
 |
| 
   
     
     Oleg, Support Team 
   
  CODEJOCK SOFTWARE SOLUTIONS  | 
 |
![]()  | 
 |
   
   zhou_wz  
   
   Groupie  
   Joined: 11 December 2003 Status: Offline Points: 44  | 
  
   
      Post Options
    
        Thanks(0)
      Quote   Reply
   
     Posted: 20 November 2004 at 3:34am | 
 
| 
   
    
   oleg! 
   
  I failed! I did what you said! I replaced 0->CS_DBCLKS in XTPClientWnd.cpp's Addworkspace(); But i must emphasized I used XTP8.7! We used different version or you patch more than the only file!  | 
 |
![]()  | 
 |
   
   Oleg  
   
   Senior Member  
   Joined: 21 May 2003 Location: United States Status: Offline Points: 11234  | 
  
   
      Post Options
    
        Thanks(0)
      Quote   Reply
   
     Posted: 22 November 2004 at 2:29am | 
 
| 
   
    Hmm. I think you have EnableGroups option enabled do you have VERIFY(m_MTIClientWnd.Attach(this)); or VERIFY(m_MTIClientWnd.Attach(this, TRUE));  | 
 |
| 
   
     
     Oleg, Support Team 
   
  CODEJOCK SOFTWARE SOLUTIONS  | 
 |
![]()  | 
 |
   
   zhou_wz  
   
   Groupie  
   Joined: 11 December 2003 Status: Offline Points: 44  | 
  
   
      Post Options
    
        Thanks(0)
      Quote   Reply
   
     Posted: 23 November 2004 at 4:50am | 
 
| 
   
    
   Thanks oleg! 
   
  I solve it! Now, I disable Groups Option on MTIClientWnd like this, as you said! m_MTIClientWnd.Attach(this)// I had used m_MTIClientWnd.Attach(this, TRUE), so can't capture &nbs p; &nbs p; &nbs p; &nbs p; // the double clicks on MDITab Now It works! And why this happens? Why groups enable, The WM_LBUTTONDBCLK is missed!  | 
 |
![]()  | 
 |
   
   Oleg  
   
   Senior Member  
   Joined: 21 May 2003 Location: United States Status: Offline Points: 11234  | 
  
   
      Post Options
    
        Thanks(0)
      Quote   Reply
   
     Posted: 24 November 2004 at 12:04am | 
 
| 
   
    If groups enabled, MDIClient has no CS_DBLCLICK style. to fix it for groups add: SetClassLong(m_MTIClientWnd.GetSafeHwnd(), GCL_STYLE, GetClassLong(m_MTIClientWnd.GetSafeHwnd(), GCL_STYLE) | CS_DBLCLKS);  | 
 |
| 
   
     
     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  |