I have set a dialog box on the toolbar. There is a Editbox with a Button on the dialog box. The Editbox supposed to get a value from the user and once the Button is pressed, the value will be transfered into a variable in CView. I added a CDialogBar variable m_pointDistro but since there is no class for the dialogbox, I dont know how to add this variable. Editbox ID is IDC_NPOINTS. I selected new class of the Dialogbox as CView but I was forbided to do that. So the Dialogbox ended up as no class. I chose the Button and added a function called OnDistro().
void CProgramView::Distro() {
CMainFrame* pMainFrame = (CMainFrame*)GetParentFrame();
CEdit* pArray = (CEdit*)(pMainFrame->m_pointDistro.GetDlgItem(IDC_NPOINTS));
.
.
}
- If I accidentally made the dialogbar has no class, how can i revert back? 2) The coding I used to get value from the dialogbox couldnt work. How can I fix it? Thanks,