Click here to Skip to main content
15,915,603 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: How to create Shortcut for a file Pin
Jean-Michel LE FOL1-Aug-02 2:47
Jean-Michel LE FOL1-Aug-02 2:47 
AnswerRe: How to create Shortcut for a file Pin
includeh101-Aug-02 8:32
includeh101-Aug-02 8:32 
GeneralMDIGetActive() - always fails (!?!) Pin
[CoY0te]1-Aug-02 2:17
[CoY0te]1-Aug-02 2:17 
GeneralWinNT to WinCE Pin
hsjuneja1-Aug-02 2:00
hsjuneja1-Aug-02 2:00 
GeneralRe: WinNT to WinCE Pin
Tim Smith1-Aug-02 2:09
Tim Smith1-Aug-02 2:09 
GeneralLinking C API to C++ Virtual Functions. Pin
Jawache1-Aug-02 1:50
Jawache1-Aug-02 1:50 
GeneralRe: Linking C API to C++ Virtual Functions. Pin
Funky Chicken1-Aug-02 2:21
sussFunky Chicken1-Aug-02 2:21 
GeneralRe: Linking C API to C++ Virtual Functions. Pin
Jawache1-Aug-02 2:42
Jawache1-Aug-02 2:42 
Thanks,

Yes it was section 2, I want the the C Functions to Call C++ Functions.

The problem is still that the C Functions need to know the 'this' parameter to pass to the static function, therefore you still have to specify a global variable for the C Functions to use.

I've now implemented a static member function that returns an instance of the derived class pointer in the base class. Its still not pretty since I still have to make sure the derived class sets that pointer to itself before the C Functions can call it, but its better than making sure a global pointer is set.

Cheers

Asim Hussain
e: asim@jawache.net
w: www.jawache.net
GeneralRe: Linking C API to C++ Virtual Functions. Pin
Daniel Lohmann1-Aug-02 4:03
Daniel Lohmann1-Aug-02 4:03 
GeneralRe: Linking C API to C++ Virtual Functions. Pin
Jawache1-Aug-02 5:18
Jawache1-Aug-02 5:18 
GeneralRe: Linking C API to C++ Virtual Functions. Pin
Joaquín M López Muñoz1-Aug-02 7:15
Joaquín M López Muñoz1-Aug-02 7:15 
GeneralRe: Linking C API to C++ Virtual Functions. Pin
Daniel Lohmann1-Aug-02 8:13
Daniel Lohmann1-Aug-02 8:13 
GeneralRe: Linking C API to C++ Virtual Functions. Pin
Jawache1-Aug-02 12:26
Jawache1-Aug-02 12:26 
QuestionRandomic functions ? Pin
Cris1-Aug-02 1:47
Cris1-Aug-02 1:47 
AnswerRe: Randomic functions ? Pin
Nish Nishant1-Aug-02 2:11
sitebuilderNish Nishant1-Aug-02 2:11 
GeneralRe: Randomic functions ? Pin
Funky Chicken1-Aug-02 2:18
sussFunky Chicken1-Aug-02 2:18 
GeneralRe: Randomic functions ? Pin
Cris1-Aug-02 2:46
Cris1-Aug-02 2:46 
GeneralRe: Randomic functions ? Pin
Chunky Chicken1-Aug-02 2:56
sussChunky Chicken1-Aug-02 2:56 
GeneralRe: Randomic functions ? Pin
[CoY0te]1-Aug-02 3:25
[CoY0te]1-Aug-02 3:25 
GeneralRe: Randomic functions ? Pin
Joaquín M López Muñoz1-Aug-02 7:22
Joaquín M López Muñoz1-Aug-02 7:22 
GeneralVariable Argument list Pin
Wolfram Steinke1-Aug-02 1:37
Wolfram Steinke1-Aug-02 1:37 
GeneralRe: Variable Argument list Pin
Brian Azzopardi1-Aug-02 1:44
Brian Azzopardi1-Aug-02 1:44 
GeneralRe: Variable Argument list Pin
Tim Smith1-Aug-02 2:06
Tim Smith1-Aug-02 2:06 
GeneralRe: Variable Argument list Pin
Anonymous1-Aug-02 2:06
Anonymous1-Aug-02 2:06 
QuestionWhat's my IP? Pin
BlackSmith1-Aug-02 1:34
BlackSmith1-Aug-02 1:34 

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.