I\'m trying to create a message-only window to receive window messages from an MFC library class, within a winforms application.
I\'ve tried subclassing NativeWind
I fear that you must derive from a Form
, and force the window invisible.
Another approach (in the case the class library is modifiable) is to run a message pump without a window (see Application.Run and Application.AddMessageFilter, or if you prefer pinvokes using PeekMessage & Co).
In this case you can send messages using PostThreadMessage by having the thread id which as run Application.Run, but actually you cannot synch with the application message pump thread because it doesn't wait message acknowledge.