Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - Dynamic creation of toolbar items
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Dynamic creation of toolbar items

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

Joined: 23 May 2004
Location: United States
Status: Offline
Points: 256
Post Options Post Options   Thanks (0) Thanks(0)   Quote Kenneth Quote  Post ReplyReply Direct Link To This Post Topic: Dynamic creation of toolbar items
    Posted: 23 May 2004 at 3:44pm

In the article how to "Add a splitter popup button...", it was mentioned that one must avoid the dynamic creation of controls if you plan on using customizable toolbars.

In that case, how does one selectively enable the display of icons/caption of some toolbar buttons and only icons on others?

In my case, I use:

 ((CXTPControlButton*)pToolBar->GetControl(0))->S etStyle(xtpButtonIconAndCaption);

to enable text display on selected icons.  However, the toolbar customization "reset" will remove the text.

 

Back to Top
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 Posted: 24 May 2004 at 1:08am

Look at GetOriginalControls() .. I use that, but I also use designer controls embeded in a resource and I alter m_pDesignerControls at startup as well.

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: 01 June 2004 at 3:51am

See CustomThemes sample:

lpCreateControl->buttonStyle = xtpButtonIconAndCaption;

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