Print Page | Close Window

Toolbar custom position

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=3803
Printed Date: 03 July 2024 at 4:18am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Toolbar custom position
Posted By: Red Devil
Subject: Toolbar custom position
Date Posted: 17 March 2006 at 7:51am
Init toolbar allows standart positions top, left, rigth, bottom, etc. I desire place one toolbar in right corner, and another toolbar in left corner. Screenshot is show how i desire place the toolbars.

CToolBarInfo may help me ? I not find info about this class in help.

Image




Replies:
Posted By: Red Devil
Date Posted: 18 March 2006 at 7:51am
I solve a problem. I do :
OnCreate() {
...
    RepositionBars(AFX_IDW_CONTROLBAR_FIRST, AFX_IDW_CONTROLBAR_LAST, AFX_IDW_PANE_FIRST);
    CXTPWindowRect rect(pLBar);
    CRect rcRect;
    GetClientRect(rcRect);
    if (IsVerticalPosition(pLeftBar->GetPosition())) rect.OffsetRect(0, rect.Height());
        else rect.OffsetRect(rect.Width() + rcRect.right, 0);
    GetCommandBars()->DockCommandBar(pRightBar, rect, pLeftBar->GetDockBar());
...
}



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