How do I force the window size?
I have a nice simple SDI program for playing back animations; I'd like
to ensure that the window is not resized to more than 1024x1024, and
that it starts off sized as 1024x1024.
I've tried handling OnGetMinMaxInfo and filling in ptMaxTrackSize, but
that doesn't seem to have any effect; I've tried
BOOL CnewtonanimView::PreCreateWindow(CREATESTRUCT& cs)
{
cs.cx = cs.cy = 1024;
}
but that doesn't have any effect either.
Should I be doing things to my MainFrame rather than to my View? I'm
not quite sure what the distinction is for an SDI program.
Tom
Re: How do I force the window size?
On 08 Jun 2006 13:56:21 +0100 (BST), Thomas Womack
<twomack@chiark.greenend.org.uk> wrote:
[color=blue]
>I have a nice simple SDI program for playing back animations; I'd like
>to ensure that the window is not resized to more than 1024x1024, and
>that it starts off sized as 1024x1024.
>
>I've tried handling OnGetMinMaxInfo and filling in ptMaxTrackSize, but
>that doesn't seem to have any effect; I've tried[/color]
I'm seem to remember doing it by trapping OnGetMinMaxInfo AND the
OnSize msg. Pretty sure you have to do both. I also seem to remember
you have to put values in all the possible variables in
OnGetMinMaxInfo. More than just ptMaxTrackSize. Good Luck.