my prob is that i have a for loop when someone clicks a button on the dialog, it goes like this:

Code:

for (int i=0;i<100;i++)
{
SetDlgItemInt(haha,haha,haha,i,haha);
}

so i set a control with a int and it increases until it gets to 100. but this causes the programs proc to freeze until i gets to 100, so i was thinking somthing like createthread() might be necessary but that takes the ........ so is there anything else that could be a solution? another kind of msg proc perhaps?

07-07-2002

adrianxw

If you are doing this inside your windows function, (in a WM_COMMAND handler or something), then the message loop in your main() is not going to be able to process any messages, so, yes, it will seem to freeze the ptrogram until the loop completes.

Explain what you are trying to do.

07-07-2002

Unregistered

I wanted to use something other than CreateThread() to prevent my program from freezing until the loop completes because I can barely understand CreateThread() but I managed to use it anyway like so:

Am I using it properly, would I want to bother with those other parameters?

07-08-2002

adrianxw

If you don't need the other parameters, don't use them. Be careful with CreateThread(), if you use the standard library routines at the same time as CreateThread() you can give yourself memory leak problems. beginthread() is a safer alternative.