Print Page | Close Window

Cannot disabl context menu via EnableContextMenu

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Toolkit Pro
Forum Description: Topics Related to Codejock Toolkit Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=6603
Printed Date: 13 July 2025 at 3:57pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Cannot disabl context menu via EnableContextMenu
Posted By: cjsnewbie
Subject: Cannot disabl context menu via EnableContextMenu
Date 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?






Replies:
Posted By: kstowell
Date 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


Posted By: cjsnewbie
Date Posted: 09 March 2007 at 12:33pm
Thanks a lot. Good that you fixing it for next release. I appreciate your prompt reply.



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net