Using Intel® Visual Fortran to Create and Build Windows*-Based Applications

ID 757211
Date 7/23/2021
Document Table of Contents
Give Feedback

Using Pictures

The Picture control is an area of your dialog box in which your application displays a picture.

The user cannot change it, since it is an output-only window. It does not respond to user input and therefore does not support any callbacks.

The picture displayed can be set using the Properties dialog box in the Resource Editor. The options that can be fully defined using the Resource Editor include a:

  • Icon

  • Bitmap

  • Frame

  • Rectangle

When using the Resource editor, you need to click on the border of the picture to select it, then select View>Properties to display the Properties window. The Properties Window allows you to select the type of picture as well as specify the image for certain picture types.

For example, to add an existing BMP (Bitmap) file to a dialog:

  1. Open your project, double-click on the .rc file, and select Edit>Add Resource.

  2. Select the Resource type (such as Icon or Bitmap) and then select whether it is a new resource, an Import (existing) resource, or Custom resource. In our example, we will specify an existing Bitmap file we have previously copied into our project directory, so will click Import.

  3. After we specify the resource, its name appears in the Resource Editor under the appropriate resource type (such as bitmap).

  4. Add a picture to the dialog box, by dragging the picture icon from the Control toolbar to the appropriate place in the dialog box. You can resize the picture as needed. The default picture type is frame.

  5. Carefully click on the border of the picture area to display, then select View>Properties.

  6. In the Properties Window, select the type of picture. If you select a type of Bitmap or Icon, for example, you can select the image from the list of available project resources using the Image property.

  7. Move the picture as needed.