help in MFC threads UI
hi im using c++ mfc project with UI treads i have a class name manager and class name calc which should dervied from CWinThread. the manager class need to have the开发者_运维问答 ability to send data to calc and to use some func from it. i have no idea how to make start i dont know how to use CWinThread and how to create the treads. please help. thanks
I don't understand exactly what you're trying to do, but as far as I remember from the good old mfc days, there was usually a better/simple solution using windows massages than threads to most of the problems. Check if this applys to your situation.
(a window doesn't have to be something you show...)
If you have no idea on UI threads, I wonder how did you conclude that you need UI threads to accomplish something. Here's a nice tutorial on UI threads: UI Threads.
You can send data to an UI thread by calling PostThreadMessage() API.
However, I don't understand why does your design require that the manager class be able to "use" some function that belongs to the UI thread class.
精彩评论