[PATCH] conhost: Set focus to correct radio button in save dialog
Hugh McMaster
hugh.mcmaster at outlook.com
Mon Aug 30 17:02:09 CDT 2021
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
<https://docs.microsoft.com/en-us/windows/desktop/api/winuser/nf-winuser-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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20210831/9df6c569/attachment.htm>
More information about the wine-devel
mailing list