![]() |
Command Bar on Dialog program... |
Post Reply ![]() |
Author | |
rokky05 ![]() Groupie ![]() Joined: 04 February 2008 Location: Ukraine Status: Offline Points: 18 |
![]() ![]() ![]() ![]() ![]() Posted: 30 April 2008 at 6:53am |
Hi, I need display CommandBar with ComboBox on Dialog program (not MDI), you can prompt how to do it?
I do so: (in function OnInitDialog())
// Get a pointer to the command bars object. CXTPCommandBars* pCommandBars = NULL; // here mast be pointer on command bars object but dialog does not have command bar... if(pCommandBars == NULL) { TRACE0("Failed to create command bars object.\n"); return -1; // fail to create } // Set Office 2003 Theme CXTPPaintManager::SetTheme(xtpThemeOffice2003); CXTPToolBar* pToolBarCombo = pCommandBars->Add(_T("Combo"), xtpBarTop); pToolBarCombo->SetBarID(IDR_MAINFRAME + 3); pToolBarCombo->GetControls()->Add(xtpControlLabel, 0)->SetCaption(_T("My ComboBox:")); CXTPControlComboBox* pControlCombo = (CXTPControlComboBox*)pToolBarCombo->GetControls()->Add(xtpControlComboBox, ID_FILE_NEW); pControlCombo->SetDropDownListStyle(); pControlCombo->SetEditText(L"My ComboBox"); pControlCombo->AddString(L"First"); pControlCombo->AddString(L"Second"); |
|
![]() |
|
Oleg ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
Hi,
Please start from DialogSample in CommandBars folder.
|
|
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 |