I'd like to enable a class listen to windows messages. This class is already derived from another abstract class, so it cannot inherit from NativeWindow class, which provide an easy way to hook to the message dispatch.
Another way that might work is to use HwndSource class. It has an "AddHook" method that can hook my own hook procedure. But I feel this class may be an overkill as it is used to present WPF in a win32 window. I'm not using WPF at all.
Is it possible to use SetWindowsHookEx() to install my hook procedure in C#? if so, how to do it? any sample code? Thanks