Broken Windows (programming!) - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Broken Windows (programming!)

Hi everybody,



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)

{

blah blah...

}



LRESULT CALLBACK WndProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lParam)

{

int ret;



...handle messages...

...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.



Paul.




Sign In or Register to comment.