diff --git a/controls/edit.c b/controls/edit.c index a76c7d09941e7e3aea8b42c0505c6c39064e0cb4..717c7a9c4ca7d19214fecb3cd417d57c79300f1c 100644 --- a/controls/edit.c +++ b/controls/edit.c @@ -4408,8 +4408,8 @@ static LRESULT EDIT_WM_NCCreate(WND *wnd, DWORD style, HWND hwndParent, BOOL uni EDITSTATE *es; UINT alloc_size; - TRACE("Creating %s edit control, style = %08lx\n", - unicode ? "Unicode" : "ANSI", style); + TRACE("Creating %s edit control, style = %08lx %08lx\n", + unicode ? "Unicode" : "ANSI", style, wnd->dwExStyle); if (!(es = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*es)))) return FALSE; @@ -4429,16 +4429,15 @@ static LRESULT EDIT_WM_NCCreate(WND *wnd, DWORD style, HWND hwndParent, BOOL uni /* * In Win95 look and feel, the WS_BORDER style is replaced by the * WS_EX_CLIENTEDGE style for the edit control. This gives the edit - * control a non client area. + * control a non client area. Not always. This coordinates in some + * way with the window creation code in dialog.c When making + * modifications please ensure that the code still works for edit + * controls created directly with style 0x50800000, exStyle 0 ( + * which should have a single pixel border) */ if (TWEAK_WineLook != WIN31_LOOK) { - if (es->style & WS_BORDER) - { - es->style &= ~WS_BORDER; - wnd->dwStyle &= ~WS_BORDER; - wnd->dwExStyle |= WS_EX_CLIENTEDGE; - } + es->style &= ~WS_BORDER; } else { diff --git a/windows/dialog.c b/windows/dialog.c index 5a2db791327326f8c8c2d528d1cc7c2304c1a08f..449b016239d126fbe75931da835f6e9a91ba4092 100644 --- a/windows/dialog.c +++ b/windows/dialog.c @@ -479,6 +479,12 @@ static BOOL DIALOG_CreateControls( WND *pWnd, LPCSTR template, { template = (LPCSTR)DIALOG_GetControl32( (WORD *)template, &info, dlgTemplate->dialogEx ); + /* Is this it? */ + if (info.style & WS_BORDER) + { + info.style &= ~WS_BORDER; + info.exStyle |= WS_EX_CLIENTEDGE; + } hwndCtrl = CreateWindowExW( info.exStyle | WS_EX_NOPARENTNOTIFY, (LPCWSTR)info.className, (LPCWSTR)info.windowName,