Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Command Bars
  New Posts New Posts RSS Feed - How to added a CXTPControlboBox to ...
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

How to added a CXTPControlboBox to ...

 Post Reply Post Reply
Author
Message
cnmmd View Drop Down
Newbie
Newbie


Joined: 09 May 2006
Status: Offline
Points: 6
Post Options Post Options   Thanks (0) Thanks(0)   Quote cnmmd Quote  Post ReplyReply Direct Link To This Post Topic: How to added a CXTPControlboBox to ...
    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?
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


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: 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
Back to Top
cnmmd View Drop Down
Newbie
Newbie


Joined: 09 May 2006
Status: Offline
Points: 6
Post Options Post Options   Thanks (0) Thanks(0)   Quote cnmmd Quote  Post ReplyReply Direct Link To This Post 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!

Back to Top
Oleg View Drop Down
Admin Group
Admin Group


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: 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
Back to Top
cnmmd View Drop Down
Newbie
Newbie


Joined: 09 May 2006
Status: Offline
Points: 6
Post Options Post Options   Thanks (0) Thanks(0)   Quote cnmmd Quote  Post ReplyReply Direct Link To This Post 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?
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


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: 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
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.156 seconds.