- Moderator
- #1
Hi,
I am trying to develop a plugin but ran into some problems. I want to listen to events dispatched by windows via the windows message queue. Normally in WindowsForms applications this could be done by overriding the WndProc function. As the plugin is a DLL my class is not derived from System.Windows.Forms.Form therefor I don't have a WndProc function to override.
I tried to just add a class derived from Form, but the message queue won't be available until I show the form. As you know, that is not possible.
Does anyone here know another way to get the windows messages in a MediaPortal plugin?
I stumbled over the class NativeWindow, but it needs a windowId to work - same problem as before :-/
Thanks,
Shukuyen.
I am trying to develop a plugin but ran into some problems. I want to listen to events dispatched by windows via the windows message queue. Normally in WindowsForms applications this could be done by overriding the WndProc function. As the plugin is a DLL my class is not derived from System.Windows.Forms.Form therefor I don't have a WndProc function to override.
I tried to just add a class derived from Form, but the message queue won't be available until I show the form. As you know, that is not possible.
Does anyone here know another way to get the windows messages in a MediaPortal plugin?
I stumbled over the class NativeWindow, but it needs a windowId to work - same problem as before :-/
Thanks,
Shukuyen.