clean up dialog init

This commit is contained in:
ehouse 2004-05-26 04:39:29 +00:00
parent 047b85624b
commit 621dd87d71
3 changed files with 106 additions and 101 deletions

View file

@ -54,6 +54,7 @@ PasswdDlg(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
return TRUE;
} else {
pState = (PasswdDialogState*)GetWindowLong( hDlg, GWL_USERDATA );
if ( !!pState ) {
globals = pState->globals;
switch ( message ) {
@ -61,7 +62,8 @@ PasswdDlg(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
id = LOWORD(wParam);
switch( id ) {
case IDOK:
ceGetDlgItemText( hDlg, PASS_EDIT, pState->buf, pState->lenp );
ceGetDlgItemText( hDlg, PASS_EDIT, pState->buf,
pState->lenp );
case IDCANCEL:
pState->userCancelled = id == IDCANCEL;
EndDialog( hDlg, id );
@ -69,7 +71,7 @@ PasswdDlg(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
return TRUE;
}
}
}
}
return FALSE;
} /* PasswdDlg */

View file

@ -108,6 +108,7 @@ BlankDlg(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
loadLettersList( hDlg, bState );
} else {
bState = (BlankDialogState*)GetWindowLong( hDlg, GWL_USERDATA );
if ( !!bState ) {
switch ( message ) {
case WM_KEYDOWN: /* key down. Select a list item? */
@ -132,7 +133,7 @@ BlankDlg(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
EndDialog( hDlg, id );
return TRUE;
}
}
}
return FALSE;

View file

@ -359,6 +359,7 @@ handleOptionsButton( HWND hDlg, CEAppGlobals* globals, GameInfoState* giState )
if ( WrapPrefsDialog( hDlg, globals, &state, &giState->prefsPrefs,
giState->isNewGame ) ) {
giState->prefsChanged = XP_TRUE;
giState->colorsChanged = state.colorsChanged;
/* nothing to do until user finally does confirm the parent dialog */
}
} /* handleOptionsButton */
@ -424,6 +425,7 @@ GameInfo(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
} else {
giState = (GameInfoState*)GetWindowLong( hDlg, GWL_USERDATA );
if ( !!giState ) {
globals = giState->globals;
switch (message) {
@ -509,7 +511,7 @@ GameInfo(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
/* return DefWindowProc(hDlg, message, wParam, lParam); */
}
}
}
return FALSE;
} /* GameInfo */