2015-02-11
07:56 AM
- last edited on
2023-08-01
01:40 PM
by
Doreena Deng
2015-02-11 10:37 AM
// Example code to dynamic load image:
IO::Location locationToPic ("<path string to the picture file>");
const void* dgPicture = GX::Image (locationToPic).ToDGPicture ();
DGSetItemImage (<DIALOG_ID>, <PIC_ITEM_ID>, DG::Picture (dgPicture));
// or with C++ interface DG::PictureItem use SetPicture (DG::Picture (dgPicture))
// In the dialog's resource you must define a Picture item and should define a default picture in the fix GRC
'GBMP' <DEFAULT_PIC_RESID> "default_picture" {
"default_picture"
}
'GDLG' <DIALOG_ID> Modal 0 0 210 210 "Dialog with picture" {
/* [<PIC_ITEM_ID>] */ Picture 10 10 200 200 <DEFAULT_PIC_RESID> ClientEdge
/* [ ...] */
} 2015-02-12 08:14 AM