Question for PhAB widget database

Hi everyone !

I wist to create PtButton widget with graphic lmage dynamically. so that
will use PhAB widget database with PtButton, PtImageArea widget. I can
create only PtButton in database without graphic image, But can’t create
PtButton with graphic image using PtImageArea widget. what is wrong?
the following is my code.

ApDBase_t *mydbase;
PtArg_t args[2];
PhImage_t *image;

int
setup( PtWidget_t *link_instance, ApInfo_t *apinfo, PtCallbackInfo_t
*cbinfo )



ApAddClass (“PtButton”, &PtButton);
ApAddClass (“PtImageArea”, &PtImageArea);

mydbase = ApOpenDBase( ABM_picture);

image = ApGetImageRes(mydbase, “PtImageArea_my”);

if(image)


PtSetArg(&args[0], Pt_ARG_LABEL_IMAGE, image, 0);
PtSetArg(&args[1], Pt_ARG_LABEL_TYPE, Pt_TRUE, Pt_IMAGE);

ApCreateWidget(mydbase, “PtButton_my”, 10, 10, 2, args);
}

}

please send mail…
thank you?