Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - Cannot disabl context menu via EnableContextMenu
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Cannot disabl context menu via EnableContextMenu

 Post Reply Post Reply
Author
Message
cjsnewbie View Drop Down
Groupie
Groupie


Joined: 24 October 2006
Status: Offline
Points: 17
Post Options Post Options   Thanks (0) Thanks(0)   Quote cjsnewbie Quote  Post ReplyReply Direct Link To This Post Topic: Cannot disabl context menu via EnableContextMenu
    Posted: 08 March 2007 at 7:17pm
Hi,
I have one list class that is derived from CXTShellListCtrl. After creating object of this new class, I call EnableContextMenu with argument FALSE. But it's not disabling shell menu?

For exa:

Class Test : public CXTShellListCtrl
{
};

in some other function:

Test t;
t.EnableContextMenu(FALSE);

But it is not disabling ContextMenus. What's wrong? Instead it calles void CXTShellListBase::ShowShellContextMenu(CPoint point)....

How do I disable context menu?



Back to Top
kstowell View Drop Down
Admin Group
Admin Group


Joined: 25 January 2003
Location: MIchigan, USA
Status: Offline
Points: 496
Post Options Post Options   Thanks (0) Thanks(0)   Quote kstowell Quote  Post ReplyReply Direct Link To This Post Posted: 08 March 2007 at 10:06pm
Hello,
 
You can override ShowShellContextMenu in your CXTShellListCtrl derived class to disable the context menu using EnableContextMenu, for example:

class CTest : public CXTShellListCtrl
{
protected:
    virtual void ShowShellContextMenu(CPoint point)
    {
        if (m_bContextMenu)
        {
            CXTShellListCtrl::ShowShellContextMenu(point);
        }
    }
};
 
Thanks for bringing this to our attention, we have corrected problem for the next product release.
 
Regards,
 
Kirk Stowell
Codejock Software
Back to Top
cjsnewbie View Drop Down
Groupie
Groupie


Joined: 24 October 2006
Status: Offline
Points: 17
Post Options Post Options   Thanks (0) Thanks(0)   Quote cjsnewbie Quote  Post ReplyReply Direct Link To This Post Posted: 09 March 2007 at 12:33pm
Thanks a lot. Good that you fixing it for next release. I appreciate your prompt reply.
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.141 seconds.