问题描述
我正在创建一个用于创建GUI的DLL,这就是我计划它工作的方式:
1.应用程序调用DLL函数创建一个带有按钮的表单
2. DLL在新线程中创建表单(因此应用程序不会卡住)
3.应用程序必须在任何时候显示消息 (不只是一次!)在表单上按下一个按钮< -This就是问题。
现在这让我烦恼:DLL如何向应用程序发送消息,因为就在DLL启动了新线程(对于表单),它向应用程序返回一个值,以便应用程序可以继续它的工作。
任何帮助都将不胜感激。
I am making a DLL for creating GUIs and this is how I have planned for it to work:
1. Application calls the DLL function to create a form with a button on it
2. DLL creates a form in a new thread(so the application doesn't get stuck)
3. Application has to show a message whenever(not just once!) a button is pressed on the form <-This is the problem.
Now this is bugging me: how can the DLL send message to the application, because just right after the DLL started the new thread(for the form), it returned a value to the application so the application could continue it's work.
Any help would be appreciated.
推荐答案
这篇关于如何从多线程DLL函数向调用者应用程序发送消息?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!