Print Page | Close Window

Positioning a CXTPToolBar next to another one

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=7648
Printed Date: 13 November 2025 at 7:59am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Positioning a CXTPToolBar next to another one
Posted By: JamesL
Subject: Positioning a CXTPToolBar next to another one
Date Posted: 23 July 2007 at 7:09pm

Hi

I am trying to position 2 toolbars horizontally next to each other when my app starts.
 
here is a code fragment:

CXTPCommandBars* pCommandBars = GetCommandBars();

// Create Standard ToolBar

CXTPToolBar* pToolBar = (CXTPToolBar*)  pCommandBars->Add(_T("Standard"), xtpBarTop);

// Create Rules ToolBar
CXTPToolBar* pToolBarRules = (CXTPToolBar*) pCommandBars->Add(_T("Rules"), xtpBarTop);
 
The 2nd toolbar gets created underneath the 1st.
so my question is how can I reposition the 2nd toolbar to the right of the 1st.
 
I have tried pToolBarRules->MoveWindow(...
and pToolBarRules->SetWindowPos(...
but they had little effect
 
thanks
James



Replies:
Posted By: JamesL
Date Posted: 23 July 2007 at 7:36pm
Ok
 
I found the answer .... so simple I just got lost in the docs and missed it.

DockRightOf(pToolBarRules,pToolBar);




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