Quote Originally Posted by D_Drmmr View Post
Thanks. It helps to understand how dialog message pump works and the problems inherent to such design when using in threads. But this concerns essentially modal dialogs. IMO, it should work with modless dialogs, but what I also understand is that modless CDialog creation is not multi-thread safe regarding to PostThreadMessage.

Quote Originally Posted by D_Drmmr View Post
IMO this is a bad design. Multi-threaded code is hard to debug and it's easy to introduce errors
Indeed, it seems to be a bad design to create windows in separate threads. So I’ll redesign my application that way.
But I do not agree with the fact that MT programming is hard to debug. It’s like everything else: It requires being rigorous.