I have an Edit box embedded in a CDialog bar. The Edit Box ID is
IDC_EDIT_IDRES;
I've never create it
All i did wa to drag and drop an edit box onto teh Dialog bar, I have
created a
protected: CDialogBar m_wndToolbox;
in the CMainFrameClass
On the CMainFrame::OnCreate, I've created the CDialog Bar:
// Create the dialog bar using one of its Create() methods
if( !m_wndToolbox.Create(this,
IDD_DIALOG_PROPIEDADES_OJOBIFE, //<-this is the dialog resource ID
CBRS_LEFT | CBRS_GRIPPER | CBRS_TOOLTIPS | CBRS_FLYBY,
IDD_DIALOG_PROPIEDADES_OJOBIFE) )
{
TRACE0(_T("Failed to create the toolbox\n"));
return -1;
}
Up to here, everithing has worked well. After thatn, always in the
CMainFrame::OnCretate, I did what you told me:
CEdit* pEdit =
(CEdit*)this->m_wndToolBar.GetDlgItem(IDC_EDIT_IDRES);
ASSERT_VALID(pEdit);
pEdit->SetWindowText("Hello!");
but I have never put Cedit m_anEditBox;
m_anEditBox.Create(...);
What should I do?
Ajay Kalra wrote:
Is the edit control embedded in the toolbar?
Yes it is.
Has the edit control been created when you are calling this method? Is
this a CToolBar or is it a CDialogBar?
---
Ajay