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:

When using the Resource editor, you need to double-click on the border of the picture to display the Picture Properties box. If the Properties box displayed has a title of Dialog Properties instead of Picture Properties, dismiss the Dialog Properties box and try to select the border before you perform the double-click. The Picture Properties box 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. After you open your project workspace, from the Insert menu, click 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 (click Import).
  3. After we specify the resource, its name appears in the ResourceView 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 double-click on the border of the picture area to display the Picture Properties box. If the Dialog Properties box appears instead of Picture Properties, dismiss the Dialog Properties box and try again.
  6. In the Picture Properties box, 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.
  7. You can move the picture as needed.
  8. Dismiss the Picture Properties box.