Results 1 to 7 of 7

Thread: Status Bar Fun

  1. #1
    Join Date
    Nov 2008
    Posts
    397

    Status Bar Fun

    Ive been trying the new Status Bar "CMFCRibbonStatusBar"

    And well, although it looks nice and cool im having the most basic difficulty in changing just the Pane text?

    Code:
    	CString strTitlePane1;
    	strTitlePane1.LoadString(IDS_STATUS_PANE1);
    
    	CMFCRibbonStatusBarPane* rsbp = new CMFCRibbonStatusBarPane( ID_STATUSBAR_PANE1, strTitlePane1, TRUE );
    	rsbp->SetAlmostLargeText( _T( "Status Text" ) );
    I have attached this to a button control which does get called and does work, Just thought I would add a status update but dont seem to be having much luck??


    Anyone know anything about them, there is supprisingly Little on CMFCRibbonStatusBarPane that sorts my problem?

  2. #2
    Join Date
    Jun 2003
    Location
    Trier, Germany
    Posts
    1,350
    you did read the reference manual on SetAlmostLargeText, didn't you?

    it doesn't set the text at all, it's just used to specify the maximum text size for the pane. to actually set the text you need to use (who would've guessed?) SetText()

  3. #3
    Join Date
    Nov 2008
    Posts
    397
    I did try that and yes I did read the reference I tried pretty much the entire Library you always come to my rescue for my stupid mistakes but already tried that

  4. #4
    Join Date
    Jun 2003
    Location
    Trier, Germany
    Posts
    1,350
    Quote Originally Posted by sarriss2 View Post
    I did try that and yes I did read the reference I tried pretty much the entire Library you always come to my rescue for my stupid mistakes but already tried that
    then we're gonna need more information. what exactly are you trying to do?
    we'll probably need some more code and (if possible) screenshots explaining the problem.

    also, take a look at the example code for the mfc-feature pack that shipped with visual studio. most of the features regarding the new mfc classes are demonstrated there and it is probably the best reference on the topic out there. run each of the examples and try to find one that implements the what you're looking for. you should be able to figure most things out by the sample code, but if you still get stuck, come back and ask.

  5. #5
    Join Date
    Nov 2008
    Posts
    397
    Well this is a pic of what I have and What I want and cant achieve because its being a pain



    its an MDI with Multiple views and a nice Outlook bar which i have just figured out how to use

    (BTW in case you are wondering my other thread on getting data from the database finally works and is shown in that list of database tables )

    I will be wanting those bottom panel Panes to be like a toolTip and notice bar for whats going on

    the Status bar Pane Handle is

    Code:
    	CString strTitlePane1;
    	strTitlePane1.LoadString(IDS_STATUS_PANE1);
    
    	CMFCRibbonStatusBarPane* rsbp = new CMFCRibbonStatusBarPane( ID_STATUSBAR_PANE1, strTitlePane1, TRUE );
    And I wish to change its text

  6. #6
    Join Date
    Nov 2008
    Posts
    397
    well I managed to get the text in Pane1 to change, havent done pane 2 yet but am working on that, thought I might paste the solution for others

    Code:
    	CMainFrame* pFrame= (CMainFrame*) AfxGetMainWnd();
    
    	pFrame->m_wndStatusBar.SetInformation(_T("Random"));
    **EDIT

    Go the Second Pane, as its an extended element you need to call for Pane 2

    Code:
    	CMainFrame* pFrame= (CMainFrame*) AfxGetMainWnd();
    
            pFrame->m_wndStatusBar.GetExElement(0)->SetText(_T("Random"));
    Last edited by sarriss2; 11-22-2010 at 12:13 PM.

  7. #7
    Join Date
    Jun 2003
    Location
    Trier, Germany
    Posts
    1,350
    glad you figured it out

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •