Print Page | Close Window

CXTPToolBar: how to disable multiline align style

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Toolkit Pro
Forum Description: Topics Related to Codejock Toolkit Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=17800
Printed Date: 19 June 2025 at 3:47pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: CXTPToolBar: how to disable multiline align style
Posted By: lovelypp
Subject: CXTPToolBar: how to disable multiline align style
Date Posted: 21 January 2011 at 11:34am

when the horizontal size is too small, the toolbar aligns itself into two lines, just as the following:

I have two question here:
1.  how to disable the multiline align style ? so that the toolbar always aligns itself into one line?
2. because there are six video window totally, when user clicks one window,  how to set the backcolor of the corresponding toolbar ? (or focus the corresponding toolbar) so that the user can know which video window is activated obviously.
 
thanks!



Replies:
Posted By: Oleg
Date Posted: 25 January 2011 at 7:20am
Hi,

You manually call CalcDockingLayout ? Add LM_HIDEWRAP then.


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: lovelypp
Date Posted: 26 January 2011 at 11:09pm
No, I did not call CalcDockingLayout at all.
the toolbar just  aligns to two lines automatically when the window size changes.
is there any option that can disable the auto alignment (and force it in one line)?
 
thanks!


Posted By: Oleg
Date Posted: 27 January 2011 at 3:41am
Maybe you call EnableDocking + xtpFlagWrapRow then ?

-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: lovelypp
Date Posted: 27 January 2011 at 8:17am
my code is as following:
int CVidFrameWnd::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
     if (CXTPFrameWnd::OnCreate(lpCreateStruct) == -1)
          return -1;

     if (!InitCommandBars())
           return -1;

     CXTPCommandBars* pCommandBars = GetCommandBars();
     pCommandBars->GetCommandBarsOptions()->bShowExpandButtonAlways = FALSE;

     // Create ToolBar
     m_wndToolBar = (CXTPToolBar *)pCommandBars->Add(_T("Video Toolbar"), xtpBarTop);
     if(!m_wndToolBar || !m_wndToolBar->LoadToolBar(IDR_TOOLBAR_VIDEO))
     {
          TRACE0("Failed to create video toolbar\n");
          return -1;
     }

     ......
     m_wndToolBar->SetFlags(xtpFlagStretched);

     ...... 

     return 0;
}
I did not set xtpFlagWrapRow flag, and if I use:
m_wndToolBar->SetFlags(xtpFlagStretched, xtpFalgWrapRow);
the toobar still aligns into two rows if the horizon space is two small.
any other hints ? thanks!


Posted By: lovelypp
Date Posted: 27 January 2011 at 9:08am
Big smileI added the following line:
 m_wndToolBar->EnableDocking(xtpFlagHideWrap);
 
now it looks as following:
it works!
greate and thanks !
 
now my second question: when there are many video windows, when the user click one, how to setbkcolor of the toolbar or highlight the toolbar to show the active window ?
 


Posted By: lovelypp
Date Posted: 02 February 2011 at 9:17pm
any help ?
implement a custom draw manager ? how ?
 
thanks!



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