Sperate thread in MFC OCX writing to VB screen
I am writing a ActiveX OCX/Component in C++ (Visual Studio 6) using the ActiveX MFC Component Wizard as the basis.
I want the OCX to draw to the screen independently of Visual Basic Refresh() calls. So I spin off a thread in the constructor and from the threadproc repeatedly draw using
CDC *dc = GetDC();
GetDC() is provided courtesy of the COleControl baseclass.
How kosher is it to write to this DC while VB might be writing to the same pixels (for other controls etc.) ?
Are these DCs threadsafe ?