Advanced Windows Programming

ITC226 .. Test Week 3 : GDI And A Dialog Box In An SDI application


[Previous Test][Next Test]
You may modify the test project from last week, or create a new project:
Use AppWizard to create an MFC based SDI application. The application will have a menu item "Add Drawing Parameters" which when selected will display a modal dialog box that allows the user to enter a color, a string (such as a name or a description) and select a shape. The user will be asked for

Ensure the user must enter numbers in the correct range to be a color component.

After the Dialog Box is ended (by clicking "OK"), the program is to display

The CDC class has member functions "Rectangle, Ellipse, TextOut and DrawText".

The first time the dialog box is displayed, the color components will contain zero (0), the string will be empty and the shape will be a rectangle. Subsequent displays of the dialog box will start displaying those values of the color components, string and selected shape from the last display of the dialog box that ended with "OK" being clicked.


Author: Jim Geyer