Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - ToolBar in CPropertyPage
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

ToolBar in CPropertyPage

 Post Reply Post Reply
Author
Message
simus View Drop Down
Groupie
Groupie


Joined: 08 July 2005
Status: Offline
Points: 43
Post Options Post Options   Thanks (0) Thanks(0)   Quote simus Quote  Post ReplyReply Direct Link To This Post Topic: ToolBar in CPropertyPage
    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

uploads/20070213_041426_ToolBarInPPageW.zip
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: 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
Back to Top
simus View Drop Down
Groupie
Groupie


Joined: 08 July 2005
Status: Offline
Points: 43
Post Options Post Options   Thanks (0) Thanks(0)   Quote simus Quote  Post ReplyReply Direct Link To This Post 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
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.063 seconds.