Click here to Skip to main content
11,637,176 members (59,699 online)

ATL / WTL / STL

 
QuestionOpen file in basic MFC app Pin
bkelly135-Dec-12 14:45
memberbkelly135-Dec-12 14:45 
AnswerRe: Open file in basic MFC app Pin
Richard MacCutchan5-Dec-12 21:24
mvpRichard MacCutchan5-Dec-12 21:24 
GeneralRe: Open file in basic MFC app Pin
bkelly139-Dec-12 11:36
memberbkelly139-Dec-12 11:36 
GeneralRe: Open file in basic MFC app Pin
Richard MacCutchan9-Dec-12 21:36
mvpRichard MacCutchan9-Dec-12 21:36 
Generalthe answer is Pin
bkelly139-Dec-12 12:25
memberbkelly139-Dec-12 12:25 
QuestionHow To Use Macro In dsp file(VC6.0 *.dsp file) Pin
yingkou27-Nov-12 14:37
memberyingkou27-Nov-12 14:37 
AnswerRe: How To Use Macro In dsp file(VC6.0 *.dsp file) Pin
Richard MacCutchan27-Nov-12 23:34
mvpRichard MacCutchan27-Nov-12 23:34 
QuestionAccessibleObjectFromWindow returns E_ACCESSDENIED Pin
BianChengNan25-Nov-12 23:04
memberBianChengNan25-Nov-12 23:04 
QuestionHow to use NTGraph3D Activex Control in Visual Studio 2010. Pin
DhrumilS23-Nov-12 0:44
memberDhrumilS23-Nov-12 0:44 
Newshacker240union Pin
hacker240union22-Nov-12 23:40
memberhacker240union22-Nov-12 23:40 
Questioncopying AAComBSTR to BYTE Pin
V K 220-Nov-12 20:56
memberV K 220-Nov-12 20:56 
AnswerRe: copying AAComBSTR to BYTE Pin
Richard MacCutchan20-Nov-12 21:28
mvpRichard MacCutchan20-Nov-12 21:28 
AnswerRe: copying AAComBSTR to BYTE Pin
hacker240union22-Nov-12 23:27
memberhacker240union22-Nov-12 23:27 
QuestionC++ Delegate/Events Pin
Edward G Dana14-Nov-12 17:15
memberEdward G Dana14-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(&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
mvpRichard MacCutchan14-Nov-12 20:57 
GeneralRe: C++ Delegate/Events Pin
Edward G Dana15-Nov-12 13:35
memberEdward G Dana15-Nov-12 13:35 
GeneralRe: C++ Delegate/Events Pin
Richard MacCutchan15-Nov-12 23:45
mvpRichard MacCutchan15-Nov-12 23:45 
AnswerRe: C++ Delegate/Events Pin
pasztorpisti20-Nov-12 2:53
memberpasztorpisti20-Nov-12 2:53 
GeneralRe: C++ Delegate/Events Pin
EDanaII20-Nov-12 16:23
memberEDanaII20-Nov-12 16:23 
QuestionReturn FALSE in InitInstance causes crash in 64Bits Pin
khaliloenit8-Nov-12 1:01
memberkhaliloenit8-Nov-12 1:01 
AnswerRe: Return FALSE in InitInstance causes crash in 64Bits Pin
Albert Holguin10-Dec-12 4:30
memberAlbert Holguin10-Dec-12 4:30 
QuestionHow to get used dll's path information programetically? Pin
litu kumar6-Nov-12 19:38
memberlitu kumar6-Nov-12 19:38 
AnswerRe: How to get used dll's path information programetically? Pin
Richard MacCutchan6-Nov-12 21:40
mvpRichard MacCutchan6-Nov-12 21:40 
GeneralRe: How to get used dll's path information programetically? Pin
litu kumar6-Nov-12 23:27
memberlitu kumar6-Nov-12 23:27 
GeneralRe: How to get used dll's path information programetically? Pin
Richard MacCutchan7-Nov-12 4:54
mvpRichard MacCutchan7-Nov-12 4:54 
GeneralRe: How to get used dll's path information programetically? Pin
litu kumar7-Nov-12 17:11
memberlitu kumar7-Nov-12 17:11 
GeneralRe: How to get used dll's path information programetically? Pin
Richard MacCutchan7-Nov-12 21:34
mvpRichard MacCutchan7-Nov-12 21:34 
GeneralRe: How to get used dll's path information programetically? Pin
litu kumar7-Nov-12 22:35
memberlitu kumar7-Nov-12 22:35 
GeneralRe: How to get used dll's path information programetically? Pin
Richard MacCutchan8-Nov-12 0:16
mvpRichard MacCutchan8-Nov-12 0:16 
GeneralRe: How to get used dll's path information programetically? Pin
litu kumar8-Nov-12 2:58
memberlitu kumar8-Nov-12 2:58 
GeneralRe: How to get used dll's path information programetically? Pin
Richard MacCutchan8-Nov-12 4:03
mvpRichard MacCutchan8-Nov-12 4:03 
GeneralRe: How to get used dll's path information programetically? Pin
litu kumar15-Nov-12 19:53
memberlitu kumar15-Nov-12 19:53 
GeneralRe: How to get used dll's path information programetically? Pin
Richard MacCutchan15-Nov-12 23:50
mvpRichard MacCutchan15-Nov-12 23:50 
AnswerRe: How to get used dll's path information programetically? Pin
hacker240union22-Nov-12 23:41
memberhacker240union22-Nov-12 23:41 
Questiondetect close event with CAsyncSocket Pin
bkelly135-Nov-12 10:32
memberbkelly135-Nov-12 10:32 
QuestionIntermediate GUI Techniques Pin
bkelly132-Nov-12 3:21
memberbkelly132-Nov-12 3:21 
AnswerRe: Intermediate GUI Techniques Pin
Richard MacCutchan2-Nov-12 6:20
mvpRichard MacCutchan2-Nov-12 6:20 
Questionproblem with sprintf_s() on win 7 Pin
Member 93537761-Nov-12 21:34
memberMember 93537761-Nov-12 21:34 
AnswerRe: problem with sprintf_s() on win 7 Pin
Richard MacCutchan1-Nov-12 22:50
mvpRichard MacCutchan1-Nov-12 22:50 
GeneralRe: problem with sprintf_s() on win 7 Pin
bkelly132-Nov-12 3:16
memberbkelly132-Nov-12 3:16 
GeneralRe: problem with sprintf_s() on win 7 Pin
Richard MacCutchan2-Nov-12 6:15
mvpRichard MacCutchan2-Nov-12 6:15 
GeneralRe: problem with sprintf_s() on win 7 Pin
Member 93537764-Nov-12 16:34
memberMember 93537764-Nov-12 16:34 
GeneralRe: problem with sprintf_s() on win 7 Pin
Richard MacCutchan4-Nov-12 21:26
mvpRichard MacCutchan4-Nov-12 21:26 
AnswerRe: problem with sprintf_s() on win 7 Pin
H.Brydon26-Nov-12 19:36
memberH.Brydon26-Nov-12 19:36 
Questionwsageterror() Pin
bkelly131-Nov-12 15:28
memberbkelly131-Nov-12 15:28 
AnswerRe: wsageterror() Pin
Richard MacCutchan1-Nov-12 22:48
mvpRichard MacCutchan1-Nov-12 22:48 
QuestionSTL map issue in VS2010 Pin
Subhash Madhukar30-Oct-12 3:47
memberSubhash Madhukar30-Oct-12 3:47 
AnswerRe: STL map issue in VS2010 Pin
Richard MacCutchan30-Oct-12 6:04
mvpRichard MacCutchan30-Oct-12 6:04 
Questionhow do i copy a CImage DIB to clipboard Pin
Member 951640015-Oct-12 11:15
memberMember 951640015-Oct-12 11:15 
AnswerRe: how do i copy a CImage DIB to clipboard Pin
Andrew Cherednik15-Oct-12 11:41
memberAndrew Cherednik15-Oct-12 11:41 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.


Advertise | Privacy | Mobile
Web03 | 2.8.150728.1 | Last Updated 10 Jul 2015
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid