Click here to Skip to main content
15,885,278 members
Home / Discussions / ATL / WTL / STL
   

ATL / WTL / STL

 
AnswerRe: Firing a COM Event From Another Thread Pin
Lim Bio Liong1-Nov-09 23:53
Lim Bio Liong1-Nov-09 23:53 
AnswerRe: Firing a COM Event From Another Thread Pin
Roger Stoltz2-Nov-09 5:43
Roger Stoltz2-Nov-09 5:43 
AnswerRe: Firing a COM Event From Another Thread Pin
Lim Bio Liong2-Nov-09 18:50
Lim Bio Liong2-Nov-09 18:50 
QuestionCOM Instantiation. Pin
mh@markhoscik.plus.com29-Oct-09 4:50
mh@markhoscik.plus.com29-Oct-09 4:50 
QuestionHow to implement drived Interface using ATL? Pin
kcynic20-Oct-09 17:10
kcynic20-Oct-09 17:10 
AnswerRe: How to implement drived Interface using ATL? Pin
«_Superman_»21-Oct-09 11:47
professional«_Superman_»21-Oct-09 11:47 
GeneralRe: How to implement drived Interface using ATL? Pin
kcynic22-Oct-09 0:41
kcynic22-Oct-09 0:41 
GeneralRe: How to implement drived Interface using ATL? Pin
Lim Bio Liong4-Nov-09 18:30
Lim Bio Liong4-Nov-09 18:30 
Err, hold on a second, kcynic. You do not absolutely need to copy the code from CA to CB.

Here are some alternatives :

1. You could simply have only the CA object and have it implement IB. To do this :

1.1 Derive CA from IB, e.g.

class ATL_NO_VTABLE CA :
   public ...
   public IB...

1.2 Then in your COM map, declare that CA implements IB :

BEGIN_COM_MAP(CA)
   ...
//   COM_INTERFACE_ENTRY(IA)   // Make sure this is commented out.
   COM_INTERFACE_ENTRY(IB)
   COM_INTERFACE_ENTRY2(IA, IB) // Indicates that IA interface is gotten through IB.
   ...
END_COM_MAP()

1.3 You then implement methods of IB in CA. Essentially, CA is derived from both IA and IB.



2. If you absolutely need to have 2 objects, CA and CB, then you could simply contain the whole of CA's implementation inside CB. You do this via COM techniques of containment or aggregation. You can read these up in MSDN. This way, you can avoid making a duplicate of CA's implementation which is problematic for maintenance.


- Bio.
GeneralRe: How to implement drived Interface using ATL? Pin
kcynic4-Nov-09 18:47
kcynic4-Nov-09 18:47 
GeneralRe: How to implement drived Interface using ATL? Pin
Lim Bio Liong4-Nov-09 18:50
Lim Bio Liong4-Nov-09 18:50 
GeneralRe: How to implement drived Interface using ATL? Pin
kcynic4-Nov-09 18:58
kcynic4-Nov-09 18:58 
GeneralRe: How to implement drived Interface using ATL? Pin
Lim Bio Liong4-Nov-09 19:04
Lim Bio Liong4-Nov-09 19:04 
GeneralRe: How to implement drived Interface using ATL? Pin
kcynic4-Nov-09 19:15
kcynic4-Nov-09 19:15 
GeneralRe: How to implement drived Interface using ATL? Pin
Lim Bio Liong4-Nov-09 19:18
Lim Bio Liong4-Nov-09 19:18 
GeneralRe: How to implement drived Interface using ATL? Pin
kcynic4-Nov-09 19:46
kcynic4-Nov-09 19:46 
QuestionIs there any code library available for developing BHOs? Pin
Ziink9-Oct-09 10:44
Ziink9-Oct-09 10:44 
AnswerRe: Is there any code library available for developing BHOs? Pin
«_Superman_»10-Oct-09 10:36
professional«_Superman_»10-Oct-09 10:36 
Questionhow do i change the color of a rebar? Pin
Nicolai M3-Oct-09 3:04
Nicolai M3-Oct-09 3:04 
AnswerRe: how do i change the color of a rebar? Pin
Michael Dunn13-Oct-09 8:30
sitebuilderMichael Dunn13-Oct-09 8:30 
QuestionActiveX Control Test Container unavailable in VS2008? Pin
nicknotyet30-Sep-09 6:28
nicknotyet30-Sep-09 6:28 
AnswerRe: ActiveX Control Test Container unavailable in VS2008? Pin
Stuart Dootson1-Oct-09 22:21
professionalStuart Dootson1-Oct-09 22:21 
GeneralRe: ActiveX Control Test Container unavailable in VS2008? Pin
nicknotyet2-Oct-09 5:06
nicknotyet2-Oct-09 5:06 
GeneralRe: ActiveX Control Test Container unavailable in VS2008? Pin
Pat Brenner (MSFT)18-Mar-10 9:53
Pat Brenner (MSFT)18-Mar-10 9:53 
QuestionUpdating toolbar button text & creating dropdown buttons Pin
itzuke28-Sep-09 22:37
itzuke28-Sep-09 22:37 
QuestionHow to move a window only use WM_XXX message without MoveWindow or SetWindowPos? Pin
hawkgao012928-Sep-09 20:25
hawkgao012928-Sep-09 20:25 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.