Hello,
I’m wondering if you know an (easy) way to catch window messages from Max.
I would like to know when someone resizes the viewport, because the plugin I’m making is visible in all open viewports. So I’d like to catch the WM_WINDOWPOSCHANGED message, because that one is being fired when the viewports change size/pos.
Till now I have been using http://www.codeproject.com/Articles/6362/Global-System-Hooks-in-NET to do this. The problem is that this only works on 1 process at a time, as soon as you start my plugin in a new Max process the old hook gets unhooked. Then someone told me about EasyHook, I’ve been trying to get this to work, but without much luck.
So this is why I was thinking, maybe there is an easier way. Because as far as I understand, I need to inject a native dll in Max’ memory to be able to “read/hook” but maybe my plugin is already in Max’ memory so I don’t actually need another DLL?
(I’ve also tried WinEventHook but this didn’t work either)
Thanks in advance,
Vin