Chapter 20: List-Based Controls Visual C++ and MFC Fundamentals
IDC_CHK_TOMATO m_bTomato IDC_CHK_PICKLES m_bPickles
- Display the main dialog box (Customer Menu)
- In the top section inside the Ingredients group box, add a check box
- Set the ID of the new control to IDC_CHK_REGULARS
- Change its Caption to &Regulars
- Set its Left Text property to True or checked
- Set its Tri-State property to True
- Complete the design of the dialog box as follows:
Control ID Caption Other Property
Group Box Ingredients Ingredients
Check Box IDC_CHK_REGULARS &Regulars Left Text = True
Check Box IDC_CHK_SWEETENER &Sweetener Left Text = True
Check Box IDC_CHK_CHEESE C&heese Left Text = True
Check Box IDC_CHK_BACON B&acon Left Text = True
Group Box Don’t Care Options
Button IDC_INGREDIENTS &Ingredients
Radio Button IDC_OPTIONS &Mayonnaise Group = True
Left Text = True
Radio Button IDC_KETHUP &Ketchup Left Text = True
Radio Button IDC_MUSTARD Mus&tard Left Text = True
Picture Color = Etched
Modal Frame = True
Static Total Price:
Edit Box IDC_TOTAL_PRICE Align Text = Right
- Add a Control variable for all non-IDC_STATIC controls with the following names:
ID Control Variable ID Control Variable
IDC_BREAD m_Bread IDC_MEAT M_Meat
IDC_REGULARS m_Regulars IDC_SWEETENER m_Sweetener
IDC_CHEESE m_Cheese IDC_BACON m_Bacon