![]() |
Scaling the Status Bar |
Post Reply ![]() |
Author | |
mrmathis ![]() Senior Member ![]() ![]() Joined: 17 May 2007 Location: United States Status: Offline Points: 105 |
![]() ![]() ![]() ![]() ![]() Posted: 20 November 2008 at 6:23pm |
I was able to scale the ribbon using the SetFontHeght technique in the sample (see 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
|
|
![]() |
Post Reply ![]() |
|
Tweet
|
Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |