nidayade
Topic Author
Posts: 2
Joined: 23 Oct 2019, 11:48

How to create dll plugin based on noesisGUI which loaded by a win32 application?

24 Oct 2019, 14:07

I work on a win32 CAD application, and usually need to develop some dll plugins running on it.
The host CAD application has it's own message loop, and the dll plugin may have more than one windows.
After the dll plugin is loaded and the dialog ui is opened, I need to continue to interact with the host application .

If I create dll using noesisGUI , is it posible?
How to merge the message loop of noesisGUI and host application? Any example? Thank you very much.
 
User avatar
sfernandez
Site Admin
Posts: 3003
Joined: 22 Dec 2011, 19:20

Re: How to create dll plugin based on noesisGUI which loaded by a win32 application?

25 Oct 2019, 14:08

Yes, you can use NoesisGUI to create a dll plugin.

NoesisGUI doesn't have its own message loop, that is something you have to handle in your plugin when you create the dialog. You should follow our Integration tutorial to see how to update and render our views, and inject the input events (you can take a look at our reference implementation for the a Win32 window in the application framework to see how to generate the appropriate events from the window message loop).
 
nidayade
Topic Author
Posts: 2
Joined: 23 Oct 2019, 11:48

Re: How to create dll plugin based on noesisGUI which loaded by a win32 application?

26 Oct 2019, 01:30

Yes, you can use NoesisGUI to create a dll plugin.

NoesisGUI doesn't have its own message loop, that is something you have to handle in your plugin when you create the dialog. You should follow our Integration tutorial to see how to update and render our views, and inject the input events (you can take a look at our reference implementation for the a Win32 window in the application framework to see how to generate the appropriate events from the window message loop).
The IntegrationGLUT example has a glutMainLoop function that continuously executes GLUT::DisplayFunc() in a while loop.
If I also create such a loop in the dll plugin , when the plugin window is displayed, I will not be able to interact with the host application unless I close the plugin window.

In the dll plugin, how should I execute this GLUT::DisplayFunc()? Do I need to start a new thread and execute GLUT::DisplayFunc() in the while loop of the new thread?

thank you very much for your reply.
 
User avatar
sfernandez
Site Admin
Posts: 3003
Joined: 22 Dec 2011, 19:20

Re: How to create dll plugin based on noesisGUI which loaded by a win32 application?

29 Oct 2019, 10:29

The IntegrationGLUT example has a glutMainLoop function that continuously executes GLUT::DisplayFunc() in a while loop.
That is the main loop of the application, from where messages of all windows in the calling thread are translated and dispatched.

If you create your plugin window in the application thread, then you will be called to your registered WndProc and you will be able to respond to the WM_PAINT to update Noesis views and inject input events.

Although possible, you don't have to create your plugin window in a separate thread and have another message loop.

Who is online

Users browsing this forum: No registered users and 2 guests