![]() |
CXTTreeCtrl & OnContextMenu |
Post Reply
|
| Author | |
jimmy
Senior Member
Joined: 11 November 2003 Location: Austria Status: Offline Points: 516 |
Post Options
Thanks(0)
Quote Reply
Topic: CXTTreeCtrl & OnContextMenuPosted: 06 March 2006 at 8:52am |
|
Hello,
Now i changed from 9.60 to 9.81. But now OnContextMenu with CXTTreeCtrl doesn't work. class CMyTreeCtrl: public CXTTreeCtrl { DECLARE_MESSAGE_MAP() afx_msg void OnContextMenu(CWnd* /*pWnd*/, CPoint /*point*/); } BEGIN_MESSAGE_MAP(CMyTreeCtrl, CXTTreeCtrl) ON_WM_CONTEXTMENU() END_MESSAGE_MAP() void CMyTreeCtrl::OnContextMenu(CWnd* /*pWnd*/, CPoint /*point*/) { ... show menu ... } Any solution ??? Jimmy |
|
![]() |
|
jimmy
Senior Member
Joined: 11 November 2003 Location: Austria Status: Offline Points: 516 |
Post Options
Thanks(0)
Quote Reply
Posted: 09 March 2006 at 7:32am |
|
Hello,
No answer or solution from 'Admin Group' ? Jimmy |
|
![]() |
|
Oleg
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
Posted: 09 March 2006 at 10:12am |
|
Microsoft confirmed that it is bug of TreeCtrl. see solution in: http://support.microsoft.com/default.aspx?scid=kb;en-us;2229 05 |
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
jimmy
Senior Member
Joined: 11 November 2003 Location: Austria Status: Offline Points: 516 |
Post Options
Thanks(0)
Quote Reply
Posted: 09 March 2006 at 10:17am |
|
Why it is a ms problem ?
With CodeJock 9.60 it work correct. But not with 9.81. We use VS 2003 Jimmy |
|
![]() |
|
jimmy
Senior Member
Joined: 11 November 2003 Location: Austria Status: Offline Points: 516 |
Post Options
Thanks(0)
Quote Reply
Posted: 09 March 2006 at 10:33am |
|
Hello,
i see. In 9.81 there are changes in void CXTTreeBase::OnRButtonDown(UINT /*nFlags*/, CPoint point) { .... // get the owner of the tree control. //HWND hWnd = m_pTreeCtrl->GetOwner()->m_hWnd; //if (::IsWindow(hWnd)) //{ // construct a NMHDR struct... //NMHDR mHDR; //mHDR.hwndFrom = m_pTreeCtrl->m_hWnd; //mHDR.code = NM_RCLICK; //mHDR.idFrom = m_pTreeCtrl->GetDlgCtrlID(); // and send a WM_NOTIFY message to our owner. //SendNotify(&mHDR); //} was now comment out. Why ????? |
|
![]() |
|
jimmy
Senior Member
Joined: 11 November 2003 Location: Austria Status: Offline Points: 516 |
Post Options
Thanks(0)
Quote Reply
Posted: 09 March 2006 at 11:15am |
|
Hello,
i use the old OnRButtonDown function, and it work correct. Jimmy |
|
![]() |
|
Oleg
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
Posted: 09 March 2006 at 3:39pm |
|
Hello, Anyway it is Microsoft related.. You can see same problem using standard CTreeCtrl. |
|
|
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 |