How do I force the window size?

How do I force the window size?

Post by Thomas Wom » Fri, 09 Jun 2006 21:56:21


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
 
 
 

How do I force the window size?

Post by JustBo » Sat, 10 Jun 2006 01:05:38

On 08 Jun 2006 13:56:21 +0100 (BST), Thomas Womack



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.