Posted on 2002-07-18
I'm using OnSize to make a dialog resizeable.
So, in OnSize I compute where the various
buttons, etc need to be, given the size of the
panel. Its working except for details.
A few questions:
1) How can I call my OnSize code once when the
panel is popped. All the widgets in the panel
jump just a bit when you first start to resize
it. If I could just resize once when the dialog
is brought up, it would be fine. Note: bad idea
to call OnSize in OnInitDialog.
2) I must be missing something simple, but I don't
get this: In Visual Studio, when I am laying out
a panel, it shows (near lower right) the position
and size of the control in pixels. However, If
I use those pixels values in my OnSize code, the
control doesn't move to the same place. By
experimenting, I found that if I use 1.5 times
the value I recorded while in dialog design, it
works fine. What is this factor of 1.5?
3) I declared the border of the dialog to be "resizing"
and it works, but there's no visual clue (in the style
of the border) that it is resizeable. How do you get
that little "textured triangle" at the lower right
of the border, as I see on many applications? (e.g.
on the IE window that I'm staring at now)