Visual C++ and MFC Programming 2nd Edition

(Martin Jones) #1

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



  1. Change its Caption to &Vanilla and change its ID to IDC_FLAVORS

  2. Complete the design of the dialog box as follows (when adding the radio buttons,
    start with the Vanilla and add those under it. Then add the Container group box and
    add its radio buttons. Then add the Ingredient group box and its radio buttons.
    Finally, add the Scoops group box followed by its radio buttons. If you do not,
    neglect to, or forget to, follow this order, when you have finished, display the Tab
    Order and reorder th sequence. This is because we will keep this sequence in mind
    when creating the groups in the next section):


Except for the last Edit control, all controls on this table are radio buttons
ID Caption ID Caption
IDC_FLAVORS &Vanilla IDC_CONTAINER Cu&p
IDC_RDO_CREAMOFCOCOA &Cream of Cocoa IDC_RDO_CONE C&one
IDC_RDO_CHOCOLATE C&hocolate Chip IDC_RDO_BOWL Bo&wl
IDC_RDO_BUTTERPECAN &Butter Pecan IDC_INGREDIENT &None
IDC_RDO_CHUNKYBUTTER Ch&unky Butter IDC_RDO_MM &M && M
IDC_RDO_STRAWVAN &Strawberry Vanilla IDC_RDO_MIXEDNUTS Mi&xed Nuts
IDC_RDO_CHOCOCOOKIES Chocol&ate Cookies
IDC_SCOOPS On&e
IDC_SCOOPS_ TWO &Two
IDC_SCOOPS_ THREE Th&ree IDC_PRICE


  1. From the resources that accompany this book, import the cup.bmp picture. If you are
    using MSVC 6, you will receive a message box. Simply click OK
    Change its ID to IDB_CUP

  2. In the same way, import the cone.bmp picture and change its ID to IDB_CONE

  3. Import the bowl.bmp picture and change its ID to IDB_BOWL

  4. Add a Picture control to the right side of the dialog box and change its ID to
    IDC_PICTURE

Free download pdf