PictureControl
The Picture class is used to paint a PictureHolder object in a control on dialog.
EX1
#include <Origin.h> #include <Dialog.h> class PictureDialog : public Dialog { public: PictureDialog():Dialog(100, "OneStatic") { } EVENTS_BEGIN ON_INIT(OnInitDialog) EVENTS_END BOOL OnInitDialog() { Control ctrl = GetDlgItem(6000); PictureControl pc; pc.CreateControl(ctrl.GetSafeHwnd()); PictureHolder pict; pict.Load("C:\\20by20.bmp"); pc.SetPicture(pict); return TRUE; } int MyDoModal() { InitMsgMap(); return Dialog::DoModal(NULL); } }; void Launch() { PictureDialog dlg; dlg.MyDoModal(); }
Control.h