"Lei Zhang" thestig@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.