<meta http-equiv="Content-Type" content="text/html; charset=utf-8"><div dir="auto">Hi Jacek,</div><div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, 31 Aug 2021 at 01:39, Jacek Caban wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;padding-left:1ex;border-left-color:rgb(204,204,204)" dir="auto">Hi Hugh,<br>
<br>
On 8/30/21 2:04 PM, Hugh McMaster wrote:<br>
> diff --git a/programs/conhost/window.c b/programs/conhost/window.c<br>
> index 48cd9ed6f6b..ad707531bd2 100644<br>
> --- a/programs/conhost/window.c<br>
> +++ b/programs/conhost/window.c<br>
> @@ -1819,7 +1819,8 @@ static INT_PTR WINAPI save_dialog_proc( HWND dialog, UINT msg, WPARAM wparam, LP<br>
>       {<br>
>       case WM_INITDIALOG:<br>
>           SendDlgItemMessageW( dialog, IDC_SAV_SESSION, BM_SETCHECK, BST_CHECKED, 0 );<br>
> -        break;<br>
> +        SetFocus( GetDlgItem( dialog, IDC_SAV_SESSION ) );<br>
<br>
<br>
I think that SetFocus should not be used directly on dialogs, this <br>
should probably use WM_NEXTDLGCTL instead.</blockquote><div dir="auto"><br></div><div dir="auto">[1] says SetFocus() can be used: “If <span style="font-family:"Segoe UI",SegoeUI,"Helvetica Neue",Helvetica,Arial,sans-serif;color:rgb(23,23,23)">the control receiving the default focus is not appropriate, it can set the focus to the appropriate control by using the </span><a href="https://docs.microsoft.com/en-us/windows/desktop/api/winuser/nf-winuser-setfocus" style="box-sizing:inherit;text-decoration:none;word-wrap:break-word;font-family:"Segoe UI",SegoeUI,"Helvetica Neue",Helvetica,Arial,sans-serif"><span style="box-sizing:inherit;font-weight:600;outline-color:inherit;font-family:"Segoe UI",SegoeUI,"Helvetica Neue",Helvetica,Arial,sans-serif">SetFocus</span></a><span style="font-family:"Segoe UI",SegoeUI,"Helvetica Neue",Helvetica,Arial,sans-serif;color:rgb(23,23,23)"> function.”</span></div><div dir="auto"><br></div><div dir="auto">In saying that, I’ll test WM_NEXTDLGCTL to compare.</div><div dir="auto"><br></div><div dir="auto">[1] <div><a href="https://docs.microsoft.com/en-us/windows/win32/dlgbox/dlgbox-programming-considerations">https://docs.microsoft.com/en-us/windows/win32/dlgbox/dlgbox-programming-considerations</a></div></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;padding-left:1ex;border-left-color:rgb(204,204,204)" dir="auto"></blockquote></div></div>