controls/edit.c not so clean - help please
Dmitry Timoshkov
dmitry at baikal.ru
Mon Nov 11 10:43:08 CST 2002
"Carl Sopchak" <carl.sopchak at cegis123.com> wrote:
> The following code is in the EDIT_MakeFit() function:
>
> if ((es->buffer_limit > 0) && (size > es->buffer_limit)) {
> EDIT_NOTIFY_PARENT(es, EN_MAXTEXT, "EN_MAXTEXT");
> return FALSE;
> }
> if ((es->buffer_limit > 0) && (size > es->buffer_limit))
> size = es->buffer_limit;
>
>
> Obviously, the second IF condition is never true, since it's the same as the
> prior IF, which does a 'return FALSE'.
Apparently the second IF can be removed. Regarding your EM_LIMITTEXT/WM_SETTEXT
question: only a test program can answer your question.
[skipped]
> Another question about this code from controls/edit.c/EDIT_WM_Char():
[skipped]
> The place that I marked "/* BECAUSE OF THIS... */" means that the code marked
> by "/* ... WE NEVER GET HERE! */" will never get executed.
>
> My question: In a read only multiline edit control, should a newline move the
> cursor to the beginning of the next line of text in the control?
Under Windows2000 pressing Enter does nothing in the read-only edit control.
For obvious cases please send a patch (in a diff -u format).
Thanks.
--
Dmitry.
More information about the wine-devel
mailing list