Click here to Skip to main content
15,921,062 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Entering a password in the Command Prompt Pin
Alvaro Mendez8-Nov-01 5:28
Alvaro Mendez8-Nov-01 5:28 
GeneralRe: Entering a password in the Command Prompt Pin
Alvaro Mendez8-Nov-01 6:16
Alvaro Mendez8-Nov-01 6:16 
GeneralRe: Entering a password in the Command Prompt Pin
Joaquín M López Muñoz7-Nov-01 12:20
Joaquín M López Muñoz7-Nov-01 12:20 
QuestionLoops and MFC? Pin
7-Nov-01 11:16
suss7-Nov-01 11:16 
AnswerRe: Loops and MFC? Pin
Stan Shannon7-Nov-01 11:24
Stan Shannon7-Nov-01 11:24 
GeneralRe: Loops and MFC? Pin
7-Nov-01 11:31
suss7-Nov-01 11:31 
GeneralRe: Loops and MFC? Pin
7-Nov-01 11:38
suss7-Nov-01 11:38 
GeneralRe: Loops and MFC? Pin
Alvaro Mendez7-Nov-01 11:59
Alvaro Mendez7-Nov-01 11:59 
What do you mean it's because of INT_MAX. Do you mean you're looping INT_MAX times??? That would explain it!

If you don't give your window the ability to process messages (such as mouse clicks) while the loop is running, it will freeze. Write yourself a little function like this:

void AMS_ProcessMessages()
{
	for (MSG msg; ::PeekMessage(&msg, NULL, 0, 0, PM_REMOVE); )
	{
		::TranslateMessage(&msg);
		::DispatchMessage(&msg);
	}
}


And call it inside your loop. That should, if nothing else, prevent your window from freezing.

Regards,
Alvaro
GeneralRe: Loops and MFC? Pin
7-Nov-01 14:30
suss7-Nov-01 14:30 
GeneralRe: Loops and MFC? Pin
Michael Dunn7-Nov-01 15:25
sitebuilderMichael Dunn7-Nov-01 15:25 
Question2 problems. Any takers? Pin
ParaSwarm7-Nov-01 11:10
ParaSwarm7-Nov-01 11:10 
AnswerRe: 2 problems. Any takers? Pin
Joaquín M López Muñoz7-Nov-01 11:30
Joaquín M López Muñoz7-Nov-01 11:30 
AnswerRe: 2 problems. Any takers? Pin
Anders Molin7-Nov-01 12:00
professionalAnders Molin7-Nov-01 12:00 
AnswerRe: 2 problems. Any takers? Pin
Alvaro Mendez7-Nov-01 12:25
Alvaro Mendez7-Nov-01 12:25 
GeneralDialog box application Pin
7-Nov-01 9:51
suss7-Nov-01 9:51 
GeneralRe: Dialog box application Pin
Ravi Bhavnani7-Nov-01 9:57
professionalRavi Bhavnani7-Nov-01 9:57 
GeneralRe: Dialog box application Pin
7-Nov-01 10:09
suss7-Nov-01 10:09 
QuestionHow can I access VC++/MSDN help from outside DevStudio? Pin
7-Nov-01 9:16
suss7-Nov-01 9:16 
GeneralList View Help! Pin
gas7-Nov-01 8:11
gas7-Nov-01 8:11 
GeneralRe: List View Help! Pin
Carlos Antollini7-Nov-01 8:25
Carlos Antollini7-Nov-01 8:25 
GeneralRe: List View Help! Pin
gas7-Nov-01 9:45
gas7-Nov-01 9:45 
GeneralRe: List View Help! Pin
Ravi Bhavnani7-Nov-01 10:06
professionalRavi Bhavnani7-Nov-01 10:06 
GeneralRe: List View Help! Pin
Ravi Bhavnani7-Nov-01 10:10
professionalRavi Bhavnani7-Nov-01 10:10 
GeneralRe: List View Help! Pin
gas7-Nov-01 11:06
gas7-Nov-01 11:06 
GeneralPutting Checkbox in ListCtrl ! Pin
Hadi Rezaee7-Nov-01 7:33
Hadi Rezaee7-Nov-01 7:33 

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.