Signed-off-by: Nikolay Sivov nsivov@codeweavers.com --- dlls/comctl32/edit.c | 2 +- dlls/comctl32/tests/misc.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/comctl32/edit.c b/dlls/comctl32/edit.c index a01b75bbe2..9f065f6983 100644 --- a/dlls/comctl32/edit.c +++ b/dlls/comctl32/edit.c @@ -5007,7 +5007,7 @@ void EDIT_Register(void) WNDCLASSW wndClass;
memset(&wndClass, 0, sizeof(wndClass)); - wndClass.style = CS_GLOBALCLASS | CS_DBLCLKS; + wndClass.style = CS_PARENTDC | CS_GLOBALCLASS | CS_DBLCLKS; wndClass.lpfnWndProc = EDIT_WindowProc; wndClass.cbClsExtra = 0; #ifdef __i386__ diff --git a/dlls/comctl32/tests/misc.c b/dlls/comctl32/tests/misc.c index 46bb431037..bef92b88dc 100644 --- a/dlls/comctl32/tests/misc.c +++ b/dlls/comctl32/tests/misc.c @@ -345,7 +345,7 @@ static void check_class( const char *name, int must_exist, UINT style, UINT igno
if (GetClassInfoA( 0, name, &wc )) { -todo_wine +todo_wine_if(strcmp(name, "Edit")) ok( !(~wc.style & style & ~ignore), "System class %s is missing bits %x (%08x/%08x)\n", name, ~wc.style & style, wc.style, style ); ok( !(wc.style & ~style), "System class %s has extra bits %x (%08x/%08x)\n",
Signed-off-by: Nikolay Sivov nsivov@codeweavers.com --- dlls/comctl32/edit.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-)
diff --git a/dlls/comctl32/edit.c b/dlls/comctl32/edit.c index 9f065f6983..86a0a58c3e 100644 --- a/dlls/comctl32/edit.c +++ b/dlls/comctl32/edit.c @@ -1477,12 +1477,15 @@ static void EDIT_InvalidateText(EDITSTATE *es, INT start, INT end) * In other words: this handler is OK * */ -static void EDIT_EM_SetSel(EDITSTATE *es, UINT start, UINT end, BOOL after_wrap) +static BOOL EDIT_EM_SetSel(EDITSTATE *es, UINT start, UINT end, BOOL after_wrap) { UINT old_start = es->selection_start; UINT old_end = es->selection_end; UINT len = get_text_length(es);
+ if (start == old_start && end == old_end) + return FALSE; + if (start == (UINT)-1) { start = es->selection_end; end = es->selection_end; @@ -1535,6 +1538,8 @@ static void EDIT_EM_SetSel(EDITSTATE *es, UINT start, UINT end, BOOL after_wrap) } } else EDIT_InvalidateText(es, start, old_end); + + return TRUE; }
@@ -3365,6 +3370,16 @@ static LRESULT EDIT_WM_KeyDown(EDITSTATE *es, INT key) if ((es->style & ES_MULTILINE) && EDIT_IsInsideDialog(es)) SendMessageW(es->hwndParent, WM_NEXTDLGCTL, shift, 0); break; + case 'A': + if (control) + { + if (EDIT_EM_SetSel(es, 0, get_text_length(es), FALSE)) + { + EDIT_NOTIFY_PARENT(es, EN_UPDATE); + EDIT_NOTIFY_PARENT(es, EN_CHANGE); + } + } + break; } return TRUE; }