Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

wont create dialog

Status
Not open for further replies.

A1METALHEAD

Programmer
May 21, 2004
76
US
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;
 
Did you #include "sdidialog.h", or whatever .h file where CSdiDialog is declared?

I hope that helps,

Vincent
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top