I am writing a .NET wrapper around an old MFC-based library. It is based on a class that sends notifications using window messages; it has a function that allows the user to pass a handle to the window, and this window will receive messages.
I could just require that my shell users be in a subclass Controland pass in their control descriptor to receive messages, but this is terrible. I want my wrapper class to have events that fire when the old library sends a message, and then I can make the decoding of the message something reasonable. But I do not want my wrapper class to be a control.
Is there a way to create a 'dummy' window handle and receive messages sent to this handle without creating a window?
Simon source
share