Visual C++ and MFC Programming 2nd Edition

(Martin Jones) #1

Visual C++ and MFC Fundamentals Chapter 21: Tree and List Controls



  1. Set the project type to Dialog Based and click Next

  2. Remove the check box of the About Box. Set the Title to
    MFC Extension Library then click Finish and click OK

  3. Design the dialog box as follows:


Control ID Caption Addition Properties
Static Text Number &1:
Edit Control IDC_NUMBER1 Align Text: Right
Static Text Number &2:
Edit Control IDC_NUMBER2 Align Text: Right
Button IDC_CALCULATE C&alculate Default Button: True
Static Text Result:
Edit Control IDC_RESULT Align Text: Right
Button IDCANCEL &Close


  1. Press Ctrl + W to access the ClassWizard. In the Member Variables tab, Add a
    Variable for each edit box as follows:

  2. Using Windows Explorer or My Computer, copy the MFCExt.lib and the
    mfcextent.h files from the folder of the previously created library and paste them in
    the folder of the current project (the lib and the h files are in different folder but you
    should paste them in the main folder of the current project)

  3. To include the library in the current project, on the main menu, click Project -> Add
    To Project -> Files...

  4. Change the Files Of Type to Library Files (.lib). Select the MFCExt.lib file and click
    OK

Free download pdf