Progress bar
-
i want to use a progress bar in my dialog based MFC application,i have draged progess bar from tool box and have made its variable named m_prog now i dnt know what to do for making it working...can n e budy help me out in this....thanx.
The first thing to think about is that you need to have a task with some progress. The common mistake people do when using a progress bar is that they put their task in the main thread and regularly advance progress on the progress bar. This is not going to work because while you are processing your task, no messages are processed which means the full UI will freeze (and the progress bar won't progress). What kind of task are you running ? Is it a kind of computation ? If yes, is it running in a separate thread ?
Cédric Moonen Software developer
Charting control [v2.0] OpenGL game tutorial in C++ -
The first thing to think about is that you need to have a task with some progress. The common mistake people do when using a progress bar is that they put their task in the main thread and regularly advance progress on the progress bar. This is not going to work because while you are processing your task, no messages are processed which means the full UI will freeze (and the progress bar won't progress). What kind of task are you running ? Is it a kind of computation ? If yes, is it running in a separate thread ?
Cédric Moonen Software developer
Charting control [v2.0] OpenGL game tutorial in C++ -
i want to use a progress bar in my dialog based MFC application,i have draged progess bar from tool box and have made its variable named m_prog now i dnt know what to do for making it working...can n e budy help me out in this....thanx.
What about documentation [^]? :)
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
[My articles] -
yes...i m doing coplex calculations...inplementing methemathical algorithms....and these are happining in saperate methods.
MahaKh wrote:
saperate methods.
He asked about separate threads. If that was a difficulty with language, no problem. If you don't understand the difference between a method and a thread, you have a whole lotta reading to do. Have a search for CreateThread, AfxBeginThread, PostMessage. Read these essays too: http://www.flounder.com/mvp_tips.htm#hreads%20and%20Processes%20series[^] Iain.
I have now moved to Sweden for love (awwww). If you're in Scandinavia and want an MVP on the payroll (or happy with a remote worker), or need contract work done, give me a job! http://cv.imcsoft.co.uk/[^]
-
The first thing to think about is that you need to have a task with some progress. The common mistake people do when using a progress bar is that they put their task in the main thread and regularly advance progress on the progress bar. This is not going to work because while you are processing your task, no messages are processed which means the full UI will freeze (and the progress bar won't progress). What kind of task are you running ? Is it a kind of computation ? If yes, is it running in a separate thread ?
Cédric Moonen Software developer
Charting control [v2.0] OpenGL game tutorial in C++Cedric Moonen wrote:
(and the progress bar won't progress).
So what's the point in having a progress bar that won't progress? That just sounds counterintuitive. I suggest an unprogress bar instead. That way it won't matter if the primary thread is busy or not.
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons