Capture windows messages generated by an MFC app in plain C++ dll

First of all: Is this even possible?

I have a third party dll that interfaces some hardware. It's written in MFC. I received (from the dll vendors) a sample Visual Studio 2010 solution which has only one project: An MFC application (.exe) which calls the third party dll in question. It works fine.

When I try to use the third party dll from my dll (which is plain C++, no MFC, no .NET), I can call its functions fine, but there's a catch: the sample MFC app seems to "override" MessageProc in order to capture certain messages that the third party dll generates. And though the dll has a function called "RegisterFuncCallback" and I use it, my callback never gets called.

So here's the problem: How can I capture those messages without creating an MFC app? (Is it even possible?)

5
задан dario_ramos 16 May 2011 в 19:05
поделиться