Click here to Skip to main content
15,899,679 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: thanks! Pin
Ravi Bhavnani25-Sep-02 4:32
professionalRavi Bhavnani25-Sep-02 4:32 
QuestionHow to make a progressCtrl vanish when its done? Pin
ns25-Sep-02 3:08
ns25-Sep-02 3:08 
AnswerRe: How to make a progressCtrl vanish when its done? Pin
jhwurmbach25-Sep-02 3:23
jhwurmbach25-Sep-02 3:23 
GeneralRe: How to make a progressCtrl vanish when its done? Pin
ns25-Sep-02 3:31
ns25-Sep-02 3:31 
GeneralRe: How to make a progressCtrl vanish when its done? Pin
jhwurmbach25-Sep-02 3:37
jhwurmbach25-Sep-02 3:37 
GeneralRe: How to make a progressCtrl vanish when its done? Pin
Ravi Bhavnani25-Sep-02 4:34
professionalRavi Bhavnani25-Sep-02 4:34 
GeneralRe: How to make a progressCtrl vanish when its done? Pin
ns25-Sep-02 4:46
ns25-Sep-02 4:46 
GeneralRe: How to make a progressCtrl vanish when its done? Pin
Ravi Bhavnani25-Sep-02 4:58
professionalRavi Bhavnani25-Sep-02 4:58 
ns wrote:
we hide it but dont clear it.

Correct. To clear (i.e. reset) the progress control, you'd need to call SetPos (0). The progress control doesn't automatically reset - your code must be causing that to happen.

ns wrote:
could nt figure out what to do to make it take time in the sendmessage loop

Aha! I use this trick:
CProgressCtrl* pProgCtrl = ...;
for (long nIndex=0; (nIndex < 100); nIndex++) {
   doSomeWork();
   pProgCtrl->SetPos (nIndex + 1);

   // Pump the message queue (needed to make Windows react to the SetPos())
   MSG   msg;
   while (::PeekMessage (&msg, NULL, 0, 0, PM_NOREMOVE)) {
         AfxGetThread()->PumpMessage();
   }

   // Pause for 50 mSec so that user "sees" progress
   Sleep (50);
}
If you use my TaskTimer[^] class, you can show your user the elasped and remaining times. Makes for good usability, but is certainly not necessary!

/ravi

Let's put "civil" back in "civilization"
http://www.ravib.com
ravib@ravib.com
AnswerRe: How to make a progressCtrl vanish when its done? Pin
ns25-Sep-02 3:40
ns25-Sep-02 3:40 
GeneralRe: How to make a progressCtrl vanish when its done? Pin
Daniel Ferguson25-Sep-02 4:27
Daniel Ferguson25-Sep-02 4:27 
GeneralRe: How to make a progressCtrl vanish when its done? Pin
ns25-Sep-02 4:35
ns25-Sep-02 4:35 
GeneralDLL and PDB files Pin
Jean-Michel LE FOL25-Sep-02 3:06
Jean-Michel LE FOL25-Sep-02 3:06 
GeneralRe: DLL and PDB files Pin
Pavel Klocek25-Sep-02 3:28
Pavel Klocek25-Sep-02 3:28 
GeneralRe: DLL and PDB files Pin
Jean-Michel LE FOL25-Sep-02 5:45
Jean-Michel LE FOL25-Sep-02 5:45 
GeneralRe: DLL and PDB files Pin
Stefan Pedersen25-Sep-02 4:06
Stefan Pedersen25-Sep-02 4:06 
GeneralSystem Error 2221 Pin
abhinarulkar25-Sep-02 2:46
abhinarulkar25-Sep-02 2:46 
GeneralRe: System Error 2221 Pin
Le centriste25-Sep-02 3:47
Le centriste25-Sep-02 3:47 
GeneralHelp with MDI Pin
MFC is the Best25-Sep-02 2:26
MFC is the Best25-Sep-02 2:26 
GeneralRe: Help with MDI Pin
Tomasz Sowinski25-Sep-02 2:32
Tomasz Sowinski25-Sep-02 2:32 
GeneralRe: Help with MDI Pin
MFC is the Best25-Sep-02 4:01
MFC is the Best25-Sep-02 4:01 
GeneralRe: Help with MDI Pin
MFC is the Best25-Sep-02 5:12
MFC is the Best25-Sep-02 5:12 
GeneralHELP! LOAD A BITMAP Pin
Lucky200225-Sep-02 1:47
Lucky200225-Sep-02 1:47 
GeneralRe: HELP! LOAD A BITMAP Pin
Zizilamoroso25-Sep-02 1:47
Zizilamoroso25-Sep-02 1:47 
GeneralRe: HELP! LOAD A BITMAP Pin
Lucky200225-Sep-02 1:56
Lucky200225-Sep-02 1:56 
GeneralRe: HELP! LOAD A BITMAP Pin
Tomasz Sowinski25-Sep-02 1:56
Tomasz Sowinski25-Sep-02 1:56 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.