Hi Jacek,

On Tue, 31 Aug 2021 at 01:39, Jacek Caban wrote:
Hi Hugh,

On 8/30/21 2:04 PM, Hugh McMaster wrote:
> diff --git a/programs/conhost/window.c b/programs/conhost/window.c
> index 48cd9ed6f6b..ad707531bd2 100644
> --- a/programs/conhost/window.c
> +++ b/programs/conhost/window.c
> @@ -1819,7 +1819,8 @@ static INT_PTR WINAPI save_dialog_proc( HWND dialog, UINT msg, WPARAM wparam, LP
>       {
>       case WM_INITDIALOG:
>           SendDlgItemMessageW( dialog, IDC_SAV_SESSION, BM_SETCHECK, BST_CHECKED, 0 );
> -        break;
> +        SetFocus( GetDlgItem( dialog, IDC_SAV_SESSION ) );


I think that SetFocus should not be used directly on dialogs, this
should probably use WM_NEXTDLGCTL instead.

[1] says SetFocus() can be used: “If the control receiving the default focus is not appropriate, it can set the focus to the appropriate control by using the SetFocus function.”

In saying that, I’ll test WM_NEXTDLGCTL to compare.

[1] 
https://docs.microsoft.com/en-us/windows/win32/dlgbox/dlgbox-programming-considerations