![]() |
How to use "EnableContextMenus()" |
Post Reply ![]() |
Author | |
KumarCJ ![]() Groupie ![]() ![]() Joined: 02 April 2007 Location: India Status: Offline Points: 96 |
![]() ![]() ![]() ![]() ![]() Posted: 10 April 2007 at 7:58am |
Hi,
We are upgrading our application from code jock 4.2 to code jock 10.4.2.
For disabling, Context Menus, we were using following code in code jock 4.2 version of our application.
//m_wndMenuBar.EnableContextMenus(FALSE);
//m_wndToolBar.EnableContextMenus(FALSE); I had added the following code for Code jock 10.4.2.
CXTPMenuBar* pMenuBar;
CXTPToolBar* pToolBar;
.
.
.
.
//pMenuBar->EnableContextMenus(FALSE);
//pToolBar->EnableContextMenus(FALSE); How we can use "EnableContextMenus()" to enable/disable the Context Menus in code jock 10.4.2.
Please Help me out regarding this issue.
Thanks,
KumarCJ
|
|
![]() |
|
Oleg ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
Hi,
One of solution is catch WM_XTP_TOOLBARCONTEXTMENU and remove all controls from pPopup - LPARAM.
CXTPPopupBar* pPopup = (CXTPPopupBar*)lParam;
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
KumarCJ ![]() Groupie ![]() ![]() Joined: 02 April 2007 Location: India Status: Offline Points: 96 |
![]() ![]() ![]() ![]() ![]() |
Hi Oleg,
Thanks alot.
I catched "WM_XTP_TOOLBARCONTEXTMENU" and in the handler remove all controls from pPopup - LPARAM, using follwing code:
CXTPPopupBar* pPopup = (CXTPPopupBar*)lParam;
pPopup->GetControls()->RemoveAll();
Is the avobe code is the replacement for given below code for both Menu and ToolBar EnableContextMenu
//pMenuBar->EnableContextMenus(FALSE); //Menu //pToolBar->EnableContextMenus(FALSE); //ToolBar Or else for ToolBar some other code is required?
Please Confirm on this.
Waiting for your reply.
Thanks in Advance.
KumarCJ.
|
|
![]() |
|
Oleg ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
Hi,
yes, it will disable context menu for all toolbars and menus.
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
KumarCJ ![]() Groupie ![]() ![]() Joined: 02 April 2007 Location: India Status: Offline Points: 96 |
![]() ![]() ![]() ![]() ![]() |
Thanks alot Oleg for support.
|
|
![]() |
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 |