🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.windows.ms.programmer
Article #1611

Re: Limiting size of a window when resizing

#1611
From: Paul Bonneau
Date: Tue, 12 Mar 1991 16:37
22 lines
1540 bytes
In article <1991Mar11.211941.481@ux1.cso.uiuc.edu> koziol@yoyodyne.ncsa.uiuc.edu (Quincey Koziol) writes:
>Hi,
>	Is there any way to limit the size a window may be resized to?  I have
>tried trapping the WM_GETMINMAXINFO message, but either I am not modifying
>the data structure which lParam points to correctly, or this is merely an
>informative (as the name means, I suppose...) message, which doesn't really
>do anything.  I know this can be done because the DOS windows in 386 mode
>won't resize larger than their max correct size.  If someone could
>give me a hand I would greatly appreciate it..
>
WM_GETMINMAXINFO is intended for top-level windows, or
windows with sizeable borders (ie. popup windows).  It is
used when a window is sized via the system menu, or via the
sizing borders.

You did not say what type of window you want to control, but
in general, you can use the WM_NCCALCSIZE message to control
the final size.  For example, ListBoxes use this message to
ensure that the height of a list is an integral number of
entries.

cheers - Paul Bonneau.
Technical Details
Message-ID: <1991Mar12.163753.10315@hyper.hyper.com>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!watserv1!watmath!hyper.hyper.com!bonneau
References: <1991Mar11.211941.481@ux1.cso.uiuc.edu>

Show Full Headers
Complete Article Headers
Newsgroups: comp.windows.ms.programmer
Path: arc1-ca.pugleaf.net!utzoo!utgpu!watserv1!watmath!hyper.hyper.com!bonneau
From: bonneau@hyper.hyper.com (Paul Bonneau)
Subject: Re: Limiting size of a window when resizing
Message-ID: <1991Mar12.163753.10315@hyper.hyper.com>
Keywords: resize, control
Reply-To: bonneau@hyper.UUCP (Paul Bonneau,,)
Organization: HyperCube Inc.
References: <1991Mar11.211941.481@ux1.cso.uiuc.edu>
Date: Tue, 12 Mar 1991 16:37:53 GMT