Sign in to follow this  
elih1

Dialog from boost thread

Recommended Posts

Hello Is it allowed to start Mfc dialog or Windows api dialog box from boost thread, and if not is there a way to do that? Actually I did some tests with different dialogs and can't find clear explanation yet, cause some of the dialogs that I created from boost thread work well, and some don't. So the question is does boost newly created thread has already automatically builtin message loop inside it , so I can create Dialogs from it, similar like MFC UI thread? or maybe it it just represents a worker thread. Thanks

Share this post


Link to post
Share on other sites
Boost threads does absolutely nothing else besides calling the Windows threading API. Whatever the problems are, they are unrelated to boost's wrapper.

Make sure to read all the remarks on threading in MFC (and classes you are using) as well as related WinAPI issues. There is a ton of gotchas.

Share this post


Link to post
Share on other sites
I believe that MFC is inherently not thread-safe, meaning the only thread that should be messing with the GUI is your application's main thread. If one of your worker threads wants the GUI to be modified in any way, it should tell the GUI (main) thread via PostThreadMessage().

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this