Hello NG,
I have got a small problem with the subject. I have a mdi child frame inside
a mdi parent frame. The child frame displays an image and is usually maximized.
The image can be displayed in two modes.
One is an original size (images are usually 2400 x 1200, much bigger
than a screen),
another is a "fit to window" mode. The image itself is drawn using an
scrolled window. In its paint event handler I get the client size,
according to the display mode
set the virtual size, resize the image and draw it on a prepared dc.
And here comes the problem. The parent frame has quite a long toolbar
(nearly 700px). This causes GetClientSize
method of the scrolled window return bigger size then the real drawn
size is when
the parent frame width is smaller than the toolbar width. I can make
the parent frame smaller
with dragging the right bottom corner of the frame decoration border,
but the controls inside
stop getting smaller when I cross the toolbar width. The right and
bottom part of the controls
are then not drawn including the scrollbars (because they stick out of
the frame border).
I can fairly understand why this happens, but I am not able to find a
way around it. Currently I set the size hints of the parent frame to
the toolbar width, but
this is not an ideal solution.
Do you know some other way around? Is there any?
Thank you.
Jirka