Click here to Skip to main content
15,917,005 members
Home / Discussions / ATL / WTL / STL
   

ATL / WTL / STL

 
GeneralThe reason for the question Pin
bkelly1319-Dec-12 15:51
bkelly1319-Dec-12 15:51 
GeneralRe: The reason for the question Pin
Richard MacCutchan19-Dec-12 23:06
mveRichard MacCutchan19-Dec-12 23:06 
GeneralRe: The reason for the question Pin
bkelly1321-Dec-12 6:11
bkelly1321-Dec-12 6:11 
Questioncannot add control variable to checkbox Pin
bkelly1314-Dec-12 3:07
bkelly1314-Dec-12 3:07 
AnswerRe: cannot add control variable to checkbox Pin
Richard MacCutchan14-Dec-12 3:36
mveRichard MacCutchan14-Dec-12 3:36 
GeneralRe: cannot add control variable to checkbox Pin
bkelly1314-Dec-12 5:18
bkelly1314-Dec-12 5:18 
Questiondetect multiple instances of an application Pin
bkelly1310-Dec-12 12:28
bkelly1310-Dec-12 12:28 
AnswerRe: detect multiple instances of an application Pin
Pete O'Hanlon10-Dec-12 12:31
mvePete O'Hanlon10-Dec-12 12:31 
GeneralRe: detect multiple instances of an application Pin
bkelly1310-Dec-12 13:38
bkelly1310-Dec-12 13:38 
AnswerRe: detect multiple instances of an application Pin
H.Brydon31-Dec-12 20:09
professionalH.Brydon31-Dec-12 20:09 
QuestionOpen file in basic MFC app Pin
bkelly135-Dec-12 14:45
bkelly135-Dec-12 14:45 
AnswerRe: Open file in basic MFC app Pin
Richard MacCutchan5-Dec-12 21:24
mveRichard MacCutchan5-Dec-12 21:24 
GeneralRe: Open file in basic MFC app Pin
bkelly139-Dec-12 11:36
bkelly139-Dec-12 11:36 
GeneralRe: Open file in basic MFC app Pin
Richard MacCutchan9-Dec-12 21:36
mveRichard MacCutchan9-Dec-12 21:36 
Generalthe answer is Pin
bkelly139-Dec-12 12:25
bkelly139-Dec-12 12:25 
QuestionHow To Use Macro In dsp file(VC6.0 *.dsp file) Pin
yingkou27-Nov-12 14:37
yingkou27-Nov-12 14:37 
AnswerRe: How To Use Macro In dsp file(VC6.0 *.dsp file) Pin
Richard MacCutchan27-Nov-12 23:34
mveRichard MacCutchan27-Nov-12 23:34 
QuestionAccessibleObjectFromWindow returns E_ACCESSDENIED Pin
BCN-16325-Nov-12 23:04
BCN-16325-Nov-12 23:04 
QuestionHow to use NTGraph3D Activex Control in Visual Studio 2010. Pin
DhrumilS23-Nov-12 0:44
DhrumilS23-Nov-12 0:44 
Newshacker240union Pin
hacker240union22-Nov-12 23:40
hacker240union22-Nov-12 23:40 
Questioncopying AAComBSTR to BYTE Pin
V K 220-Nov-12 20:56
V K 220-Nov-12 20:56 
AnswerRe: copying AAComBSTR to BYTE Pin
Richard MacCutchan20-Nov-12 21:28
mveRichard MacCutchan20-Nov-12 21:28 
AnswerRe: copying AAComBSTR to BYTE Pin
hacker240union22-Nov-12 23:27
hacker240union22-Nov-12 23:27 
QuestionC++ Delegate/Events Pin
EDanaII14-Nov-12 17:15
EDanaII14-Nov-12 17:15 
Greetings,

I just recently started some experiments with C++. I'm an experienced programmer, but not with C++, but, just for fun, I decided to implement this example C++ Delegate here on Code Project.

This example keeps the methods hooked into the delegate inside structs. In the example given these are: struct TShapes, struct TDerivedShapes and struct TThings. These are then initialized in this fashion: event += new MyEvent::T<tshapes>(&shapes, &TShapes::Square);

My question is this: is it necessary to store the methods to be hooked into these events into a struct? I assume this is done because the struct makes the address available to be used in the delegate. If the answer to this question is no, then how do you hook into the even just through standard methods within a normal C++ program? Please forgive the stupidity of my questions. Smile | :)

Ed.
AnswerRe: C++ Delegate/Events Pin
Richard MacCutchan14-Nov-12 20:57
mveRichard MacCutchan14-Nov-12 20:57 

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.