[PATCH] user32: edit control should respond to ctrl + z (try 2)

Dmitry Timoshkov dmitry at codeweavers.com
Fri Aug 31 22:33:46 CDT 2007


"Lei Zhang" <thestig at google.com> wrote:

> This patch lets users hit ctrl + Z in edit controls to trigger an
> undo. The test case has been improved to check for return values when
> appropriate.

> +    /* select all, cut (ctrl-x), undo (ctrl-z) */
> +    SendMessage(hwEdit, EM_SETSEL, 0, -1);
> +    r = SendMessage(hwEdit, WM_CHAR, 24, 0);
> +    todo_wine { ok(r == 1, "Expected: %d, got: %d\n", 1, r); }
> +    r = SendMessage(hwEdit, WM_CHAR, 26, 0);
> +    todo_wine { ok(r == 1, "Expected: %d, got: %d\n", 1, r); }

By "I'd suggest to add checks to make sure that every message you send above
really worked." I meant not simply check the SendMessage return values, but
actual Edit contents/selection changes tracking.

-- 
Dmitry.



More information about the wine-devel mailing list