I'm just wondering how to do this. I write:
CEdit m_wndEdit;
and in the button event handler (dialog application), I write:
m_wndEdit.Create(//with params);
but I still donβt see the control appearing in the user interface.
I wrote this in a button handler:
CWnd* pWnd = GetDlgItem(IDC_LIST1); CRect rect; pWnd->GetClientRect(&rect); //pWnd->CalcWindowRect(rect,CWnd::adjustBorder); wnd_Edit.Create(ES_MULTILINE | ES_NOHIDESEL | ES_READONLY,rect,this,105); wnd_Edit.ShowWindow(SW_SHOW); this->Invalidate();
id 105 does not exist. (I used it in the Create function of the CEdit member). I just put it there. shouldn't it be the identifier you want to give to the new control? Should it already exist?
c ++ mfc
Attilah
source share