I have a class with a function that I'm hoping to use as a dialog callback procedure. But when I try to create a dialog using that function, I get errors like...
error C2664: 'DialogBoxParamA' : cannot convert parameter 4 from 'int (struct HWND__ *,unsigned int,unsigned int,long)'
to 'int (__stdcall *)(struct HWND__ *,unsigned int,unsigned int,long)'
The prototype for the function is
BOOL CALLBACK EditDlgProc(HWND,UINT,WPARAM,LPARAM);
and I'm attempting to create the dialog (in another member function) by
DialogBox(GetModuleHandle(NULL),MAKEINTRESOURCE(IDD_EDITDLG),mainWindow,EditDlgProc);
I'm guessing it has to do with how member functions are treated differently that non-member functions and this all involves stdcall. Is there a standard way of getting around this?
[edited by - Vangelis on August 12, 2003 11:37:39 PM]