To notify GUI thread, I use PostCallback. It is a very easy way.
You might enjoy checking out Ctrl::Call. Combined with lambda that is even easier.
Current rules for parallel GUI programming:
- only the main thread can manipulate windows (open, close, move) or run event loop (this is actually a limitation forced by win32 architecture)
- exception to this rule is Prompt* function which open window but can be called from non-main threads
- except this, non-main threads can call widget methods as long as they use GuiLock