I'm developing an app using MP as a TOleContainer in Delphi 5. This works great--I can manipulate just about everything that I need to, programatically. I'm trying to receive parms (Lat & Lon) from a separate application using a WM_COPYDATA handler. This works great, too--I can receive the parms just fine. The problem occurs when I make a call to any MP functions from the message handler itself.
Apparently, an external call from WM_COPYDATA handers are a no-no. I get a cryptic error (I think from MP) that essentially declares that it has no idea what happened.
My (inelegant) workaround has been to use a TTimer and a 'message received' flag within the message handler in order to periodically check for new data (which I load from the message handler). Is there a better way to do this? Is there an "after WM_COPYDATA" kind of handler or other notification that someone could recommend? Thanks.