error c2059

I'm trying to run simple code but something is wrong.In the next code:
.............
.............
case WM_COMMAND:
switch(LOWORD(wParam))
{
case ID_HELP_ABOUT:
{
int ret = DialogBox(GetModuleHandle(NULL),
MAKEINTRESOURCE(IDD_ABOUT), hwnd, AboutDlgProc); <<<<<<<<<<
if(ret == IDOK){
MessageBox(hwnd, "Dialog exited with IDOK.", "Notice",
MB_OK | MB_ICONINFORMATION);
}
else if(ret == IDCANCEL){
MessageBox(hwnd, "Dialog exited with IDCANCEL.", "Notice",
MB_OK | MB_ICONINFORMATION);
}
else if(ret == -1){
MessageBox(hwnd, "Dialog failed!", "Error",
MB_OK | MB_ICONINFORMATION);
}
}
break;
...........
............
...........

i recieve the message : error C2059: syntax error : ')' for marked line.
I tryed whatever i read about this error but no effect.
Perhaps break needs to change location. Instead of
}
break;

Try
break;
}
I tryed but it still does not work
Look at the parentheses:
MAKEINTRESOURCE(IDD_ABOUT), hwnd, AboutDlgProc);

Try:
MAKEINTRESOURCE((IDD_ABOUT), hwnd, AboutDlgProc);

- Kyle
Kyle,

I thought that as well, but look at the line above that one:

1
2
int ret = DialogBox(GetModuleHandle(NULL), 
                                 MAKEINTRESOURCE(IDD_ABOUT), hwnd, AboutDlgProc);


They go together.
Topic archived. No new replies allowed.