🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: HowTo: Limiting window size

#12803
From: Ed Mulroy [TeamB]
Date: Tue, 18 Nov 2003 13:55
33 lines
2284 bytes
> However, calculating during WM_CREATE didn't
> work because there's no window handle I can use.
> (Or did I miss something?)

I think that during the WM_CREATE the HWND parameter in the call to the
window procedure is valid for getting the size.  I avoid using
AdjustWindowRect  and AdjustWindowRectEx because of the problem that you
mention - incorrect results when a menu wraps to multi-line.

> I am aware of the MinHeight property and the existance
> of third-party components. But I create a WinAPI-only
> application, so VCL is no option.

Same here.  Most of what I do is Win API only.

.  Ed

> Martin Golm wrote in message
> news:3FB9E5FE.8824A78A@gmx.de...
>
> However, calculating during WM_CREATE didn't work
> because there's no window handle I can use. (Or did
> I miss something?) Instead I used AdjustWindowRect
> to calculate the minimum window height (there's no
> menu assigned to the window, so multi-lined menus
> aren't an issue) during WM_GETMINMAXINFO. If the
> window height from WM_GETMINMAXINFO is smaller
> than my minimum window height, I set it accordingly.
>
> @Jonathan Arnold and Palle Meinert:
> I am aware of the MinHeight property and the existance of third-party
> components. But I create a WinAPI-only application, so VCL is no option.
> Thanks anyway.
Technical Details
Message-ID: <3fba24d3$1@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> <3fb395bf@newsgroups.borland.com> <3FB9E5FE.8824A78A@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-18 06:09:37 PST
From: "Ed Mulroy [TeamB]" <dont_email_me@bitbuc.ket>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <3FB38C27.2C3183E5@gmx.de> <3fb395bf@newsgroups.borland.com> <3FB9E5FE.8824A78A@gmx.de>
Subject: Re: HowTo: Limiting window size
Date: Tue, 18 Nov 2003 08:55:30 -0500
Lines: 35
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: <3fba24d3$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1069163731 24.74.175.102 (18 Nov 2003 05:55:31 -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