Click here to Skip to main content
16,014,294 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: remote login to Windows machine Pin
David Crow5-Apr-07 2:46
David Crow5-Apr-07 2:46 
GeneralRe: remote login to Windows machine Pin
Syamlal S Nair5-Apr-07 2:58
Syamlal S Nair5-Apr-07 2:58 
GeneralRe: remote login to Windows machine Pin
Syamlal S Nair5-Apr-07 3:01
Syamlal S Nair5-Apr-07 3:01 
GeneralRe: remote login to Windows machine Pin
David Crow5-Apr-07 3:05
David Crow5-Apr-07 3:05 
Questionmodeless dialog Pin
si_695-Apr-07 1:05
si_695-Apr-07 1:05 
AnswerRe: modeless dialog Pin
Naveen5-Apr-07 1:21
Naveen5-Apr-07 1:21 
AnswerRe: modeless dialog Pin
James R. Twine5-Apr-07 1:58
James R. Twine5-Apr-07 1:58 
GeneralRe: modeless dialog Pin
Mark Salsbery5-Apr-07 8:47
Mark Salsbery5-Apr-07 8:47 
Hola James,

I don't think it's kludgy if one understands message loops. Message loops are our responsibility.
It's been that way from the start. MFC hides it from us so it seems alot of us forget we're in
charge of message processing.

For MFC, sometimes CWinThread::PumpMessage is more appropriate
than ::TranslateMessage/::DispatchMessage. Then the pretranslatemessage processing and any
other CWinThread/CWnd shenanigans gets done Smile | :) . Of course, that may not be the desired effect and
at times it's appropriate to bypass the CWinThread message loop processing and eat all the
messages (I do that when "rubberbanding").
for (int f=0; f< mylist.GetItemCount(); f++)
{
   // Pump all queued messages
   MSG msg;
   while (::PeekMessage( &msg, NULL, 0, 0, PM_NOREMOVE)) 
   { 
      if (!AfxGetApp()->PumpMessage()) 
      { 
         break; 
      } 
   }
 
   // do some stuff
   // Update Progress bar
}


Piece,
Mark


"If you can dodge a wrench, you can dodge a ball."

Questionhello Pin
aarti sharma5-Apr-07 0:47
aarti sharma5-Apr-07 0:47 
AnswerRe: hello Pin
toxcct5-Apr-07 1:02
toxcct5-Apr-07 1:02 
GeneralRe: hello Pin
cp98765-Apr-07 1:11
cp98765-Apr-07 1:11 
AnswerRe: hello Pin
Rajesh R Subramanian5-Apr-07 1:11
professionalRajesh R Subramanian5-Apr-07 1:11 
GeneralRe: hello Pin
Naveen5-Apr-07 1:29
Naveen5-Apr-07 1:29 
AnswerRe: hello Pin
kakan5-Apr-07 2:03
professionalkakan5-Apr-07 2:03 
AnswerRe: hello Pin
Eytukan5-Apr-07 2:27
Eytukan5-Apr-07 2:27 
GeneralRe: hello Pin
toxcct5-Apr-07 2:29
toxcct5-Apr-07 2:29 
GeneralRe: hello Pin
ThatsAlok22-Apr-07 23:15
ThatsAlok22-Apr-07 23:15 
AnswerRe: hello Pin
Ranjoy Guha5-Apr-07 3:54
Ranjoy Guha5-Apr-07 3:54 
GeneralRe: hello Pin
toxcct5-Apr-07 3:59
toxcct5-Apr-07 3:59 
GeneralRe: hello Pin
Ranjoy Guha5-Apr-07 4:05
Ranjoy Guha5-Apr-07 4:05 
GeneralRe: hello Pin
toxcct5-Apr-07 4:11
toxcct5-Apr-07 4:11 
GeneralRe: hello Pin
Ranjoy Guha5-Apr-07 4:18
Ranjoy Guha5-Apr-07 4:18 
QuestionRe: hello Pin
Hamid_RT5-Apr-07 18:43
Hamid_RT5-Apr-07 18:43 
AnswerRe: hello Pin
ThatsAlok22-Apr-07 23:15
ThatsAlok22-Apr-07 23:15 
GeneralRe: hello Pin
Eytukan22-Apr-07 23:18
Eytukan22-Apr-07 23:18 

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.