Click here to Skip to main content
15,920,005 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: How to share a variable between two classes? Pin
Cedric Moonen2-Jun-05 21:30
Cedric Moonen2-Jun-05 21:30 
AnswerRe: How to share a variable between two classes? Pin
rammle2-Jun-05 21:30
rammle2-Jun-05 21:30 
AnswerRe: How to share a variable between two classes? Pin
Bob Stanneveld2-Jun-05 22:03
Bob Stanneveld2-Jun-05 22:03 
AnswerRe: How to share a variable between two classes? Pin
nripun2-Jun-05 23:55
nripun2-Jun-05 23:55 
AnswerRe: How to share a variable between two classes? Pin
fanlovefan5-Jun-05 15:14
fanlovefan5-Jun-05 15:14 
Questionencapsulating callbacks? Pin
rammle2-Jun-05 20:51
rammle2-Jun-05 20:51 
AnswerRe: encapsulating callbacks? Pin
Trollslayer2-Jun-05 23:15
mentorTrollslayer2-Jun-05 23:15 
GeneralRe: encapsulating callbacks? Pin
RichardS2-Jun-05 23:34
RichardS2-Jun-05 23:34 
Trollslayer wrote:
No, callbacks cannot be in classes

Callbacks can be in classes as long as the function is static. By making the function static you are effectivly making the function global.

As for member functions check out:
http://www.codeproject.com/cpp/FastDelegate.asp

This will give you a good idea of how member function pointers (which are my determination callbacks anyway) work.

regards,
Rich



"Programming today is a race between software engineers striving to build bigger and
better idiot-proff programs, and the Universe trying to produce bigger and better idiots.
So far the Universe is winning." -- Rich Cook
GeneralRe: encapsulating callbacks? Pin
rammle3-Jun-05 0:06
rammle3-Jun-05 0:06 
GeneralRe: encapsulating callbacks? Pin
Trollslayer4-Jun-05 11:11
mentorTrollslayer4-Jun-05 11:11 
GeneralProblem with Property page Pin
anisiva2-Jun-05 16:59
anisiva2-Jun-05 16:59 
GeneralRe: Problem with Property page Pin
Nish Nishant2-Jun-05 18:19
sitebuilderNish Nishant2-Jun-05 18:19 
GeneralRe: Problem with Property page Pin
anisiva2-Jun-05 18:55
anisiva2-Jun-05 18:55 
GeneralRe: Problem with Property page Pin
Nish Nishant2-Jun-05 19:05
sitebuilderNish Nishant2-Jun-05 19:05 
GeneralRe: Problem with Property page Pin
Rahim Rattani2-Jun-05 20:40
Rahim Rattani2-Jun-05 20:40 
GeneralRe: Problem with Property page Pin
anisiva8-Jun-05 17:58
anisiva8-Jun-05 17:58 
QuestionCString to LPCWSTR conversion ??? Pin
shoonya2-Jun-05 14:25
shoonya2-Jun-05 14:25 
AnswerRe: CString to LPCWSTR conversion ??? Pin
Christian Graus2-Jun-05 14:31
protectorChristian Graus2-Jun-05 14:31 
AnswerRe: CString to LPCWSTR conversion ??? Pin
ThatsAlok2-Jun-05 19:13
ThatsAlok2-Jun-05 19:13 
AnswerRe: CString to LPCWSTR conversion ??? Pin
cmk5-Jun-05 12:55
cmk5-Jun-05 12:55 
GeneralOPEN GL Problems Pin
amitmohanty2-Jun-05 13:45
amitmohanty2-Jun-05 13:45 
GeneralEasy char manipulation question Pin
Axonn Echysttas2-Jun-05 12:37
Axonn Echysttas2-Jun-05 12:37 
GeneralRe: Easy char manipulation question Pin
Christian Graus2-Jun-05 12:45
protectorChristian Graus2-Jun-05 12:45 
GeneralRe: Easy char manipulation question Pin
Axonn Echysttas2-Jun-05 12:51
Axonn Echysttas2-Jun-05 12:51 
GeneralRe: Easy char manipulation question Pin
Christian Graus2-Jun-05 12:58
protectorChristian Graus2-Jun-05 12:58 

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.