Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Command Bars
  New Posts New Posts RSS Feed - Assert :-(
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Assert :-(

 Post Reply Post Reply
Author
Message
Simon HB9DRV View Drop Down
Senior Member
Senior Member
Avatar

Joined: 07 July 2005
Location: Switzerland
Status: Offline
Points: 458
Post Options Post Options   Thanks (0) Thanks(0)   Quote Simon HB9DRV Quote  Post ReplyReply Direct Link To This Post Topic: Assert :-(
    Posted: 19 April 2007 at 3:22am

void CXTPToolBar::EnableDocking(DWORD dwFlags)
{
    ASSERT(m_pCommandBars);
    m_dwFlags = dwFlags;
}

Why the ASSERT on the second line? This is annoying when I am just using a data member of type CXTPToolBar in a dialog.
 
My code is below.
VERIFY(m_wndToolBar.CreateToolBar(WS_TABSTOP|WS_VISIBLE|WS_CHILD|CBRS_TOOLTIPS, this));
VERIFY(m_wndToolBar.LoadToolBar(IDR_SAT_TRACK_DEFNS));
m_wndToolBar.ShowTextBelowIcons(TRUE);
m_wndToolBar.EnableDocking(xtpFlagAlignTop | xtpFlagHideWrap | xtpFlagStretched);
Simon HB9DRV
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: 19 April 2007 at 4:49am
Hi,
EnableDocking can be used only if you asign some CommandBars.
 
You need create CommandBars object and assign it for toolbar. use search for forum, there was some samples.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
Simon HB9DRV View Drop Down
Senior Member
Senior Member
Avatar

Joined: 07 July 2005
Location: Switzerland
Status: Offline
Points: 458
Post Options Post Options   Thanks (0) Thanks(0)   Quote Simon HB9DRV Quote  Post ReplyReply Direct Link To This Post Posted: 19 April 2007 at 4:56am
Originally posted by oleg oleg wrote:

Hi,
EnableDocking can be used only if you asign some CommandBars.
 
You need create CommandBars object and assign it for toolbar. use search for forum, there was some samples.
But in my case I am using xtpFlagHideWrap and xtpFlagStretched via EnableDocking, this works well, these flags can be applied without a CommandBars object.
 
I can't remember why I don't use a CommandBars object -  the dialog is a child of a tab control.
Simon HB9DRV
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.