How do I force the window size? - Programmer

This is a discussion on How do I force the window size? - Programmer ; 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 ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: How do I force the window size?

  1. 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

  2. Re: How do I force the window size?

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

    >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


    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.

+ Reply to Thread