主题:用CFormView出现的问题!(急!急!)
sdi工程,View的基类是CFormView,在FormView中放了一个控件,例如IDC_EDIT1,用GetDlgItem()似乎不行,每次都返回null(如果是基于对话框的工程,可以编译运行),
如:
CFormView Dialog1;
Dialog1.m_list.SetCurSel(2);
和
CButton * p = (CButton *)this->GetDlgItem(IDC_BUTTON1);
p->SetWindowText("123");
和
CWnd *Edit = GetDlgItem(IDC_EDIT1);
Edit->SetWindowText("dfasf");
都不行
不知道该怎么做了~~请指教~~
如:
CFormView Dialog1;
Dialog1.m_list.SetCurSel(2);
和
CButton * p = (CButton *)this->GetDlgItem(IDC_BUTTON1);
p->SetWindowText("123");
和
CWnd *Edit = GetDlgItem(IDC_EDIT1);
Edit->SetWindowText("dfasf");
都不行
不知道该怎么做了~~请指教~~