Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - Why is m_bCustomizeAvail protected?
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Why is m_bCustomizeAvail protected?

 Post Reply Post Reply
Author
Message
Ark42 View Drop Down
Senior Member
Senior Member
Avatar

Joined: 20 October 2003
Status: Offline
Points: 291
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ark42 Quote  Post ReplyReply Direct Link To This Post Topic: Why is m_bCustomizeAvail protected?
    Posted: 30 August 2005 at 12:27am

I have the need to sometimes programmatically disable the ability to customize any menus, and this is the only place I have to use the "friend class hack":
    class CXTPCommandBarsFriend : public CXTPCommandBars { friend class CMainFrame; }; //allow access to protected members
    static_cast<CXTPCommandBarsFriend *>(pCommandBars)->m_bCustomizeAvail = FALSE;

Back to Top
Oleg View Drop Down
Senior Member
Senior Member


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: 30 August 2005 at 3:58am

Thanks.

EnableCustomization method added.

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