Click here to Skip to main content
15,921,646 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Generalglobal mouse capture Pin
Member 10559028-Jan-03 18:16
Member 10559028-Jan-03 18:16 
GeneralRe: global mouse capture Pin
Moak28-Jan-03 20:11
Moak28-Jan-03 20:11 
GeneralRe: global mouse capture Pin
Member 10559028-Jan-03 20:34
Member 10559028-Jan-03 20:34 
GeneralRe: global mouse capture Pin
Joan M28-Jan-03 21:26
professionalJoan M28-Jan-03 21:26 
GeneralRe: global mouse capture Pin
Moak28-Jan-03 21:57
Moak28-Jan-03 21:57 
GeneralRe: global mouse capture Pin
Roger Allen29-Jan-03 1:10
Roger Allen29-Jan-03 1:10 
GeneralRe: global mouse capture Pin
Member 10559029-Jan-03 13:14
Member 10559029-Jan-03 13:14 
GeneralDLL class based on pure virtual base class not in DLL Pin
rex66628-Jan-03 15:02
rex66628-Jan-03 15:02 
I want to implement a "plug-in" style system where the plug-ins are derived classes based on a pure virtual base class in my application:

Application:
class CPlugInBase<br />
{<br />
public:<br />
virtual int DoSomething() = 0;<br />
int Calculate(int a, int b) {...}<br />
};


DLL:
class CPlugIn : public CPublicBase<br />
{<br />
virtual int DoSomething() {...Calculate(1,2);...}<br />
};


The CPlugIn class overrides a few virtuals in the base class, and also needs access to other methods in the base class.

An extra wrinkle is that I would actually like to be able to do this:

Application:
class CPlugInBase<br />
{<br />
virtual int DoSomething() = 0;<br />
};<br />
<br />
class CSpecialPluginBase : public CPlugInBase<br />
{<br />
virtual int DoSomething() { DoPart1(); return DoPart2();}<br />
virtual void DoPart1() = 0;<br />
virtual int DoPart2() = 0;<br />
};


DLL 1:
class CPlugIn : public CPublicBase<br />
{<br />
virtual int DoSomething() {...}<br />
};


DLL 2:
class CSpecialPlugIn : public CSpecialPlugInBase<br />
{<br />
virtual void DoPart1() {...}<br />
virtual int DoPart2() {...}<br />
}


where the CSpecialPlugInBase might override the virtuals from CPlugInBase, and then define new pure virtual functions that the CSpecialPlugIn class would have to override while still allowing access to members of both base classes.

Is this do-able in VC++ 6?

Thanks
-robin
GeneralRe: DLL class based on pure virtual base class not in DLL Pin
Alvaro Mendez28-Jan-03 16:38
Alvaro Mendez28-Jan-03 16:38 
GeneralRe: DLL class based on pure virtual base class not in DLL Pin
rex66628-Jan-03 16:51
rex66628-Jan-03 16:51 
GeneralRe: DLL class based on pure virtual base class not in DLL Pin
Alvaro Mendez28-Jan-03 18:09
Alvaro Mendez28-Jan-03 18:09 
GeneralCovert Hex value to string Pin
Paul Farry28-Jan-03 15:02
professionalPaul Farry28-Jan-03 15:02 
Generalstr.Format("%.02X",bit[i]) Pin
whelk28-Jan-03 16:08
whelk28-Jan-03 16:08 
Generalstrange problem Pin
MemLeak28-Jan-03 10:53
MemLeak28-Jan-03 10:53 
GeneralRe: strange problem Pin
AlexO28-Jan-03 11:10
AlexO28-Jan-03 11:10 
GeneralNumber of days between two days Pin
Anton A. Loukine28-Jan-03 10:29
Anton A. Loukine28-Jan-03 10:29 
GeneralRe: Number of days between two days Pin
Tim Smith28-Jan-03 10:33
Tim Smith28-Jan-03 10:33 
GeneralRe: Number of days between two days Pin
Alvaro Mendez28-Jan-03 11:45
Alvaro Mendez28-Jan-03 11:45 
GeneralLet's complicate the matter a bit ... Pin
Anton A. Loukine29-Jan-03 3:26
Anton A. Loukine29-Jan-03 3:26 
GeneralRe: Let's complicate the matter a bit ... Pin
Alvaro Mendez29-Jan-03 4:24
Alvaro Mendez29-Jan-03 4:24 
QuestionON_COMMAND for a dynamic menu? Pin
ns28-Jan-03 10:07
ns28-Jan-03 10:07 
AnswerRe: ON_COMMAND for a dynamic menu? Pin
ns28-Jan-03 11:23
ns28-Jan-03 11:23 
GeneralProperty Pages and Buttons Pin
John W Hagen28-Jan-03 10:03
John W Hagen28-Jan-03 10:03 
GeneralRe: Property Pages and Buttons Pin
Member 10559028-Jan-03 18:19
Member 10559028-Jan-03 18:19 
GeneralRe: Property Pages and Buttons Pin
Debs29-Jan-03 0:24
Debs29-Jan-03 0:24 

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.