![]() |
ToolBar in CPropertyPage |
Post Reply
|
| Author | |
simus
Groupie
Joined: 08 July 2005 Status: Offline Points: 43 |
Post Options
Thanks(0)
Quote Reply
Topic: ToolBar in CPropertyPagePosted: 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 uploads/20070213_041426_ToolBarInPPageW.zip |
|
![]() |
|
Oleg
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
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 |
|
![]() |
|
simus
Groupie
Joined: 08 July 2005 Status: Offline Points: 43 |
Post Options
Thanks(0)
Quote Reply
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
|
|
![]() |
|
Post Reply
|
|
|
Tweet
|
| Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |