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
IDC_PICTURE
Now in the code you can get a handle of the picture control with
GetDlgItem(
IDC_PICTURE
).
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
CStatic
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);