Adding a progress bar control to the status bar 
Author Message
 Adding a progress bar control to the status bar

> I'm trying to add a progress bar to my status bar like the one I.E. 3.0
> when it's loading a page.  I added the following code to my MainFrm class
> in OnCreate :
>    i
> nt nResult;
>    DWORD Style;
>    CRect Rect();

> m_wndStatusBar.GetItemRect(1,Rect);
>    nResult = m_wndProgressBar.Create(Style, Rect, &m_wndStatusBar, 1);
>    ASSERT(nResult);
>    m_wndProgressBar.SetRange(0,100);

> I then try to call SetPos from my view class.

> The progress bar never shows up.  Does anyone know what I'm doing wrong?

Hi Bill

These three member functions of CMainFrame has done it for me several
it looks a lot like your code - but I happen to know that this works. I
think the function names speak for them self.

void CMainFrame::CreateProgressBar(int nLower, int nUpper)
        CRect rcPane;
        m_wndStatusBar.GetItemRect(0, &rcPane); // Choose the right pane

                rcPane, &m_wndStatusBar, 1));
        m_wndProgressBar.SetRange(nLower, nUpper);


void CMainFrame::DestroyProgressBar()
        ASSERT(m_wndProgressBar.m_hWnd != NULL);


void CMainFrame::SetProgressBar(int nPos)
        ASSERT(m_wndProgressBar.m_hWnd != NULL);


Hope this helps.

Henrik E. Rasmussen

Sat, 27 Nov 1999 03:00:00 GMT  
 [ 1 post ] 

 Relevant Pages 

1. progress bar on a status bar

2. progress bar on a status bar

3. Progress bar is not showing on status bar

4. Progress Bar in Status Bar Pane

5. Progress bar in status bar

6. progress bar in the status bar.

7. Progress Bar In A Status Bar

8. How to put a Progress Bar into the Status Bar

9. progress bar in status bar

10. progress control to a status bar control

11. Progress control (or any control) on the status bar

12. progress control on a status bar


Powered by phpBB® Forum Software