Print Page | Close Window

Assert :-(

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Command Bars
Forum Description: Topics Related to Codejock Command Bars
URL: http://forum.codejock.com/forum_posts.asp?TID=6927
Printed Date: 08 July 2024 at 11:46am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Assert :-(
Posted By: Simon HB9DRV
Subject: Assert :-(
Date 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



Replies:
Posted By: Oleg
Date 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


Posted By: Simon HB9DRV
Date 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



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net