Click here to Skip to main content
15,912,578 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Doesn't Work Pin
Mike Burston5-Jul-01 18:42
Mike Burston5-Jul-01 18:42 
GeneralRe: Doesn't Work Pin
Dan Madden5-Jul-01 19:20
Dan Madden5-Jul-01 19:20 
Generalpointer to a function Pin
5-Jul-01 9:13
suss5-Jul-01 9:13 
GeneralRe: pointer to a function Pin
Chris Losinger5-Jul-01 9:26
professionalChris Losinger5-Jul-01 9:26 
GeneralRe: pointer to a function Pin
KingsGambit5-Jul-01 18:00
KingsGambit5-Jul-01 18:00 
GeneralRe: pointer to a function Pin
5-Jul-01 18:28
suss5-Jul-01 18:28 
GeneralRe: pointer to a function Pin
8-Jul-01 11:03
suss8-Jul-01 11:03 
GeneralRe: pointer to a function Pin
Oliver Anhuth8-Jul-01 20:53
Oliver Anhuth8-Jul-01 20:53 
Member function are different from global / static functions because they have an implicit this pointer as argument.

You have to declare a pointer to a class member function like this:

double (CTest::*pF)(double);

Read pF is a ptr to a member of CTest with takes double and returns double.

To assign the member function to the pointer do this:

pF = CTest::Compute;

To call the member function you need an instance of the class (because of the needed this pointer):

CTest test;
CTest* pTest = &test;

The call looks like this:

(pTest->*pF)(42);

Oliver

GeneralCStringList and CList problem Pin
5-Jul-01 7:54
suss5-Jul-01 7:54 
GeneralDevice Context Pin
Ryan McFarren5-Jul-01 7:33
Ryan McFarren5-Jul-01 7:33 
GeneralRe: Device Context Pin
Tim Deveaux5-Jul-01 8:29
Tim Deveaux5-Jul-01 8:29 
QuestionHow can I have multiple fonts per line using DrawTextEX? Pin
Bart-Man5-Jul-01 6:23
Bart-Man5-Jul-01 6:23 
AnswerRe: How can I have multiple fonts per line using DrawTextEX? Pin
Jim Crafton5-Jul-01 7:29
Jim Crafton5-Jul-01 7:29 
GeneralRe: How can I have multiple fonts per line using DrawTextEX? Pin
Bart-Man5-Jul-01 8:32
Bart-Man5-Jul-01 8:32 
GeneralFound a solution to the problem!! Pin
Bart-Man5-Jul-01 9:37
Bart-Man5-Jul-01 9:37 
GeneralDS problem Pin
Mihail5-Jul-01 6:02
Mihail5-Jul-01 6:02 
GeneralRe: DS problem Pin
Carlos Antollini5-Jul-01 6:17
Carlos Antollini5-Jul-01 6:17 
GeneralRe: DS problem Pin
Mihail5-Jul-01 6:54
Mihail5-Jul-01 6:54 
Generalado and excel Pin
Gérald Mercet5-Jul-01 5:39
Gérald Mercet5-Jul-01 5:39 
GeneralRe: ado and excel Pin
User 98855-Jul-01 6:16
User 98855-Jul-01 6:16 
GeneralRe: ado and excel Pin
Carlos Antollini5-Jul-01 6:26
Carlos Antollini5-Jul-01 6:26 
GeneralRe: ado and excel Pin
5-Jul-01 21:41
suss5-Jul-01 21:41 
GeneralRe: ado and excel Pin
User 98856-Jul-01 12:07
User 98856-Jul-01 12:07 
GeneralRe: ado and excel Pin
5-Jul-01 7:23
suss5-Jul-01 7:23 
QuestionHeader notifications? Pin
5-Jul-01 4:53
suss5-Jul-01 4:53 

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.