I need to programatically increase the font size of a tree/list control. I've tried using the CFont and LOGFONT objects but I get weird results.
I also need to reset the font size to its original state.
Here's what I tried for increasing the size:
//get the tree control's current font object
old_font = m_wndTree.GetFont();
//increase the size
lf.lfWidth += 2;
//create a new font with this adjusted information
It kind of works, but just once, and the text gets cut off. Then when I try again during the same execution, the text disappears.
Then to reset the size, I do something similar:
//mDefaultFont is of type LOGFONT and is set when the dialog is initialized using (essentially) tree->getFont()->getLogFont();