x
This website is using cookies. We use cookies to ensure that we give you the best experience on our website. More info. That's Fine
HPC:Factor Logo 
 
Latest Forum Activity

Progress bar in WindowsCE 5.0

gan Page Icon Posted 2007-11-09 5:21 AM
#
Avatar image of gan
H/PC Newbie

Posts:
5
Status:
Hi Every one,

I am new to this forum and to Windows CE. I like to include the progress control into my application for that i used timer to increase the progress bar and decrease as it reaches the top. The problem which I am facing is, the movement of the progress bar is strucking sometime or the progress bar movement is not smooth, even sometimes the bar movement is flashing. I want the progress bar to be increased and decreased in regular interval in smooth fashion. Can any one help me out to solve this issue for me.

I am using Single board computer connected with PXA270 processor.
If there is any sample code I really appreciate your interest.

Looking forward to hear from you ASAP.

Thanks & Regards,
gan
 Top of the page
chiark Page Icon Posted 2007-11-09 10:21 AM
#
Avatar image of chiark
H/PC Sensei

Posts:
1,330
Location:
North of England
Status:
How are you updating the progress bar?

There's sample code, IIRC, in the sample SDK.
 Top of the page
stingraze Page Icon Posted 2007-11-11 4:04 AM
#
Avatar image of stingraze
H/PC Vanguard

Posts:
3,656
Location:
Japan
Status:
It might be that it does not refresh correctly because of incorrect loop.

Hope it helps.
 Top of the page
gan Page Icon Posted 2007-11-13 2:24 AM
#
Avatar image of gan
H/PC Newbie

Posts:
5
Status:
Thanks for your reply.

I have herewith sending you the code which i used in my application, In that I faced there is a struck of progress bar in few seconds. I want there should be no struck in the movement of progress bar.

Looking forward for your reply ASAP.

Thanks & Reply
Gan

This is my code for your reference.....

////////////////// code ///////////////////////////

In onInitDialog()
{

...........
AfxBeginThread(HandleMovementBar, this,3,0,0,0 );

}



// The thread implemented to take care of movement bar display continuously.
UINT CDisplayProgress::HandleMovementBar(LPVOID param)
{
TRY{
// constants; counters/initialisers used for tempo bar display
int iBase = 0;
int iFlag = 1;
int iCount = 1;

// The current series display identifier.
CDisplayProgress* dpCurrentSeries = (CDisplayProgress*)param;

while (true) {
//Setting the tempo bar current status display
dpCurrentSeries->m_CtlTempoBar.SetPos(iBase + ((iCount*iFlag)*10));

//calculating the tempo bar next status display
if (iCount == 25)
{
iFlag = iFlag * (-1);

if (iFlag>0)
{
iBase = 0;
}else
{
iBase = 250;
}
iCount = 0;
}
++iCount;
if (!dpCurrentSeries->bContinueMovementDisplay) break; //Exit on screen stop/pause
Sleep(100); //Break for 100 milliseconds.

}

}
CATCH_ALL(e) {
}
END_CATCH_ALL
return 0;
}



 Top of the page
Jump to forum:
Seconds to generate: 0.142 - Cached queries : 60 - Executed queries : 10