Contents Previous Next Subchapters

Using A Bit Map In A Dialog Window
Syntax addcontrol(captiongeometry, "bitmap", file)
See Also addlabel

Description
Adds a bitmap, with the specified geometry , to the window specified by caption . The character row vector file specifies the file that contains the bitmap (*.BMP).

Example
The following program creates a dialog window with a push button labeled "Done" and a bitmap. When the button is pressed, the dialog is deleted.

clear
#
Caption  = "Test Dialog"
geometry = [100, 100, 100, 100]
callback = "delwin(Caption);"
adddialog(Caption, geometry, callback);
#
geometry = [50 - 16, 10, 32, 32]
file     = "c:\windows\cars.bmp"
addcontrol(Caption, geometry, "bitmap", file);
#
geometry = [50 - 25, 50, 50, 20]
name     = "Done"
callback = "delwin(Caption);"
addcontrol(Caption, geometry, "pushbutton", name, callback);