ActiveX not multithreaded 
Author Message
 ActiveX not multithreaded

I created an ActiveX with the MFC Wizard and added a "Backcolor" property.

When placing two copies of this ActiveX on a VB form (or test container),
(MyComponent1 and MyComponent2), and then attempting to change the
backcolor of only MyComponent1, both MyComponent1 AND MyComponent2
backcolor changes!

 return AfxOleRegisterControlClass(
   AfxGetInstanceHandle(),
   m_clsid,
   m_lpszProgID,
   IDS_MYCONTROL,
   IDB_MYCONTROL,
   afxRegInsertable | afxRegApartmentThreading,
   _dwMyControlOleMisc,
   _tlid,
   _wVerMajor,
   _wVerMinor);



Tue, 26 Apr 2005 01:37:57 GMT  
 ActiveX not multithreaded
I created an ActiveX with the MFC Wizard and added a "Backcolor" property.

When placing two copies of this ActiveX on a VB form (or text container),
(MyComponent1 and MyComponent2), and then attempting to change the
backcolor of only MyComponent1, both MyComponent1 AND MyComponent2
backcolor changes!

 return AfxOleRegisterControlClass(
   AfxGetInstanceHandle(),
   m_clsid,
   m_lpszProgID,
   IDS_MYCONTROL,
   IDB_MYCONTROL,
   afxRegInsertable | afxRegApartmentThreading,
   _dwMyControlOleMisc,
   _tlid,
   _wVerMajor,
   _wVerMinor);



Tue, 26 Apr 2005 01:37:11 GMT  
 ActiveX not multithreaded
Further, what I am doing is storing a pointer to the MyControlCtrl
COleControl object in the singleton theApp object. theApp is only created
once and used throughout the entire program.

I just need a singleton class somewhere to store all my variables... one
that is created each time the control is created. What can I do?


Quote:
> I created an ActiveX with the MFC Wizard and added a "Backcolor" property.

> When placing two copies of this ActiveX on a VB form (or text container),
> (MyComponent1 and MyComponent2), and then attempting to change the
> backcolor of only MyComponent1, both MyComponent1 AND MyComponent2
> backcolor changes!

>  return AfxOleRegisterControlClass(
>    AfxGetInstanceHandle(),
>    m_clsid,
>    m_lpszProgID,
>    IDS_MYCONTROL,
>    IDB_MYCONTROL,
>    afxRegInsertable | afxRegApartmentThreading,
>    _dwMyControlOleMisc,
>    _tlid,
>    _wVerMajor,
>    _wVerMinor);



Tue, 26 Apr 2005 03:07:13 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Multithreaded ActiveX Design Pattern

2. Using VB6 ActiveX DLLs from a multithreaded ATL client

3. Multithreaded ActiveX DLL

4. Question about Multithreaded ActiveX Contol and VB6

5. Question about Multithreaded ActiveX Contol and VB6

6. Fireing events from a multithreaded ActiveX ?

7. cannot fire event from worker threads in multithreaded ActiveX control

8. Can ActiveX control be multithreaded?

9. settings multithreaded DLL/multithreaded

10. Which STL classes do not work in multithreaded applications

11. ActiveX...ActiveX...GreenTree DataList...ActiveX

 

 
Powered by phpBB® Forum Software