Print Page | Close Window

Scaling the Status Bar

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Command Bars
Forum Description: Topics Related to Codejock Command Bars
URL: http://forum.codejock.com/forum_posts.asp?TID=12747
Printed Date: 28 February 2025 at 5:09pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Scaling the Status Bar
Posted By: mrmathis
Subject: Scaling the Status Bar
Date 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 - 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



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net