Hello
RunUserInterface() starts a message loop which does not return until you call QuitUserInterface(). So Any code placed after RunUserInterface() will only run after after the message loop is completed.
Calling RunUserInterface() in another will only create a message loop in that thread. In which case, the UI in the main thread will not do anything, since you wont have a message loop in the main thread.
If all you need is to run some function after your message loop has initialized, Use one of the thread pool functions to schedule your code() in another thread. You can use CmtScheduleThreadPoolFunction() for that.
If you code() has some panel initialization, you can create callbacks for the panel and call code() there instead of scheduling it in a threa
dpool.
Hope this helps
Bilal Durrani
NI
Bilal Durrani
NI