🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

What is a formula to scale a push button rectangle based on its font size

#13362
From: setankabir
Date: Sat, 18 Oct 2003 07:17
23 lines
1964 bytes
I investigated every push button in the common dialog boxes such as Open,
Help, Cancel, OK, Abort, Retry, etc. that give me the following results:

- Rectangle Width  = 75
- Rectangle Height = 23
- Font Name = MS Sans Serif
- Font Height = -11
- Font Width = 0

As we can see, the width of the button rectangle is always the same
regardless length of button text.

The results are always the same for every type of common dialog boxes except
in a message box, where the button rectangle is scaled based on font size or
average character size (It's just my guess) of System Message-Box font.

for MS Sans Serif with Size = 8, button rectangle size is 75 x 23;
for MS Sans Serif with Size = 10, button rectangle size is 100 x 28;
for MS Sans Serif with Size = 12, button rectangle size is 113 x 35;
for MS Sans Serif with Size = 14, button rectangle size is 138 x 42;

Anyone know a formula to scale button rectangle based on specified font
which is implemented in Windows Message Box?
Technical Details
Message-ID: <3f90238e@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!nntp-relay.ihug.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,c2940221d2feba00,start
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2003-10-17 10:16:22 PST
Reply-To: "setankabir" <setankabir@borland.com>
From: "setankabir" <setankabir@borland.com>
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: What is a formula to scale a push button rectangle based on its font size
Date: Sat, 18 Oct 2003 00:17:51 -0700
Lines: 28
Organization: setankabir
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2615.200
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2615.200
NNTP-Posting-Host: 203.77.222.187
Message-ID: <3f90238e@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1066410894 203.77.222.187 (17 Oct 2003 10:14:54 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!nntp-relay.ihug.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail