Click here to Skip to main content
12,447,210 members (52,803 online)

ATL / WTL / STL

 
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 

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.


Advertise | Privacy | Mobile
Web02 | 2.8.160811.3 | Last Updated 30 Jul 2016
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid