flat assembler
Message board for the users of flat assembler.

Index > Windows > Font heights and TEXTMETRIC

Author
Thread Post new topic Reply to topic
moriman



Joined: 01 Apr 2006
Posts: 55
Location: Northern Ireland
moriman 23 Jul 2006, 19:55
Hi,

I wrote some code which was meant to use the tmHeight from TEXTMETRIC to calculate how many lines to display in a window. When this didn't operate correctly I wrote the attached test app to figure out what the problem was. This app is supposed to show the value of all the values of the TEXTMETRIC structure but something appears to be wrong as it doesn't matter what fontsize I choose, all the values in the returned TEXTMETRIC are the same Confused
Simply choose a font size from the menubar and you'll see what I mean. Probably something silly I'm doing, but danged if I can figure what Sad

Thx


Description:
Download
Filename: test.zip
Filesize: 4.12 KB
Downloaded: 252 Time(s)

Post 23 Jul 2006, 19:55
View user's profile Send private message Reply with quote
moriman



Joined: 01 Apr 2006
Posts: 55
Location: Northern Ireland
moriman 23 Jul 2006, 21:55
OK, it appears that as well as using WM_SETFONT to change the font in the edit control, I also have to GetDC, and SelectObject the font for GetTextMetrics to work with the selected font. Can anyone confirm this?

thx again.


Description:
Download
Filename: test2.asm
Filesize: 7.99 KB
Downloaded: 278 Time(s)

Post 23 Jul 2006, 21:55
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.