bg_imagedef()

Displays a bitmap image in a form window (Vermont Views for Windows or Web Editon Only)

Call
#include <vv_win.h>
BG_IMAGEPTR bg _imagedef(wn_rb, wn_cb, rowq, colq, imagenamep, fmp)
int wn_rb Row of the form window on which to begin the image
int wn_cb Column of the form window on which to begin the image
int rowq Height of the image
int colq Width of the image
UCHAR *imagenamep Pointer to the image file name
FORMPTR fmp Pointer to the form in which to place the image
Returns  
POINTER Pointer to the background image structure
NULLP Error
Description  
bg_imagedef() allocates memory for a new node in the linked list of background items in the form structure. The node for this background image is inserted in the appropriate place in the linked list.

The image is automatically scaled to fit within the region specified by the rowq and colq parameters.

If you want to use a bitmap image that is defined in a Windows resource file (.rc), you must use the Windows macro MAKEINTRESOURCE(), passing the ID of the bitmap image as the parameter. The return value will be a valid UCHAR * to use as the imagenamep parameter.

Related Functions
bg_boxdef(), bg_txtdef(), bg_linedef()
Cautions
Multiple, overlapping images can be displayed on the same form. They are displayed in the order in which they are defined.

This function is available in Vermont Views for Windows only. For backward compatibility with other operating systems, place this function call within a #ifdef __WIN32__, #endif pair.


Home Contents Previous Next