BPW 7.0 & Win95/98 - Display Properties and Appearance - folder. 
Author Message
 BPW 7.0 & Win95/98 - Display Properties and Appearance - folder.

I made a Procedure to retrive the "Desktop Appearance" from the
Win95-registry key :
  HKEY_CURRENT_USER\Control Panel\desktop\WindowMetrics\CaptionFont.

I receive the font (TLogfont ) correctly.

When I use the recived font in the Windows CaptionBar the fonts are only
half of the correct size.

Only :  MS Sans Serif, size 8, Bold  comes out  correct.  It seams like when
I'm using True Type fonts I'm not calculating the font to the right size ???

I've tryed to calculate to the size like this :
Font.lfHeight := -MulDiv(GetRegistryCaptionHeight, GetDeviceCaps(HWindow,
LOGPIXELSY), 172); It ends up close,but not correct.

How does Microsoft calculate the Window Heading font in Win95/98???
Can anyone help.

Best regards



Wed, 18 Jun 1902 08:00:00 GMT  
 BPW 7.0 & Win95/98 - Display Properties and Appearance - folder.

Quote:

>How does Microsoft calculate the Window Heading font in Win95/98???
>Can anyone help.

If you look at the GetSystemMetrics docs, you will see that there is a
function to retrieve the size, in pixels, of the caption (SM_CYCAPTION). I
think you can use this.
Quote:
>Best regards




Wed, 18 Jun 1902 08:00:00 GMT  
 BPW 7.0 & Win95/98 - Display Properties and Appearance - folder.

Quote:

>When I use the recived font in the Windows CaptionBar the fonts are only
>half of the correct size.
>Only :  MS Sans Serif, size 8, Bold  comes out  correct.  It seams like
when
>I'm using True Type fonts I'm not calculating the font to the right size
???
>I've tryed to calculate to the size like this :
>Font.lfHeight := -MulDiv(GetRegistryCaptionHeight, GetDeviceCaps(HWindow,
>LOGPIXELSY), 172); It ends up close,but not correct.

I'm pretty sure the 172 is wrong. Try 72.
A letter displayed / printed with a 72 point font is one inch high,
therefore this magical number.

--
Zweitze de Vries
Zweitze.at.iname.com
When replying, please adjust return address



Wed, 18 Jun 1902 08:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. BPW 7.0 & Win95 Cursor

2. W95/98 FileOpen/FileSaveAs Dialog for TPW / BPW.

3. extend borland pascal to long filenames and use of win95/98/me/xp filedialogs

4. Rotate/Flip a Metafile [Win95/98] ?

5. Win95/98 and D3-Paradox

6. Establish Dial-Up connection in WIN95/98 from TP

7. Win95/98 checking and reporting

8. Win95/98 checking and reporting

9. Turbo Pascal 1.5 with Win95/98

10. Turbo Pascal 1.5 with Win95/98

11. Running TP 7.0 in Windows 98

12. Runnuing Turbo Pascal 7.0 in Windows 98

 

 
Powered by phpBB® Forum Software