Print Page | Close Window

ToolBar in CPropertyPage

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


Topic: ToolBar in CPropertyPage
Posted By: simus
Subject: ToolBar in CPropertyPage
Date Posted: 13 February 2007 at 4:15am

Hi,

I am searching a way to put a CXTPToolBar in a CPropertyPage and I am facing some problems.

I attached a simple example of what is the problem.

To sum up:

I have a CPropertySheet with 1 CPropertyPage, in the CPropertyPage I call CreateToolBar to create the Toolbar then I call LoadToolBar to load the buttons and finally place the toolbar where I want.

What I see is an empty toolbar with no buttons

The code involved is in MyPPage.cpp method OnInitDialog

Please can someone help me on that I really need the great CXTPToolBar functionnalities instead of standard CToolbar.

Thanks a lot

https://forum.codejock.com/uploads/20070213_041426_ToolBarInPPageW.zip - uploads/20070213_041426_ToolBarInPPageW.zip



Replies:
Posted By: Oleg
Date Posted: 13 February 2007 at 7:34am
Hi,
Add this:
 

CSize sz = m_wndToolBar.CalcDockingLayout(rect.Width(), LM_HIDEWRAP| LM_HORZDOCK|LM_HORZ | LM_COMMIT);

m_wndToolBar.SetWindowPos( NULL,

0,

0,

rect.Width(),

sz.cy,

SWP_NOZORDER|SWP_NOMOVE|SWP_SHOWWINDOW);



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


Posted By: simus
Date Posted: 13 February 2007 at 8:03am
You definitely are THE guy.
 
It's my mistake, I should have search a little bit more.
 
Many thanks for your work and time



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