In mfc dialog based application i draw one graph on picture control and plot points as i needed,but problem is whenever i resize dialog that picture control remained as it is and looked weired! I can write some code on event of 0nSize() of dialog but it only resize other controls except picture control, so how to make changes on event of size changes of dialog?
1 2 3 4 5 6 7 8
RECT rc;
GetClientRect(&rc);
rc.top+=25;
rc.bottom-=80;
rc.left+=15;
rc.right-=15;
GetDlgItem(IDC_PIC1)->MoveWindow(&rc);
Above i paste some code which i tried so much but not working,please give me any idea for that!
i draw one graph on picture control and plot points as i needed
Is it the dialog class that's drawing on the picture control's window??
(I'm assuming you talking about the "Picture Control" which is just a static control that is supposed to display a fixed image.)
If so, the dialog class will have to erase the old and redraw it appropiately when the window is resized; the image will not be automatically rescaled for you.
A better approach would be to code a custom window class which handles the image.