PDA

View Full Version : WndProc, SendMessage



nonzero
09-27-2006, 01:01 AM
Can I define a WndProc for my plugin so I can handle Windows messages, in particular those sent by SendMessageTimeout from a DLL? Is there an example of this somewhere?

I'm currently polling the DLL, and this is eating up CPU. I'd prefer to have the plugin wait for a significant event (sent by the DLL) to happen before processing.

Bobt
09-30-2006, 07:57 PM
Can I define a WndProc for my plugin so I can handle Windows messages, in particular those sent by SendMessageTimeout from a DLL? Is there an example of this somewhere?

Yes and no. You can define a WndProc but it does you no good.
You need to make a window for it to be called.
If you need a cheap timeout use Sleep in a thread loop and call
your function from the thread.
Its