|
Posted by Herojit on December 5, 2006, 4:42 am
Please log in for more thread options
Hi All,
I Create a FONT with a height of 8 units:
LOGFONT lf ;
HFONT hFont ;
;
;
lf.lfHeight = 8 ;
hFont = CreateFontIndirect(&lf);
Now I set this as the FONT for my window
SetWindowFont(hWnd, hFont, TRUE);
Then I check the height of the text in WM_PAINT of this window:
case WM_PAINT :
;
TEXTMETRIC tm ;
;
;
GetTextMetrics(hDC, &tm) ;
Hero
I find that tm.tmHeight is not 8.
Why is it so? How is the height mentioned while creating the font
related to the height
we obtained on calling GetTextMetrics? Please help.
Regards,
Herojit
|