chris2001a
Programmer
Hi there,
I've got a program I wrote in C that I want to port to win32 with a nice interface. The problem comes from a do-while loop I had in my C program that waits for a user key-pressed ( kbhit() ).
In my interface, I'm using a STOP button in place of the kbhit() method. But my program doesn't respond anymore. I traced it down to MFC doing a PumpMessage() and not returning since my thread is looping in there :-(
Now I'm trying to put my code in a separate Thread... does anybody know how do to this?
I tried using AfxBeginThread() but then it does link 'cos of my static BOOL stop variable...
Any example/tips very very welcome
Chris
I've got a program I wrote in C that I want to port to win32 with a nice interface. The problem comes from a do-while loop I had in my C program that waits for a user key-pressed ( kbhit() ).
In my interface, I'm using a STOP button in place of the kbhit() method. But my program doesn't respond anymore. I traced it down to MFC doing a PumpMessage() and not returning since my thread is looping in there :-(
Now I'm trying to put my code in a separate Thread... does anybody know how do to this?
I tried using AfxBeginThread() but then it does link 'cos of my static BOOL stop variable...
Any example/tips very very welcome
Chris