This is a little embarassing asking this because I used to know this. How do you create a seperate thread in C++ and have mutexes, semiphores and all that. I have forgotten and I wonder if anyone knows a good example.

12 Years
Discussion Span
Last Post by complete

depends on the operating system. For ms-windows, I use CreateThread() and CreateMutex(). see MSDN for details.


Are these things that require MFC? The information I got from Microsoft was __declspc(thread), _beginthread() and _endthread()


Lots of good help.

I will add to your rep.

Now I want to know is this.

How do I open a window in a seperately called thread of execution?

I cannot do it in MFC because MFC requires its own thread of execution.

But even when I create a windows app without MFC, it seems entry point. _t winMain is called by an main thread of execution nested in a microsoft routine. I want my own thread to call my own winmain. How do I do this?

(Maybe I need to look at the mozilla open source to see)

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.