Apartment-threading and visual controls

A customer has asked me to debug his IE toolbar that he wrote in
Delphi. It mostly works, but when stressed, it loses ImageList images
and sometimes fails to load new copies with "Canvas does not allow
drawing" messages.

IE toolbars require the IDeskBand interface on a "band object [which]
must be registered as an OLE in-process server that supports apartment

Is this something that you simply can't do with Delphi? The VCL is
still not thread-safe, even in D7, right? When you're an
apartment-threaded COM object that lives in a DLL, you can't exactly
pass drawing requests to the main thread via Synchronise(), can you?
Or IS there some mechanism to push all GDI ops to the MainThreadID?


programming and writing   http://www.midnightbeach.com
homeschool resources      http://www.midnightbeach.com/hs