Progress bar is not showing on status bar
I cannot get my progress bar to show on the status bar. The
only way I found around it to show is to use
MyPBar.SetWindowPos(...). Doing it this way, though,
mispositions the progress bar on different computers. How
do I lock it to my status bar? Here's what I have:
In MainFrm.cpp:
CRect rect;
m_wndStatusBar.GetItemRect(2, &rect);
m_ProgBar.Create(WS_VISIBLE | WS_CHILD | PBS_SMOOTH,
rect, this, ID_INDICATOR_PBAR);
m_ProgBar.SetRange(0,100);//Set the range to between 0
and 100
m_ProgBar.SetStep(1);//Set the step amount
//the line below is brute force, can't find out how to
display ProgBar
m_ProgBar.SetWindowPos(NULL,782,714,105,16,NULL);
In CView.cpp (or elsewhere):
.
.
.
CMainFrame* pFrame =
(CMainFrame*)AfxGetApp()->m_pMainWnd;//pointer to mainframe
object
.
.
.
pFrame->m_ProgBar.StepIt();//never shows on status bar
Any suggestions? Thx