my program that has 2 threads running and a global exception handler
thread 1 has 1 Window Main and thread 2 has another Window Logger as well.

what i'm trying to do is if thread 1 crashes on some part of my code because of INVALID MEMORY ACCESS i would like to log the exception on Window Logger which runs on my second thread, which just logs the exception code and address.

i already coded this, but i having a problem
inside the Global Exception Handler and logging the exception to the second window, and Im waiting for User input to know if he wants to continue logging for errors or exit.

so inside a forever loop i check for F7 using GetAsyncKeyState if 1 I exit the loop if not i Sleep 500 and recheck F7
if user press F7 then I return CONTINUE to the exception handler if user doesnt want to continue 0 and program exits.

it is "working" but second window is slow, cant move it around and if window loses focus i cant get it back, it shouldnt do that window it is running on a different thread right?

the forever loop /sleep 500 is on thread #1 or is it a system thread?
any way to fix it? TY
Posted on 2009-10-22 20:50:22 by SADE
Do you have separate window message pumps for these windows?
Posted on 2009-10-23 01:59:17 by Homer
yes, the program is working fine now, it always did  :lol:
the problem was i was trying to get focus on the first window (thread 1 idle) and that is why the second window (thread 2) couldn't regain focus, and was slow as hell.

Posted on 2009-10-23 16:06:56 by SADE