Click here to Skip to main content
16,008,010 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: CFileDialog SaveAs Question Pin
moobob1-Aug-02 7:29
moobob1-Aug-02 7:29 
GeneralRe: CFileDialog SaveAs Question Pin
Chris Losinger1-Aug-02 7:32
professionalChris Losinger1-Aug-02 7:32 
GeneralRe: CFileDialog SaveAs Question Pin
moobob1-Aug-02 7:39
moobob1-Aug-02 7:39 
GeneralRe: CFileDialog SaveAs Question Pin
includeh101-Aug-02 8:40
includeh101-Aug-02 8:40 
GeneralRe: CFileDialog SaveAs Question Pin
Chris Losinger1-Aug-02 8:43
professionalChris Losinger1-Aug-02 8:43 
QuestionAllow UI during processing?? Pin
JennyP1-Aug-02 6:36
JennyP1-Aug-02 6:36 
AnswerRe: Allow UI during processing?? Pin
Chris Losinger1-Aug-02 6:49
professionalChris Losinger1-Aug-02 6:49 
AnswerRe: Allow UI during processing?? Pin
Ravi Bhavnani1-Aug-02 7:41
professionalRavi Bhavnani1-Aug-02 7:41 
Chris is right.

But you can also use poor man's threading by pumping the message queue, if your endless loop can be broken up into smaller tasks that are repeatedly executed. Here's how to pump the message queue.
while (moreWorkToDo()) {
  doSomeWork();
  pumpMessageQueue();
  if (cancelled()) {
     break;
  }
}

void pumpMessageQueue()
{
  MSG   msg;
  while (::PeekMessage (&msg, NULL, 0, 0, PM_NOREMOVE)) {
        AfxGetThread()->PumpMessage();
  }
}
Regardless of which method you select, remember to ensure that the user is prevented from executing invalid GUI operations (eg: exiting the app) during processing. Usually, the only operations permitted during processing are (1) updating progress and (2) checking if the user chose to interrupt the process.

/ravi

Let's put "civil" back into "civilization"
http://www.ravib.com
ravib@ravib.com
GeneralRe: Allow UI during processing?? Pin
JennyP1-Aug-02 7:49
JennyP1-Aug-02 7:49 
GeneralRe: Allow UI during processing?? Pin
Ernest Laurentin1-Aug-02 10:32
Ernest Laurentin1-Aug-02 10:32 
GeneralRe: Allow UI during processing?? Pin
Ravi Bhavnani1-Aug-02 11:38
professionalRavi Bhavnani1-Aug-02 11:38 
GeneralRe: Allow UI during processing?? Pin
Ernest Laurentin1-Aug-02 18:42
Ernest Laurentin1-Aug-02 18:42 
Generalautocomplete in VS.NET Pin
Alexey Kourakolov1-Aug-02 5:44
Alexey Kourakolov1-Aug-02 5:44 
GeneralRegistry management Pin
Cristiano Galeazzi1-Aug-02 5:39
sussCristiano Galeazzi1-Aug-02 5:39 
GeneralRe: Registry management Pin
Tomasz Sowinski1-Aug-02 5:52
Tomasz Sowinski1-Aug-02 5:52 
Questionwrite data to .exe itself, possible? Pin
includeh101-Aug-02 5:24
includeh101-Aug-02 5:24 
AnswerRe: write data to .exe itself, possible? Pin
Jeremy Falcon1-Aug-02 5:31
professionalJeremy Falcon1-Aug-02 5:31 
GeneralRe: write data to .exe itself, possible? Pin
Tomasz Sowinski1-Aug-02 5:37
Tomasz Sowinski1-Aug-02 5:37 
GeneralRe: write data to .exe itself, possible? Pin
Jeremy Falcon1-Aug-02 5:53
professionalJeremy Falcon1-Aug-02 5:53 
GeneralRe: write data to .exe itself, possible? Pin
Tomasz Sowinski1-Aug-02 6:04
Tomasz Sowinski1-Aug-02 6:04 
GeneralRe: write data to .exe itself, possible? Pin
Jeremy Falcon1-Aug-02 6:11
professionalJeremy Falcon1-Aug-02 6:11 
GeneralRe: write data to .exe itself, possible? Pin
includeh101-Aug-02 6:12
includeh101-Aug-02 6:12 
GeneralRe: write data to .exe itself, possible? Pin
Joaquín M López Muñoz1-Aug-02 7:44
Joaquín M López Muñoz1-Aug-02 7:44 
GeneralRe: write data to .exe itself, possible? Pin
Daniel Lohmann1-Aug-02 8:24
Daniel Lohmann1-Aug-02 8:24 
GeneralRe: write data to .exe itself, possible? Pin
Joaquín M López Muñoz1-Aug-02 8:38
Joaquín M López Muñoz1-Aug-02 8:38 

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.