Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - CXTPToolBar: how to disable multiline align style
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

CXTPToolBar: how to disable multiline align style

 Post Reply Post Reply
Author
Message
lovelypp View Drop Down
Groupie
Groupie


Joined: 17 January 2008
Status: Offline
Points: 34
Post Options Post Options   Thanks (0) Thanks(0)   Quote lovelypp Quote  Post ReplyReply Direct Link To This Post Topic: CXTPToolBar: how to disable multiline align style
    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!
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: 25 January 2011 at 7:20am
Hi,

You manually call CalcDockingLayout ? Add LM_HIDEWRAP then.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
lovelypp View Drop Down
Groupie
Groupie


Joined: 17 January 2008
Status: Offline
Points: 34
Post Options Post Options   Thanks (0) Thanks(0)   Quote lovelypp Quote  Post ReplyReply Direct Link To This Post 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!
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: 27 January 2011 at 3:41am
Maybe you call EnableDocking + xtpFlagWrapRow then ?
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
lovelypp View Drop Down
Groupie
Groupie


Joined: 17 January 2008
Status: Offline
Points: 34
Post Options Post Options   Thanks (0) Thanks(0)   Quote lovelypp Quote  Post ReplyReply Direct Link To This Post 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!
Back to Top
lovelypp View Drop Down
Groupie
Groupie


Joined: 17 January 2008
Status: Offline
Points: 34
Post Options Post Options   Thanks (0) Thanks(0)   Quote lovelypp Quote  Post ReplyReply Direct Link To This Post 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 ?
 
Back to Top
lovelypp View Drop Down
Groupie
Groupie


Joined: 17 January 2008
Status: Offline
Points: 34
Post Options Post Options   Thanks (0) Thanks(0)   Quote lovelypp Quote  Post ReplyReply Direct Link To This Post Posted: 02 February 2011 at 9:17pm
any help ?
implement a custom draw manager ? how ?
 
thanks!
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.031 seconds.