saybiz wrote:This would now be dynamic and my requirement.
You can use the picture control in the dialog editor still. Give it an ID (near the bottom of the properties pane), for example
Now in the code you can get a handle of the picture control with GetDlgItem
Once you have the handle, you can move or resize it with either SetWindowPos
] or MoveWindow
If you cast the value returned by GetDlgItem to
you can also use the functions in that class to change the picture or anything else.
int width = 100;
int height = 75;
CStatic *pMyPicture = (CStatic *)GetDlgItem(IDC_PICTURE);
pMyPicture ->SetWindowPos(NULL, 0, 0, width, height, SWP_NOZORDER | SWP_NOMOVE);