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

C / C++ / MFC

 
Questiontype casting function pointers Pin
Martijn van Kleef16-Mar-06 4:01
Martijn van Kleef16-Mar-06 4:01 
AnswerRe: type casting function pointers Pin
toxcct16-Mar-06 4:07
toxcct16-Mar-06 4:07 
GeneralRe: type casting function pointers Pin
Martijn van Kleef16-Mar-06 5:02
Martijn van Kleef16-Mar-06 5:02 
GeneralRe: type casting function pointers Pin
Michael Dunn16-Mar-06 5:19
sitebuilderMichael Dunn16-Mar-06 5:19 
AnswerRe: type casting function pointers Pin
mzdude16-Mar-06 5:04
mzdude16-Mar-06 5:04 
GeneralRe: type casting function pointers Pin
toxcct16-Mar-06 5:13
toxcct16-Mar-06 5:13 
AnswerRe: type casting function pointers Pin
Dan McCormick16-Mar-06 5:21
Dan McCormick16-Mar-06 5:21 
GeneralRe: type casting function pointers Pin
Martijn van Kleef16-Mar-06 21:59
Martijn van Kleef16-Mar-06 21:59 
Actually that won't work..
If I use the union solution posted previously my compiler (Visual Studio .NET 2003) complains:

error C2475: 'CSomeClass::SomeMethod' : forming a pointer-to-member requires explicit use of the address-of operator ('&') and a qualified name

An implementation according to the suggestion of the compiler seems to work though:

Address.pMethod = &CSomeClass::SomeMethod;

But now, where on earth did all the fuss about the this pointer go?? Did I just seem to have discarded it??
GeneralRe: type casting function pointers Pin
Dan McCormick17-Mar-06 1:34
Dan McCormick17-Mar-06 1:34 
Questionhow to create a virtual serial port, and to monitor it Pin
szilics16-Mar-06 2:35
szilics16-Mar-06 2:35 
AnswerRe: how to create a virtual serial port, and to monitor it Pin
Chris Gao16-Mar-06 9:21
Chris Gao16-Mar-06 9:21 
QuestionPrinting without a printer Pin
Waldermort16-Mar-06 2:33
Waldermort16-Mar-06 2:33 
AnswerRe: Printing without a printer Pin
Jack Puppy16-Mar-06 2:49
Jack Puppy16-Mar-06 2:49 
GeneralRe: Printing without a printer Pin
Waldermort16-Mar-06 3:12
Waldermort16-Mar-06 3:12 
AnswerRe: Printing without a printer Pin
Ryan Binns16-Mar-06 17:24
Ryan Binns16-Mar-06 17:24 
QuestionCreateProcess Method Pin
Subramaniam s.V.16-Mar-06 2:04
Subramaniam s.V.16-Mar-06 2:04 
AnswerRe: CreateProcess Method Pin
Hamid_RT16-Mar-06 2:11
Hamid_RT16-Mar-06 2:11 
GeneralRe: CreateProcess Method Pin
SilentSilent16-Mar-06 3:16
SilentSilent16-Mar-06 3:16 
AnswerRe: CreateProcess Method Pin
Michael Dunn16-Mar-06 5:15
sitebuilderMichael Dunn16-Mar-06 5:15 
AnswerRe: CreateProcess Method Pin
Chris Gao16-Mar-06 9:26
Chris Gao16-Mar-06 9:26 
AnswerRe: CreateProcess Method Pin
Stephen Hewitt16-Mar-06 12:04
Stephen Hewitt16-Mar-06 12:04 
GeneralRe: CreateProcess Method Pin
Chris Gao16-Mar-06 15:34
Chris Gao16-Mar-06 15:34 
GeneralRe: CreateProcess Method Pin
Subramaniam s.V.16-Mar-06 17:35
Subramaniam s.V.16-Mar-06 17:35 
GeneralRe: CreateProcess Method Pin
Subramaniam s.V.16-Mar-06 17:48
Subramaniam s.V.16-Mar-06 17:48 
Questionfaster method of bitmap reading Pin
_tasleem16-Mar-06 1:22
_tasleem16-Mar-06 1:22 

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.