🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #12910

Re: HowTo: Limiting window size

#12910
From: Ed Mulroy [TeamB]
Date: Thu, 13 Nov 2003 14:31
21 lines
1779 bytes
Look at the help on the Windows message WM_GETMINMAXINFO  You can enforce a
minimum size on the window by altering the data values in the structure
whose address is passed with that message.

You can determine how much taller the window height is than the client
height during the WM_CREATE message by calling the GetWindowRect and
GetClientRect functions and subtracting and keeping the result around for
later use.

.  Ed

> Martin Golm wrote in message
> news:3FB38C27.2C3183E5@gmx.de...
>
> I need to limit the size of a window in the way that it
> can't be smaller than a certain height. That means,
> if a user sizes the window, its client height should not
> be less than - say 400 pixels. I guess I have to use
> the WM_NCCALCSIZE message, but I'm not sure
> how to use it. Can anybody tell how to limit the
> window size (or even have a working example)?
Technical Details
Message-ID: <3fb395bf@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!fu-berlin.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <3FB38C27.2C3183E5@gmx.de>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,498b056766cdd000
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2003-11-13 06:41:05 PST
From: "Ed Mulroy [TeamB]" <dont_email_me@bitbuc.ket>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <3FB38C27.2C3183E5@gmx.de>
Subject: Re: HowTo: Limiting window size
Date: Thu, 13 Nov 2003 09:31:15 -0500
Lines: 23
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
NNTP-Posting-Host: 24.74.175.102
Message-ID: <3fb395bf@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1068733887 24.74.175.102 (13 Nov 2003 06:31:27 -0700)
X-Authenticated-User: edmulroy
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!fu-berlin.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail