Print Page | Close Window

How to create Combobox o Tololbar?

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Command Bars
Forum Description: Topics Related to Codejock Command Bars
URL: http://forum.codejock.com/forum_posts.asp?TID=7818
Printed Date: 03 May 2024 at 7:45pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: How to create Combobox o Tololbar?
Posted By: prashant
Subject: How to create Combobox o Tololbar?
Date 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?
 



Replies:
Posted By: prashant
Date 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?


Posted By: Oleg
Date 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



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net