Resize inner control with dialog

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?
RECT rc;

Above i paste some code which i tried so much but not working,please give me any idea for that!
Last edited on
Where is the image control being created and how? Maybe you need to change the style of the image control.

Please post more of your code.
i take that picture control at design time from toolbox and want to resize that at runtime whenever user resizes dialog
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.

Or are you using a different approach??

but i'm not use image in that control.I always try to redraw that control onPaint event of dialog.
may be you need to set the property Notify to TRUE
Notify property is previously set to TRUE but same thing happened there.
Topic archived. No new replies allowed.