i am making an app which when you start it, it displays an intro screen (Splash Screen within the dialog it self)
using the on ShowWindow message,but after that splash is displayed it will display another screen loading all the resources for the app and showing the % in a Progress bar.
If i set up my progress bar and then show it,it displays correctly but when i try to increment it with StepIt,it doesn't want to show the new value (%).
Code:
if i set this wayCode:void CEveControlDlg::OnShowWindow(BOOL bShow, UINT nStatus) { CDialog::OnShowWindow(bShow, nStatus); //show window and show intro image this->SetRedraw(TRUE); m_Intro.ShowWindow(TRUE); m_Intro.UpdateWindow(); Sleep(3000); m_Intro.ShowWindow(FALSE); HBITMAP Loading = (HBITMAP)LoadImage(0,"Loading.bmp",IMAGE_BITMAP,0,0,LR_LOADFROMFILE); m_Loading.SetBitmap(Loading); m_Loading.ShowWindow(TRUE); m_Loading_Prcnt.ShowWindow(TRUE); m_Loading_Prcnt.SetRange(0,100); m_Loading_Prcnt.SetStep(20); m_Loading_Prcnt.StepIt(); //show Loading screen and start loading resources }
it displays the first 20% right but doesn't want to update to 40% when i later call StepIt again after ShowWindow has been called.Code:m_Loading_Prcnt.SetRange(0,100); m_Loading_Prcnt.SetStep(20); m_Loading_Prcnt.StepIt(); m_Loading_Prcnt.ShowWindow(TRUE);
and if i do it this way
it doesn't wan to even show on the screen.Code:m_Loading.ShowWindow(TRUE); m_Loading_Prcnt.ShowWindow(TRUE); m_Loading_Prcnt.SetRange(0,100); m_Loading_Prcnt.SetStep(20); m_Loading_Prcnt.StepIt(); m_Loading_Prcnt;
Can any one tell me what am i doing wrong?
Help will be greatly appreciated.




Reply With Quote