Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Command Bars
  New Posts New Posts RSS Feed - Scaling the Status Bar
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Scaling the Status Bar

 Post Reply Post Reply
Author
Message
mrmathis View Drop Down
Senior Member
Senior Member
Avatar

Joined: 17 May 2007
Location: United States
Status: Offline
Points: 105
Post Options Post Options   Thanks (0) Thanks(0)   Quote mrmathis Quote  Post ReplyReply Direct Link To This Post Topic: Scaling the Status Bar
    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
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.141 seconds.