F
Frank
I'm looking at a program I wrote long ago and I think there is much wrong -
even tho it works.
I know very little c and wish the learn.
Is BOOL correct with a dialog proc!
Are there returns that don't belong there?
Is it correct to sometimes return a BOOL and sometime an int?
int iReply;
iReply = DialogBox(hInstance, "DlgRetrieveSavedGame", hwndMain,
RetrieveSavedProc);
if ( iReply == IDYES )
....snip
BOOL CALLBACK RetrieveSavedProc( HWND hDlg, UINT uMessage, WPARAM wParam,
LPARAM lParam)
{
...snip
case WM_INITDIALOG:
....snip
return TRUE;
case IDCANCEL:
EndDialog( hDlg, IDCANCEL);
return TRUE;
default:
return FALSE;
even tho it works.
I know very little c and wish the learn.
Is BOOL correct with a dialog proc!
Are there returns that don't belong there?
Is it correct to sometimes return a BOOL and sometime an int?
int iReply;
iReply = DialogBox(hInstance, "DlgRetrieveSavedGame", hwndMain,
RetrieveSavedProc);
if ( iReply == IDYES )
....snip
BOOL CALLBACK RetrieveSavedProc( HWND hDlg, UINT uMessage, WPARAM wParam,
LPARAM lParam)
{
...snip
case WM_INITDIALOG:
....snip
return TRUE;
case IDCANCEL:
EndDialog( hDlg, IDCANCEL);
return TRUE;
default:
return FALSE;