how to set toolbar associate with menu item |
Post Reply |
Author | |
Pearl
Newbie Joined: 17 September 2007 Status: Offline Points: 12 |
Post Options
Thanks(0)
Posted: 18 September 2007 at 8:12pm |
Hi
In my old MFC application, I have some code to associate the toolbars with menu items, which means, once you click the corresponding menu item, the associate toolbar will display or disappear. It's so strange, when I reskin my first MFC application, and add some CXTPToolbar, it do automatically add corresponding menu items in View Menu. But for the second application I am doing, it never works. Please help me.
Thanks in advance
Pearl
|
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hi,
Just add item with standard ID_VIEW_TOOLBAR id, CommandBars will automatically build list of toolbars.
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
Pearl
Newbie Joined: 17 September 2007 Status: Offline Points: 12 |
Post Options
Thanks(0)
|
Hi, I got a little bit confused. I add toolbar like this way:
m_wndExpressBar = (CXTPToolBar*)
pCommandBars->Add(_T("Express"), xtpBarTop); if (!m_wndExpressBar || !m_wndExpressBar->LoadToolBar(IDR_EXPRESSTOOLS)) { TRACE0("Failed to create express toolbar\n"); return -1; } IDR_EXPRESSTOOLS is resourceID for toolbar. And there is a menu resource ID - IDW_EXPRESSTOOLS which will accociate with IDR_EXPRESSTOOLS. Where I can put IDW_EXPRESSTOOLS when I add toolbar.
Thanks
|
|
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 |