Top.Mail.Ru
Мастера DELPHI, Delphi programming community Титульная страница Поиск, карта сайта Написать письмо 
| Новости | Поиск | FAQ | Статьи | Книги | Новости VCL |
| Форумы ЧАТ | Орешник | KOL и MCK |
Форумы -» Основная («Начинающим»)/ Базы / WinAPI / Компоненты / Сети / Media / Игры / Corba и COM / KOL / FreePascal / .Net / Прочее / RSDN.ORG

« предыдущая ветвь | форум | следующая ветвь »

MHFontDialog return bad font height [Delphi, Windows]


Dodfr ©   (2006-04-06 14:11:00) 

Hello,

When I try to retrieve the selected font size value after MHFontDialog.execute, I get wrong value, always a bit bigger that selected one : if I select 8 size then I get 11, if I select 14, then I get 19.

Any idea ?

Thanx


thaddy   (2006-04-06 20:28:00) [1]

plz ignore last post.


thaddy   (2006-04-06 20:26:00) [2]

Use getsystemmetrics and add 2. Then you are almost always very close.


ECM   (2006-04-06 18:10:00) [3]

Life cycle of threads in a forum:
Cashe(accessible)->Trash(not accessible)->Archives(now accessible)
Link   http://www.delphimaster.ru/cgi-bin/forum.pl?id=1124270752&n=10was trashed and search in what would not result.... :)
Tnx McSimm - untrash it


Dodfr   (2006-04-06 17:51:00) [4]

Sorry ECM, your link is russian, I don't read it but I see a link in the thread that also point to http://www.delphimaster.ru/cgi-bin/forum.pl?id=1124270752&n=10


ECM   (2006-04-06 16:41:00) [5]


> I did a search in forum for "MHFontDialog" before asking
> but did not thought searching on "font.height

Not all so is simple
:))

http://www.delphimaster.ru/cgi-bin/forum.pl?id=1144323524&n=3


Dodfr   (2006-04-06 16:31:00) [6]

Nice, thank you (I did a search in forum for "MHFontDialog" before asking but did not thought searching on "font.height") , just have to change the

MyHeight := -10 * PixelsPerInch / 72;

to

MySize := -10 / (PixelsPerInch / 72);

To get Height to Size conversion, strange that MHFontDialog do not include such usual property that is part of the font dialog elements like the Name or Style.


ECM   (2006-04-06 15:54:00) [7]

http://www.delphimaster.ru/cgi-bin/forum.pl?id=1124270752&n=10


Grom PE   (2006-04-06 14:27:00) [8]

It is font height, not font size.
I don't know is there any conversion function for this.


Наверх

Титульная страница Поиск, карта сайта Написать письмо