In this assignment you will use the MFC AppWizard and create a dialog based application. You will add (using the controls menu) a number of components. These components will modify a static text item which will indicate which control has been selected.
Components You Will Add
To Display Static Text in your Dialog Box
Declare a member variable of your dialog as a pointer to CStatic:
CStatic *Label;
Then, in your OnInitDialog, add the following:
Label = new CStatic;
Label->Create("I'm a static control too", WS_CHILD | WS_VISIBLE,
CRect(10, 40, 160, 80), this, 1234);
To change the caption:
void CPlotDlg::OnBnClickedButton1()
{
Label->SetWindowText("I'm a changed static control");
}
Setting Which Radio Button is Highlighted
void CheckRadioButton( int nIDFirstButton, int nIDLastButton, int nIDCheckButton );
You might also find helpful:
int GetCheckedRadioButton( int nIDFirstButton, int nIDLastButton );
Zip up all of the project files and the code and put it onto a diskette. If you have trouble fitting all of the files in a file compatable with a diskette, try deleting the files in the debug directory directory.
A 3.5" diskette labeled with your name, course # and containing the file mp07.zip.