CStatus bar isn't displaying text in any pane other than 0 
Author Message
 CStatus bar isn't displaying text in any pane other than 0

I have an MDI frame window with a CStatusBar.  
The status bar has 3 panes ( not counting 0 );
Pane 1 shows the path to the current file being displayed
Pane 2 shows the date of the current file being displayed
Pane 3 shows the current page number of the file being displayed.

Panes 1, 2, and 3 are not showing their respective texts.
This is the call that I'm using.

void CMainFrame::T2ChangePane(int nPane,LPCSTR text)
   {
   UINT id, style;
   int width;

   CSize x;  
   CDC *cdc = m_wndStatusBar.GetDC();
   if( text != (LPCSTR)NULL )
      {
      x = cdc->GetTextExtent( text, strlen(text ) );
      m_wndStatusBar.GetPaneInfo( nPane, id, style, width );
      m_wndStatusBar.SetPaneInfo( nPane, id, style, x.cx );
      }
   m_wndStatusBar.ReleaseDC( cdc );
   m_wndStatusBar.SetPaneText(nPane,text,TRUE);
   }  

If I change SetPaneText to SetWindowText ( to set pane 0 ), the text is
displayed as it should be.

Does anyone have any ideas?



Sat, 10 Jul 1999 03:00:00 GMT  
 CStatus bar isn't displaying text in any pane other than 0

Hi Gandalf,

I recommend to look up article Q99198 in the MS Knowledge Base, which
describes how to display the current date & time in the statusbar.

You find the article on the MSDN CD or on the MS web site.

ThomasZ [MVP]



Sun, 11 Jul 1999 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. NULL isn't 0/0 isn't NULL

2. Write text to task bar / status pane

3. How to gray text in status bar panes

4. Graying text in panes of the status bar

5. CStatus Bar

6. CStatus bar

7. Listview isn't fully displayed

8. CStatus Bar and MFC 4.0

9. How to remove scroll bar from the splitter's pane

10. How to remove scroll bar from the splitter's pane

11. Paint Event isn't ever called by the Rich Text Box control

12. Combo box isn't show any text ?

 

 
Powered by phpBB® Forum Software