CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Guest

    HowTo limit the minimal size of window during the usage of a program???

    Hi, friends,
    i have a problem about the size of framewindow.

    My program shows several images with the same size .They are lined regularly . Now when the user resizes the framewindow, namely reduces the width, there should be at least one image to be showed im view area.

    I have inserted following codes in CMyView::OnSize().


    CRect rect;
    GetClientRect(&rect);

    if (rect.right <= IMAGEWIDTH)
    //IMAGEWIDTH is a macro for the width of the image
    {
    //SetWindowPos(NULL,0,0,IMAGEWIDTH,rect.bottom,SWP_NOMOVE);
    MoveWindow(0,0,IMAGEWIDTH,rect.bottom,TRUE);
    return;
    }





    Now the client area is correctly configured. When the size of the window is per mouse reduced, there is at least one image to be shown in the window.

    But the minimal size of the framewindow is lesser than the size of client area. A part of the image is not showed.

    How can i limit the minimal size of window during the usage , not at the beginning of the program??

    Thanx, ur Softchen


  2. #2
    Join Date
    Jul 1999
    Location
    Germany, Dresden
    Posts
    71

    Re: HowTo limit the minimal size of window during the usage of a program???

    handle WM_GETMINMAXINFO


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured