mirror of
https://github.com/reactos/wine.git
synced 2024-11-25 20:59:54 +00:00
Fix processing of IDCANCEL command.
Don't change settings if the user canceled the "Custom" dialog.
This commit is contained in:
parent
803d9a8997
commit
50a4503c30
@ -47,7 +47,7 @@ BOOL CALLBACK CustomDlgProc( HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam
|
||||
return TRUE;
|
||||
|
||||
case IDCANCEL:
|
||||
EndDialog( hDlg, 0 );
|
||||
EndDialog( hDlg, 1 );
|
||||
return TRUE;
|
||||
}
|
||||
break;
|
||||
@ -105,6 +105,7 @@ BOOL CALLBACK TimesDlgProc( HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam )
|
||||
case WM_COMMAND:
|
||||
switch( LOWORD( wParam ) ) {
|
||||
case IDOK:
|
||||
case IDCANCEL:
|
||||
EndDialog( hDlg, 0 );
|
||||
return TRUE;
|
||||
}
|
||||
@ -122,6 +123,7 @@ BOOL CALLBACK AboutDlgProc( HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam )
|
||||
case WM_COMMAND:
|
||||
switch( LOWORD( wParam ) ) {
|
||||
case IDOK:
|
||||
case IDCANCEL:
|
||||
EndDialog( hDlg, 0 );
|
||||
return TRUE;
|
||||
}
|
||||
@ -129,4 +131,3 @@ BOOL CALLBACK AboutDlgProc( HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam )
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@ -441,8 +441,14 @@ void DestroyBoard( BOARD *p_board )
|
||||
|
||||
void SetDifficulty( BOARD *p_board, DIFFICULTY difficulty )
|
||||
{
|
||||
HMENU hMenu = GetMenu( p_board->hWnd );
|
||||
HMENU hMenu;
|
||||
|
||||
if ( difficulty == CUSTOM )
|
||||
if (DialogBoxParam( p_board->hInst, "DLG_CUSTOM", p_board->hWnd,
|
||||
CustomDlgProc, (LPARAM) p_board) != 0)
|
||||
return;
|
||||
|
||||
hMenu = GetMenu( p_board->hWnd );
|
||||
CheckMenuItem( hMenu, IDM_BEGINNER + p_board->difficulty, MF_UNCHECKED );
|
||||
p_board->difficulty = difficulty;
|
||||
CheckMenuItem( hMenu, IDM_BEGINNER + difficulty, MF_CHECKED );
|
||||
@ -467,8 +473,6 @@ void SetDifficulty( BOARD *p_board, DIFFICULTY difficulty )
|
||||
break;
|
||||
|
||||
case CUSTOM:
|
||||
DialogBoxParam( p_board->hInst, "DLG_CUSTOM", p_board->hWnd,
|
||||
CustomDlgProc, (LPARAM) p_board);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user