Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - Hide the "Customize..." item
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Hide the "Customize..." item

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


Joined: 04 September 2008
Location: United States
Status: Offline
Points: 35
Post Options Post Options   Thanks (0) Thanks(0)   Quote FrankC Quote  Post ReplyReply Direct Link To This Post Topic: Hide the "Customize..." item
    Posted: 16 October 2008 at 5:14pm

There are menu items inside the toolbar customize popup menu, “Standard” and “Customize…”.  How can I remove the “Customize…” item while keeping the “Standard” item?

 

Thanks,

Frank
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


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: 17 October 2008 at 2:30am

Just don't catch XTP_ID_CUSTOMIZE message.

Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
FrankC View Drop Down
Groupie
Groupie


Joined: 04 September 2008
Location: United States
Status: Offline
Points: 35
Post Options Post Options   Thanks (0) Thanks(0)   Quote FrankC Quote  Post ReplyReply Direct Link To This Post Posted: 17 October 2008 at 9:41am
I tried not catching XTP_ID_CUSTOMIZE, while this caused both the Standard and Customize... items disenabled.  While what is required is to  keep the Standard enabled while remove the Customize item.
 
Thanks,
Frank
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


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: 20 October 2008 at 6:43am
Hi,
 
Its not easy :(
See GetAddOrRemovePopup method. You can create class derived from CXTPCommandBars and override this method.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
FrankC View Drop Down
Groupie
Groupie


Joined: 04 September 2008
Location: United States
Status: Offline
Points: 35
Post Options Post Options   Thanks (0) Thanks(0)   Quote FrankC Quote  Post ReplyReply Direct Link To This Post Posted: 20 October 2008 at 10:09am
Thanks Oleg.
 
I got following idea from you other postings, and it works.
 
void CMainFrame::OnUpdateCustomize(CCmdUI* pCmdUI)
{
      CXTPPopupBar* pPopupBar = (CXTPPopupBar*)pCmdUI->m_pOther;
      if(pPopupBar)
     {
          CXTPControl* pControl = pPopupBar->GetControl(1);
          if(pControl)
          pControl->SetVisible(FALSE);
          return;
     }
}
 
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


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: 21 October 2008 at 2:11am
Right :) Forgot about this method :)
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.031 seconds.