Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - Toolbar docking question
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Toolbar docking question

 Post Reply Post Reply
Author
Message
yoavo View Drop Down
Senior Member
Senior Member


Joined: 29 February 2004
Location: Israel
Status: Offline
Points: 140
Post Options Post Options   Thanks (0) Thanks(0)   Quote yoavo Quote  Post ReplyReply Direct Link To This Post Topic: Toolbar docking question
    Posted: 21 December 2005 at 7:07am

Hi,

I want the following behaviour on my application: When a toolbar is docked to the left or right, then its button will be shown with text & image. When a toolbar is docked to the top or bottom, then its button will be shown with image only.

How do I do it ?

Yoav.

Back to Top
Oleg View Drop Down
Senior Member
Senior Member


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: 21 December 2005 at 9:41am

Hi,

Try override CXTPToolbar, its CalcDockingLayout, CalcDynamicLayout

and change m_bTextBelow if dwMode & LM_VERTDOCK != 0.

Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
yoavo View Drop Down
Senior Member
Senior Member


Joined: 29 February 2004
Location: Israel
Status: Offline
Points: 140
Post Options Post Options   Thanks (0) Thanks(0)   Quote yoavo Quote  Post ReplyReply Direct Link To This Post Posted: 22 December 2005 at 12:48am
How do I create a derived CXTPToolbar ? (I create toolbars by using GetCommandBars()->Add(...) which returns a CXTPToolbar object...)
Back to Top
Oleg View Drop Down
Senior Member
Senior Member


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: 22 December 2005 at 1:34am

Hi,

add class derived from CXTPToolbar -  CMyToolBar,

add macros in it DECLARE_XTP_COMMANDBAR(CMyToolBar) (in .h)

and IMPLEMENT_XTP_COMMANDBAR(...) (in cpp)

 

add it using

GetCommandBars()->Add(..,.., RUNTIME_CLASS(CMyToolBar));

 

Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
yoavo View Drop Down
Senior Member
Senior Member


Joined: 29 February 2004
Location: Israel
Status: Offline
Points: 140
Post Options Post Options   Thanks (0) Thanks(0)   Quote yoavo Quote  Post ReplyReply Direct Link To This Post Posted: 22 December 2005 at 9:57am

thanks !!!

It works great.

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.047 seconds.