Hey, I have tried including the prototype of my DlgProc function to main.h but it seems like that is not the problem...
I really cant understand why im having this problem... If i call a MessageBox from my ini_io.c for example, it works perfectly! As a matter of fact, thats how my program was until some hours ago...
Then i decided to use customized dialogs in this functions and the problems started... I know the rc file is correct, all IDs are at the resources.h file, all #includes are correct too.
.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Whenever i try to call a Dialog from outside of main.c like...
DialogBox(hInstIni, MAKEINTRESOURCE(ID_INIERRORDLG), mainWindow, (DLGPROC)DlgProc);
...I get this error on GCC:
26 C:\project\ini_io.c
`DlgProc' undeclared (first use in this function)
But off course DlgProc is there, all my other calls to it (inside main.c) work ok.
What am i not seeing here?
If you want to call DlgProc function from outside of your main C file, i guess you have to declare its prototype in a main.h file.
But im not sure, maybe you should wait a little more for the experts to answer.
Hey, I have tried including the prototype of my DlgProc function to main.h but it seems like that is not the problem...
I really cant understand why im having this problem... If i call a MessageBox from my ini_io.c for example, it works perfectly! As a matter of fact, thats how my program was until some hours ago...
Then i decided to use customized dialogs in this functions and the problems started... I know the rc file is correct, all IDs are at the resources.h file, all #includes are correct too.
.
Just to add to my previous message, when i transposed the function to main.c, it works.
And all other functions inside main.c that call functions in ini_io.c work too.
So whats the problem on referencing dlgproc outside of main.c ?