Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Command Bars
  New Posts New Posts RSS Feed - How to disable a CXTPMenuBar?
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

How to disable a CXTPMenuBar?

 Post Reply Post Reply
Author
Message
nicros View Drop Down
Newbie
Newbie


Joined: 12 May 2005
Status: Offline
Points: 8
Post Options Post Options   Thanks (0) Thanks(0)   Quote nicros Quote  Post ReplyReply Direct Link To This Post Topic: How to disable a CXTPMenuBar?
    Posted: 15 August 2005 at 4:09pm
I have a CXTPMenuBar, and I would like to disable (grey out) everything on it while a process is active.

I have not figured out how to do it though, any suggestions?

Thanks
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: 16 August 2005 at 2:41am

pMenuBar->GetControls();

pMenuBar->GetControl(i)->SetEnabled(FALSE);

Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
nicros View Drop Down
Newbie
Newbie


Joined: 12 May 2005
Status: Offline
Points: 8
Post Options Post Options   Thanks (0) Thanks(0)   Quote nicros Quote  Post ReplyReply Direct Link To This Post Posted: 16 August 2005 at 9:58am
Thanks Oleg.

I already tried this, there are two problems:
1.  It inactivates each item in the menu bar rather than the bar itself... there is no way (like in a toolbar) to disable the whole thing?

2.  This command only greys out the item at GetControl(i) if I click on it.  I have tried all kinds of controls, and all kinds of redrawing, no luck so far.

Thanks
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 August 2005 at 8:11am

Also additinally try pMenuBar->EnableWindow(FALSE);

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.141 seconds.