Visual C++ and MFC Programming 2nd Edition

(Martin Jones) #1

Chapter 16: Text-Based Controls Visual C++ and MFC Fundamentals


Practical Learning: Using a Static Control



  1. Open the Geometry application. If you do not have it, open the Geometry3
    application that accompany this book

  2. On the main menu, click either Insert -> Resource or Project -> Add Resource...

  3. In the Add Resource dialog box, click the Import button.

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

  5. Click Geome3D and click Open

  6. In Resource View, and using the Properties window, change the bitmap’s ID to
    IDB_GEOME3D

  7. Display the IDD_G3D dialog box


On the Controls toolbox, click the Picture button and click on the top left
section of the dialog box


  1. On the Properties window, change the Type to Bitmap

  2. Click the arrow of the Image combo box and select IDB_GEOME3D

  3. Test the application

  4. Close the dialog box and return to MSVC


15.1.3..The Picture Control.............................................................................


If you need to display a picture for your application, Visual C++ provides a special
control for that purpose. To do this, you can use Microsoft Picture Clip Control available
from the Insert ActiveX Control. After adding it to your application, use its Picture
property page to specify the picture you want to display.
Free download pdf