Click here to Skip to main content
15,921,174 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi, i using vs2010 and my app has a ribbon bar

all is working find in the main thread, i can get the ribbon object pointer, use FindByID to get ui elements and read and modify them as necessary

however, when i have another thread running (midi playback thread in this case), any type of access to the ribbon crashes, well most of the time, sometimes its works!

very strange. any idea why an MFC app would crash which accessing the ribbon in a thread?

thanks
Posted

Working with the MFC UI using a non-UI thread is a problem which is pretty well explained here:
Using Worker Threads[^]; you cannot call any UI methods from non-UI thread.

In particular, look at the section "Worker threads and the GUI".

—SA
 
Share this answer
 
thanks for that. i was able to pass the info i needed back to the UI thread from the midi thread and have the UI thread do the UI updates stuff.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900