A1METALHEAD
Programmer
hello, im new to vc++, and i am useing one of my brothers books( using visual c++ 6 ) and i am on the second chapter, it told me to make a SDI , then make a dailog resorce, and link it with a class with all the controls as member vars. well when ever i try to make it, it says 'CSdiDialog' : undeclared identifier ! here is the code in CSDIApp::InitInstance() of course the popup comes up wenever i start typing dlg. im using vc++6 introductry. heres the code for CSDIApp::InitInstance()
CSdiDialog dlg;
dlg.m_check = TRUE;
dlg.m_edit = "hi there";
CString msg;
if (dlg.DoModal() == IDOK)
{
msg = "You clicked OK. ";
}
else
{
msg = "You cancelled. ";
}
msg += "Edit box is: ";
msg += dlg.m_edit;
msg += ". List Selection: ";
msg += dlg.m_selected;
msg += "\r\n";
msg += "Radio Selection: ";
switch (dlg.m_radio)
{
case 0:
msg += "0";
break;
case 1:
msg += "1";
break;
case 2:
msg += "2";
break;
default:
msg += "none";
break;
}
AfxMessageBox (msg);
return TRUE;
CSdiDialog dlg;
dlg.m_check = TRUE;
dlg.m_edit = "hi there";
CString msg;
if (dlg.DoModal() == IDOK)
{
msg = "You clicked OK. ";
}
else
{
msg = "You cancelled. ";
}
msg += "Edit box is: ";
msg += dlg.m_edit;
msg += ". List Selection: ";
msg += dlg.m_selected;
msg += "\r\n";
msg += "Radio Selection: ";
switch (dlg.m_radio)
{
case 0:
msg += "0";
break;
case 1:
msg += "1";
break;
case 2:
msg += "2";
break;
default:
msg += "none";
break;
}
AfxMessageBox (msg);
return TRUE;