Forum
Please
Log In
to post a new message or reply to an existing one. If you are not registered, please
register.
NOTE: Some forums may be read-only if you are not currently subscribed to
our technical support services.
Subject |
Author |
Date |
|
Offer Har
|
Jan 11, 2007 - 10:50 AM
|
Dear Support,
This class contains a lot of text changing function, but i could not find any function to change the font’s size? How can this be done? Why isn’t there a function for doing this?
Regards, Ron.
|
|
Wes Aday
|
Jan 11, 2007 - 2:16 PM
|
Can’t you use the SetFont function?
|
|
Offer Har
|
Jan 11, 2007 - 7:19 PM
|
I can, but it will look like this:
CFont* pFont = m_lblMessage.GetFont(); LOGFONT logFont; pFont->GetLogFont(&logFont); logFont.lfHeight -=4; CFont* pNewFont = new CFont; pNewFont->CreateFontIndirect(&logFont); m_lblMessage.SetFont(pNewFont);
Instead of one line...
All i’m saying is that i think that such a nice class can have an option to allow simple font’s parameters changing.
|
|
Technical Support
|
Jan 12, 2007 - 12:15 PM
|
Actually the LOGFONT structure defines 14 attributes of the font. This means we would have to add 14*2=28 methods for getting and setting these attributes. To make this consistent throughout the library, we would have to a number of methods. On the other hand, the task of changing font attributes is well-defined in MFC projects. So in our opinion it is a debatable question.
|
|