Click here to Skip to main content
15,887,214 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: how to get the selected files name during Drag&Drop's mouse moving process Pin
James R. Twine22-Feb-06 2:30
James R. Twine22-Feb-06 2:30 
GeneralRe: how to get the selected files name during Drag&Drop's mouse moving process Pin
welli22-Feb-06 14:20
welli22-Feb-06 14:20 
Questionto call a second dll from the First Dll in VC++ application. Pin
phijophlip21-Feb-06 20:22
phijophlip21-Feb-06 20:22 
AnswerRe: to call a second dll from the First Dll in VC++ application. Pin
Eytukan21-Feb-06 20:53
Eytukan21-Feb-06 20:53 
QuestionService troubles Pin
Esmo200021-Feb-06 19:44
Esmo200021-Feb-06 19:44 
GeneralRe: Service troubles Pin
Malli_S21-Feb-06 20:43
Malli_S21-Feb-06 20:43 
GeneralRe: Service troubles Pin
Esmo200021-Feb-06 20:48
Esmo200021-Feb-06 20:48 
Questionfunction pointer array problem Pin
CastleIsle21-Feb-06 19:43
CastleIsle21-Feb-06 19:43 
The MFC appwizard handles function pointer arrays very differently than the console appwizard. There are a variety of ways to establish a function pointer array with a console program. My favorite is:

void show1();
void show2();
void show3();
void (*pfun[3])() = { show1, show2, show3 };

This works great for a console program, but an MFC program objects saying you cannot create an array of functions, and then just to be frustrating, the error explanation says you can
create an array of pointers to functions.

I was able to create a function pointer array using typedef:
typedef void FOO();
FOO* pfun[3];
The MFC compiler compiles the above without errors, but it will not allow me to initialize the array. I get compiler errors from:

FOO* pfun[3] = { show1, show2, show3 };

and:

pfun[0] = show1;
pfun[1] = show2;
pfun[2] = show3;

and even:

pfun[0] = &show1;
pfun[1] = &show2;
pfun[2] = &show3;

How do I initialize a function pointer array that ?

CastleIsle
AnswerRe: function pointer array problem Pin
kakan21-Feb-06 20:12
professionalkakan21-Feb-06 20:12 
AnswerRe: function pointer array problem Pin
Cedric Moonen21-Feb-06 20:13
Cedric Moonen21-Feb-06 20:13 
GeneralRe: function pointer array problem Pin
CastleIsle22-Feb-06 5:18
CastleIsle22-Feb-06 5:18 
AnswerRe: function pointer array problem Pin
Roger Stoltz22-Feb-06 5:53
Roger Stoltz22-Feb-06 5:53 
GeneralRe: function pointer array problem Pin
CastleIsle22-Feb-06 10:15
CastleIsle22-Feb-06 10:15 
AnswerRe: function pointer array problem Pin
Roger Stoltz21-Feb-06 22:35
Roger Stoltz21-Feb-06 22:35 
GeneralRe: function pointer array problem Pin
CastleIsle22-Feb-06 5:04
CastleIsle22-Feb-06 5:04 
AnswerRe: function pointer array problem Pin
Roger Stoltz22-Feb-06 5:23
Roger Stoltz22-Feb-06 5:23 
GeneralRe: function pointer array problem Pin
CastleIsle22-Feb-06 5:48
CastleIsle22-Feb-06 5:48 
AnswerRe: function pointer array problem Pin
Roger Stoltz22-Feb-06 6:30
Roger Stoltz22-Feb-06 6:30 
Questionhow to get long file name (instead of old 8.3 notation) Pin
csc21-Feb-06 19:20
csc21-Feb-06 19:20 
AnswerRe: how to get long file name (instead of old 8.3 notation) Pin
Stephen Hewitt21-Feb-06 19:30
Stephen Hewitt21-Feb-06 19:30 
GeneralRe: how to get long file name (instead of old 8.3 notation) Pin
csc21-Feb-06 19:42
csc21-Feb-06 19:42 
QuestionHelp for Arabic/Urdu Development in Visual C++ Pin
signbit21-Feb-06 18:51
signbit21-Feb-06 18:51 
AnswerRe: Help for Arabic/Urdu Development in Visual C++ Pin
Rajesh R Subramanian21-Feb-06 19:00
professionalRajesh R Subramanian21-Feb-06 19:00 
AnswerRe: Help for Arabic/Urdu Development in Visual C++ Pin
Malli_S21-Feb-06 19:23
Malli_S21-Feb-06 19:23 
GeneralRe: Help for Arabic/Urdu Development in Visual C++ Pin
signbit21-Feb-06 19:39
signbit21-Feb-06 19:39 

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.