Print Page | Close Window

How to added a CXTPControlboBox to ...

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=4176
Printed Date: 04 March 2025 at 2:11pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: How to added a CXTPControlboBox to ...
Posted By: cnmmd
Subject: How to added a CXTPControlboBox to ...
Date Posted: 09 May 2006 at 4:23am
1, class CMainFrame : public CXTPFrameWnd
{
....
CXTComboBoxEx m_wndSelect;
....
};

CMainFrame::OnCreateControl(....)
{
  if (  ...->nID== IDC_SELECT)
  {
     wndSelect.Create(....);
    ...
  }

this is ok.

but:
2,
CMainFrame::OnCreateControl(....)
{
  if (  ...->nID== IDC_SELECT)
  {
     CXTPControlComboBox* box= new CXTPControlComboBox
     box->InsertString(0,"xxx");
     box->Set....
    
     lpCreateControl->pControl = box;
    ...
  }
when run the app,the combobox is displayed,but it is disabled!Can not click on it.

which is right?how to do?



Replies:
Posted By: Oleg
Date Posted: 09 May 2006 at 8:43am

Hello,

better use CXTPControlComboBox. to enable just add Update handler for IDC_SELECT command and enable control:

pCmdUI->Enable(TRUE);



-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: cnmmd
Date Posted: 09 May 2006 at 11:13am

thank you very much.
the IDC_SELECT combobox is ok now.but the toolbar has many control,such as edit,button.I Use rang update,but a button not be called!

I move the update handle to the view file.the update handle not be called!



Posted By: Oleg
Date Posted: 09 May 2006 at 4:43pm

Hello,

I sure button id not in range of update handle. Just double check id/range in resource.h file.



-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: cnmmd
Date Posted: 09 May 2006 at 10:24pm
YES!It is!Now the controls are all ok!

But how to get the input string of a edit control? And how to get button clicked message and do something?

My APP is a SDI.How to receive the toolbar button clicked message in myview?


Posted By: Oleg
Date Posted: 10 May 2006 at 8:49am

Hello,

Please check our samples. There are a lot of examples how it must work.



-------------
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