I was able to scale the ribbon using the SetFontHeght technique in the sample (see https://forum.codejock.com/forum_posts.asp?TID=12612 - https://forum.codejock.com/forum_posts.asp?TID=12612 ). I'm trying to extend that scaling to the status bar. It is mostly working. Right after I create it, I do this:
CFont* pFont = m_pStatusBar->GetFont();
LOGFONT lf = {0};
if (pFont->GetLogFont(&lf))
{
lf.lfHeight *= 2;
CFont font;
font.CreateFontIndirect(&lf);
m_pStatusBar->SetFont(&font);
}
The part I can't whip is getting the icons to scale up on fake buttons displayed on my status bar. My original code looked something like this:
CXTPStatusBarPane* pPane = This->m_pStatusBar->AddIndicator(nId, iIndex);
pPane->SetIconIndex(nId);
pPane->SetText(_T(""));
pPane->SetButton();
pPane->BestFit();
At this point I changed the BestFit call to a SetWidth call, and the pane resized like I asked, but the icon stayed little & to the side. I had previously changed the paint manager's m_bAutoResizeIcons variable for the ribbon changes, but that doesn't seem to affect the status bar. Unless, that is, there is a different paint manager involved that I can't see with the debugger.
Granted, the icons I have supplied to the image manager are small, but I was hoping that they would scale up as they did on the ribbon. Is there some trick I haven't discovered to make this work?
------------- --Mike
|