Click here to Skip to main content
15,909,445 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: DLL Questions Pin
Richard Andrew x642-Jan-12 17:45
professionalRichard Andrew x642-Jan-12 17:45 
AnswerRe: DLL Questions Pin
Randor 2-Jan-12 18:50
professional Randor 2-Jan-12 18:50 
GeneralRe: DLL Questions Pin
Richard Andrew x642-Jan-12 18:57
professionalRichard Andrew x642-Jan-12 18:57 
GeneralRe: DLL Questions Pin
Randor 2-Jan-12 19:13
professional Randor 2-Jan-12 19:13 
QuestionHow to modify hardware's property via win32 API Pin
freshtiny2-Jan-12 16:17
freshtiny2-Jan-12 16:17 
AnswerRe: How to modify hardware's property via win32 API Pin
Vaclav_2-Jan-12 17:04
Vaclav_2-Jan-12 17:04 
AnswerRe: How to modify hardware's property via win32 API Pin
freshtiny2-Jan-12 21:05
freshtiny2-Jan-12 21:05 
QuestionDynamic array of afx_msg functions - using CPtrArray ( MFC VC 6.0) Pin
Vaclav_2-Jan-12 15:56
Vaclav_2-Jan-12 15:56 
I am looking for a way to have a dynamic ( run time) array of afx_msg functions.
I have tried this with some success.
CPtrArray pArray;
pArray.Add((void*) OnFunctionkeysCallsate());
pArray.Add((void*) OnWindowNewlogview());
int iTest = pArray.GetSize();
iTest = pArray.GetUpperBound();
void * pElement = pArray.GetAt(0);
void * pElement_1 = pArray.GetAt(1);
Here are my problems
1. The GetSize returns 2 but GetAt(0) and GetAt (1) return same pointer. Why?
2. The Add method adds the function to the pointer array just fine but also runs it. I can live with that but like to know why it does that.
3. I have no clue what GetAt actually returns and how to use it.
4. I realize this approach still does not provide for dynamic add of a function. Working on that – I guess passing function as variable documentation should help.
5. Is it really “legal” to change the afx_msg function from void to void * as I did?
Thanks for your help. It is really appreciated.
Have a great 2012.
Vaclav
AnswerRe: Dynamic array of afx_msg functions - using CPtrArray ( MFC VC 6.0) Pin
Chuck O'Toole2-Jan-12 16:01
Chuck O'Toole2-Jan-12 16:01 
GeneralRe: Dynamic array of afx_msg functions - using CPtrArray ( MFC VC 6.0) Pin
Vaclav_2-Jan-12 16:39
Vaclav_2-Jan-12 16:39 
GeneralRe: Dynamic array of afx_msg functions - using CPtrArray ( MFC VC 6.0) Pin
ThatsAlok3-Jan-12 19:45
ThatsAlok3-Jan-12 19:45 
GeneralRe: Dynamic array of afx_msg functions - using CPtrArray ( MFC VC 6.0) Pin
Chuck O'Toole3-Jan-12 21:38
Chuck O'Toole3-Jan-12 21:38 
GeneralRe: Dynamic array of afx_msg functions - using CPtrArray ( MFC VC 6.0) Pin
ThatsAlok3-Jan-12 23:12
ThatsAlok3-Jan-12 23:12 
AnswerRe: Dynamic array of afx_msg functions - using CPtrArray ( MFC VC 6.0) Pin
Vaclav_3-Jan-12 4:55
Vaclav_3-Jan-12 4:55 
AnswerRe: Dynamic array of afx_msg functions - using CPtrArray ( MFC VC 6.0) Pin
ThatsAlok3-Jan-12 19:43
ThatsAlok3-Jan-12 19:43 
GeneralRe: Dynamic array of afx_msg functions - using CPtrArray ( MFC VC 6.0) Pin
Vaclav_4-Jan-12 7:16
Vaclav_4-Jan-12 7:16 
AnswerRe: Dynamic array of afx_msg functions - using CPtrArray ( MFC VC 6.0) Pin
ThatsAlok5-Jan-12 2:44
ThatsAlok5-Jan-12 2:44 
GeneralRe: Dynamic array of afx_msg functions - using CPtrArray ( MFC VC 6.0) Pin
Vaclav_5-Jan-12 6:08
Vaclav_5-Jan-12 6:08 
Questionclass array, better understanding of it Pin
jkirkerx2-Jan-12 13:14
professionaljkirkerx2-Jan-12 13:14 
AnswerRe: class array, better understanding of it Pin
Richard MacCutchan2-Jan-12 22:02
mveRichard MacCutchan2-Jan-12 22:02 
GeneralRe: class array, better understanding of it Pin
jkirkerx3-Jan-12 7:22
professionaljkirkerx3-Jan-12 7:22 
GeneralRe: class array, better understanding of it Pin
Richard MacCutchan3-Jan-12 22:28
mveRichard MacCutchan3-Jan-12 22:28 
GeneralRe: class array, better understanding of it Pin
jkirkerx4-Jan-12 6:54
professionaljkirkerx4-Jan-12 6:54 
AnswerRe: class array, better understanding of it Pin
Stefan_Lang3-Jan-12 5:26
Stefan_Lang3-Jan-12 5:26 
GeneralRe: class array, better understanding of it Pin
jkirkerx3-Jan-12 7:24
professionaljkirkerx3-Jan-12 7:24 

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.