How to added a CXTPControlboBox to ... |
Post Reply |
Author | |
cnmmd
Newbie Joined: 09 May 2006 Status: Offline Points: 6 |
Post Options
Thanks(0)
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? |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
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 |
|
cnmmd
Newbie Joined: 09 May 2006 Status: Offline Points: 6 |
Post Options
Thanks(0)
|
thank you very much. I move the update handle to the view file.the update handle not be called! |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
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 |
|
cnmmd
Newbie Joined: 09 May 2006 Status: Offline Points: 6 |
Post Options
Thanks(0)
|
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? |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hello, Please check our samples. There are a lot of examples how it must work. |
|
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 |