Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Command Bars
  New Posts New Posts RSS Feed - How to create Combobox o Tololbar?
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

How to create Combobox o Tololbar?

 Post Reply Post Reply
Author
Message
prashant View Drop Down
Senior Member
Senior Member
Avatar

Joined: 19 February 2007
Location: India
Status: Offline
Points: 165
Post Options Post Options   Thanks (0) Thanks(0)   Quote prashant Quote  Post ReplyReply Direct Link To This Post Topic: How to create Combobox o Tololbar?
    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?
 
Back to Top
prashant View Drop Down
Senior Member
Senior Member
Avatar

Joined: 19 February 2007
Location: India
Status: Offline
Points: 165
Post Options Post Options   Thanks (0) Thanks(0)   Quote prashant Quote  Post ReplyReply Direct Link To This Post Posted: 17 August 2007 at 3:40am
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?
Back to Top
Oleg View Drop Down
Admin Group
Admin Group
Avatar

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: 17 August 2007 at 8:50am
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
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down



This page was generated in 0.078 seconds.