Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MFC multithreaded

Status
Not open for further replies.

chris2001a

Programmer
Joined
Oct 8, 2001
Messages
5
Location
GB
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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top