Updating map in mapcontrol, through secondary thread

malkotian
08-15-2005, 01:53 PM
Hi,

Can anyone, give me a sample snippet of updating a map from the secondary thread or tell me of procesdure involved. I have tried this, whne I access the map object in teh secondary thread from GetActiveMap does not seem correct , and results in a crash, when I use the object for GetLocation or anything else. I am using VC++ and the

Help, is greatly appreciated.

mkotian

Wilfried
08-16-2005, 02:44 PM
Hi,

You cannot update a visual control from out of a thread, you can only do it from main thread. If you want to do it from out of a thread then post a message to a custom message handler in the main thread's window and update it from there. This is normal windows behaviour.

 
Web mp2kmag.com
mapforums.com