Welcome to the new platform of Programmers Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use it's exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.
Broken Windows (programming!)
i'm having a spot of bother with Win32 programming - just a basic step probably but heh its new to me. i'm using Borland C++ 4.5.
in my code i've issued a
static HINSTANCE g_hInst = NULL;
BOOL CALLBACK AboutDlgProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lParam)
LRESULT CALLBACK WndProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lParam)
...and amongs things.......
ret=DialogBox(g_hInst, "ABOUTDLG", hwnd, AboutDlgProc);
however, when i compile i keep getting the following errors!
Error DLG_ONE.CPP 50: Cannot convert 'int (__stdcall *)(void *,unsigned int,unsigned int,long)' to 'int (__stdcall *)()' in function __stdcall WndProc(void *,unsigned int,unsigned int,long)
Error DLG_ONE.CPP 50: Type mismatch in parameter 'lpDialogFunc' in call to '__stdcall DialogBoxParamA(void *,const char *,void *,int (__stdcall *)(),long)' in function __stdcall WndProc(void *,unsigned int,unsigned int,long)
i really don't understand what i'm doing wrong.
i wondered if anybody knew whats up!
thanks and merry christmas in advance.