Click here to Skip to main content
15,886,864 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
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.
Posted

1 solution

Theres a few ways you could solve this:

1. Send a Windows Message back to the mainform and have the mainform listen for it.
2. Use sockets e.g. UDP to send a message back to the main application.
3. Display the popup message directly from the DLL.
 
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