4 ms·
The first kind is the input focus and the second kind is the default button in a dialog (not really a kind of focus): "If the button is in a dialog box, the use
by ptx 6y ago
The first kind is the input focus and the second kind is the default button in a dialog (not really a kind of focus): "If the button is in a dialog box, the user can select the button by pressing the ENTER key, even when the button does not have the input focus."[1]
[1] https://docs.microsoft.com/en-us/windows/win32/controls/button-styles#BS_DEFPUSHBUTTON https://docs.microsoft.com/en-us/windows/win32/controls/butt...
- TazeTSchnitzel 6y agoI feel like it is almost its own kind of focus because that state can be lost, though I don't remember how. Multi-line text boxes maybe.
- ptx 6y agoYeah, there are definitely some non-obvious details in its behavior. The default button focus moves with the input focus to other buttons but reverts to the default default button if you focus another kind of control. Raymond Chen has an explanation: https://devblogs.microsoft.com/oldnewthing/20040802-00/?p=38283 https://devblogs.microsoft.com/oldnewthing/20040802-00/?p=38...
- TazeTSchnitzel 6y agoAha, thanks for that!