Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - CXTTreeCtrl & OnContextMenu
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

CXTTreeCtrl & OnContextMenu

 Post Reply Post Reply
Author
Message
jimmy View Drop Down
Senior Member
Senior Member


Joined: 11 November 2003
Location: Austria
Status: Offline
Points: 516
Post Options Post Options   Thanks (0) Thanks(0)   Quote jimmy Quote  Post ReplyReply Direct Link To This Post Topic: CXTTreeCtrl & OnContextMenu
    Posted: 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

Back to Top
jimmy View Drop Down
Senior Member
Senior Member


Joined: 11 November 2003
Location: Austria
Status: Offline
Points: 516
Post Options Post Options   Thanks (0) Thanks(0)   Quote jimmy Quote  Post ReplyReply Direct Link To This Post Posted: 09 March 2006 at 7:32am
Hello,

No answer or solution from 'Admin Group' ?

    Jimmy

Back to Top
Oleg View Drop Down
Senior Member
Senior Member


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: 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
Back to Top
jimmy View Drop Down
Senior Member
Senior Member


Joined: 11 November 2003
Location: Austria
Status: Offline
Points: 516
Post Options Post Options   Thanks (0) Thanks(0)   Quote jimmy Quote  Post ReplyReply Direct Link To This Post 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

Back to Top
jimmy View Drop Down
Senior Member
Senior Member


Joined: 11 November 2003
Location: Austria
Status: Offline
Points: 516
Post Options Post Options   Thanks (0) Thanks(0)   Quote jimmy Quote  Post ReplyReply Direct Link To This Post 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 ?????

Back to Top
jimmy View Drop Down
Senior Member
Senior Member


Joined: 11 November 2003
Location: Austria
Status: Offline
Points: 516
Post Options Post Options   Thanks (0) Thanks(0)   Quote jimmy Quote  Post ReplyReply Direct Link To This Post Posted: 09 March 2006 at 11:15am
Hello,

i use the old OnRButtonDown function, and it work correct.

Jimmy

Back to Top
Oleg View Drop Down
Senior Member
Senior Member


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: 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
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.046 seconds.