This example, ex_PxLoadImage.g, is included in the gamma_ph_#_examples_1_QNX4.tgz file available on the Cogent Web Site.
#!/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();