![]() |
how to add a control into the CXTPToolBar? |
Post Reply
|
| Author | |
chentob
Newbie
Joined: 25 July 2008 Location: China Status: Offline Points: 7 |
Post Options
Thanks(0)
Quote Reply
Topic: how to add a control into the CXTPToolBar?Posted: 25 July 2008 at 2:54am |
|
I want to add a CStatic or CCombobox control into the CXTPToolBar.but I failed. It is ok when using CToolBar .
My code following:
CStatic m_static;
CXTPToolBar* pStandardBar;
CXTPCommandBars* pCommandBars;
if (!pFrame->InitCommandBars())
return -1; pCommandBars = pFrame->GetCommandBars(); pStandardBar = (CXTPToolBar*)pCommandBars->Add(_T("Standard"), xtpBarBottom); if (!pStandardBar || !pStandardBar->LoadToolBar(IDR_TOOLBAR)) { TRACE0("Failed to create toolbar\n"); return -1; } this->m_static.Create( "test" , WS_CHILD | WS_VISIBLE | SS_CENTER | SS_CENTERIMAGE | SS_SUNKEN , rect , pStandardBar);
the static could not display "test" in Toolbar, I don't know why?Thanks
|
|
![]() |
|
Oleg
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
Posted: 28 July 2008 at 2:52am |
|
Hi,
Check \Samples\CommandBars\CommonControls sample
|
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
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 |