[PATCH 1/2] user32: add edit control check to see if its in a dialog on WM_CHAR/VK_RETURN.

Lei Zhang thestig at google.com
Tue Apr 8 18:04:50 CDT 2008


Hi,

In committish 0fac05b9, I managed to break pressing enter and tab in
notepad. However, if I remove the offending code, then other edit
tests would fail. For several nights, I tried to figure out why
sometimes the edit control would respond to a WM_CHAR with wparam =
VK_RETURN, and other times just ignore it. I've ruled out window
styles, extended styles, whether it has a parent or not, and whether
it has focus.

Then I came across an article [1] titled "Just because you're a
control doesn't mean that you're necessarily inside a dialog box". It
looks like the edit box checks to see if its inside a dialog box and
responds differently if that is the case. I've implemented this check,
and now notepad works again. This probably is not 100% correct, but
it's a step closer in mimicking the native edit control's quirky
behavior.

[1] http://blogs.msdn.com/oldnewthing/archive/2007/08/20/4470527.aspx
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 0001-user32-add-edit-control-check-to-see-if-its-in-a-dial.txt
Url: http://www.winehq.org/pipermail/wine-patches/attachments/20080408/5a8cff3f/attachment.txt 


More information about the wine-patches mailing list