PxLoadImage (filename)
This example, ex_PxLoadImage.g, is included in the product distribution.
#!/usr/cogent/bin/phgamma /* The following program creates a new window with a label. The label type is changed from text (default) to image and a pre_loaded picture is put into the label. */ PtInit(nil); win = new(PtWindow); pic = PxLoadImage("smiley.bmp"); lab = new(PtLabel); lab.label_type = Pt_IMAGE; lab.label_data = pic; PtRealizeWidget(win); PtMainLoop();
Copyright © 1995-2010 by Cogent Real-Time Systems, Inc. All rights reserved.