Subj : Re: Modal dialog box - how? To : borland.public.cpp.borlandcpp From : Bob Gonder Date : Thu Jul 08 2004 10:00 am David Ayre wrote: >I used this statement in the routine that calls the modal dialog box. >It won't compile as it says there's a type mimatch >for GetInvNote in the calling statement. What am I doing wrong? > >This is the entry in the header file > >static BOOL CALLBACK GetInvNote(HWND hDlg, UINT iMessage, WPARAM wParam, LPARAM lParam); When "static" defines a function, it means it exists only in "this" module. (The one that includes the header) If you use the header in more than one module.......not nice. Either take out _both_ statics, or move the delaration out of the header file, and into the top of the cpp file (after the includes). >This is the entry in the cpp file. (I think....) Windows functions are C functions, not CPP. (Since I write in C, not CPP, maybe the problem) extern "C"{ >#pragma argsused >static BOOL CALLBACK GetInvNote(HWND hDlg, UINT iMessage, WPARAM wParam, LPARAM lParam) You would also need one for your declaration if you still need one. I don't have a declaration in my code because the callback is above the caller in the same module. And, it's not a public (sub)dialog. If your dialog is public, then it must not be static. But I think it should still be C .