Menu

Problems with my DLGPROC

2002-12-17
2012-09-26
  • Nobody/Anonymous

    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?

     
    • Nobody/Anonymous

      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.

       
    • Nobody/Anonymous

      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.

      .

       
      • Nobody/Anonymous

        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 ?

         

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.