[Bug2699] Richedit and ES_DISABLENOSCROLL

Ann and Jason Edmeades us at the-edmeades.demon.co.uk
Fri Feb 11 15:19:06 CST 2005


This patch fixes user input into a richedit edit control when
es_disablenoscroll is specified. Note it does NOT implement this
functionality, but improves things to the point of being usable.

Currently the richedit subclasses to the edit control, and masks off a few
bits which are richedit specific. It did not, however, do this
ES_DISABLENOSCROLL. Since it gets passed through, then it seems to the edit
control as though ES_NUMBER is specified and hence only allows numeric
input.

Part 1 of the fix adds this option to those removed before passing the style
value onto the edit control. This bit was the part which took a few mins to
find/fix...

Part 2 of the fix modifies the style field in the structure passed into the
richedit control and subsequently through to the edit control in
WM_NCCREATE. The problem here is the 'new style' ie with masked bits, is set
using SetWindowLong to GWL_STYLE, but the original style passed through to
the edit control. Unfortunately this SetWindowLong doesn't actually affect
the edit control until such time as it has allocated its internal structure,
which happens when it actually processes the NCCREATE message, which is at
the end of our processing of it... This took a lot longer to find :-(

Changelog

Make the edit field created from a richedit control which was created with
ES_DISABLENOSCROLL, not have the ES_NUMBER style and hence accept
alphanumeric input

Jason
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bug2699.patch
Type: application/octet-stream
Size: 1091 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20050211/e9989690/bug2699.obj


More information about the wine-patches mailing list