28 May
2024
28 May
'24
8:28 p.m.
On Sun Mar 24 03:09:06 2024 +0000, Alistair Leslie-Hughes wrote:
I attempted to use a subclass however it just end up drawing badly and the dialog didn't get the key press message. Not sure, what I missed though. Do dialogs box actually get a key press message? I'm not sure why subclassing broke things, but I suppose it's not enough by itself, since the problem (which I didn't realize) is that keyboard messages are going to the individual controls, not the parent dialog window.
Still, a message hook seems like an ugly solution. One possibly better one is to use a modeless dialog and a custom message loop, and catch WM_KEYDOWN messages in the message loop. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/5247#note_66212