How to create Combobox o Tololbar? |
Post Reply |
Author | |
prashant
Senior Member Joined: 19 February 2007 Location: India Status: Offline Points: 165 |
Post Options
Thanks(0)
Posted: 17 August 2007 at 3:14am |
Hi,
I had created Toolbar using following function: InitCommandBars(); pCommandBars = GetCommandBars(); CXTPToolBar *m_wndToolBar; m_wndToolBar = (CXTPToolBar *)pCommandBars->Add(_T("Standard"), xtpBarTop); if (!m_wndToolBar || !m_wndToolBar->LoadToolBar(IDR_TOOLBAR)) { TRACE0("Failed to create toolbar\n"); //return -1; } Here I am able to successfully create Toolbar, toolbar pointer m_wndToolBar. Now I want to create Combobox on above created Toolbar, I am having pointer CXTFlatComboBox *m_MasterViewListCombo; Following call getting crashed: if ( !m_wndToolBar->m_MasterViewListCombo->Create(CBS_DROPDOWNLIST | WS_VISIBLE, CRect(0,0,23,100), this, ID_PRIMARY_VIEW_COMBO) ) What is the proper method for creating Combobox on the Toolbar? |
|
prashant
Senior Member Joined: 19 February 2007 Location: India Status: Offline Points: 165 |
Post Options
Thanks(0)
|
Hi,
I was able to create Combobox using following method CXTFlatComboBox *pObj = (CXTFlatComboBox*)this->GetControls()->Add(xtpControlComboBox, nID); But previously I am using methods as 1) ResetContent() 2) AddString(...) 3) SetCurSel() 4) GetCurSel() Now How Do I replace those CXTFlatComboBox functions? |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hi,
this call return CXTPControlComboBox - not CXTFlatComboBox .
See our samples - they show how to use CXTPControlComboBox . See CustomThemes sample from 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 |