Visual C++ and MFC Programming 2nd Edition

(Martin Jones) #1
Visual C++ and MFC Fundamentals Chapter 15: Fundamental Controls

Practical Learning: Displaying a Picture



  1. Create a new Dialog-based application named PictClip and set the Dialog Title to
    Picture Clip Display

  2. Delete the TODO line, the OK, and the Cancel buttons

  3. Right-click anywhere on the dialog box and click Insert ActiveX Control...

  4. In the Insert ActiveX Control dialog box, scroll down and click Microsoft Picture
    Clip Control, (Version 6):

  5. Click OK

  6. If you are using MSVC 6, display the Properties window and click the Picture
    property page. Click the Browse... button.
    If you are using MSVC 7, in the Properties window, click the Picture field. Then
    click the ellipsis button

  7. Locate the folder that contains the exercises for this book and display its Pictures
    folder in the Look In combo box

  8. Click GoodDay and click Open

  9. Resize the dialog box as you see fit and test the application:


Note
Because of the
way bitmaps are
dealt with in
MSVC 7, the
following
program will not
work as expected
in MSVC 7

Free download pdf