Visual C++ and MFC Programming 2nd Edition

(Martin Jones) #1

Visual C++ and MFC Fundamentals Chapter 20: List-Based Controls


Practical Learning: Adding Combo Boxes



  1. From the Controls toolbox, click the Group Box button and draw a large
    rectangle on the left side of the dialog box

  2. On the Controls toolbox, click the Combo Box button and click inside the
    previously added group box

  3. Design the dialog box as follows:


Control ID Caption Other Properties
Group Box Products
Static Text Container:
Combo Box IDC_CONTAINER Type: Drop List
Data: Cone;Cup; Bowl
Sort: False
Static Text Topping:
Combo Box IDC_TOPPING Data:
None;Cookies;Peanuts;M&M
Sort: False
Static Text Scoops:
Combo Box IDC_SCOOPS Data: One;Two;Three
Sort: False
Group Box Flavor
Combo Box IDC_FLAVORS Type: Simple
Group Box Order Summary
Static Text Tax Rate:
Edit Box IDC_TAX_RATE Align Text: Right
Static Text Sub Total:
Edit Box IDC_SUB_TOTAL Align Text: Right
Static Text Tax Amount:
Edit Box IDC_TAX_AMOUNT Align Text: Right
Static Text Order Total:
Edit Box IDC_ORDER_TOTAL Align Text: Right
Button IDC_CALCULATE_BTN C&alculate
Free download pdf