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

C / C++ / MFC

 
Questionremote login to Windows machine Pin
Syamlal S Nair5-Apr-07 1:56
Syamlal S Nair5-Apr-07 1:56 
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 
   Naveen is correct in that you are not pumping any messages, so with no message flow, your button has no way to indicate that it has been clicked.

   A BG thread is the modern way to do it, but you have to be a bit careful if mixing MFC objects and threads.  The Old School way to do it is to pump messages inside of your for(...) loop.  It may be considered kludgy, but if you ensure that the user cannot activate any other functionality that might break what you are working on, that would be one way to do it.

   For example, something along the lines of the following (may need work):
for (int f=0; f< mylist.GetItemCount(); f++)
{
   MSG msgMSG;
 
   if( ::PeekMessage( &msgMSG, hWndOfModelessDlg, 0, 0, PM_REMOVE ) )
   {
     ::TranslateMessage( &msgMSG );
     ::DispatchMessage( &msgMSG );
   }
   // do some stuff
   // Update Progress bar
}
   Peace!

-=- James
Please rate this message - let me know if I helped or not!<HR>If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong!
Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road!
See DeleteFXPFiles

GeneralRe: modeless dialog Pin
Mark Salsbery5-Apr-07 8:47
Mark Salsbery5-Apr-07 8:47 
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 

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.