Commit 137420a0 authored by Bill Medland's avatar Bill Medland Committed by Alexandre Julliard

Correct the location of the style patching for the edit control.

parent 140cec5b
...@@ -4408,8 +4408,8 @@ static LRESULT EDIT_WM_NCCreate(WND *wnd, DWORD style, HWND hwndParent, BOOL uni ...@@ -4408,8 +4408,8 @@ static LRESULT EDIT_WM_NCCreate(WND *wnd, DWORD style, HWND hwndParent, BOOL uni
EDITSTATE *es; EDITSTATE *es;
UINT alloc_size; UINT alloc_size;
TRACE("Creating %s edit control, style = %08lx\n", TRACE("Creating %s edit control, style = %08lx %08lx\n",
unicode ? "Unicode" : "ANSI", style); unicode ? "Unicode" : "ANSI", style, wnd->dwExStyle);
if (!(es = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*es)))) if (!(es = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*es))))
return FALSE; return FALSE;
...@@ -4429,16 +4429,15 @@ static LRESULT EDIT_WM_NCCreate(WND *wnd, DWORD style, HWND hwndParent, BOOL uni ...@@ -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 * 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 * 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 (TWEAK_WineLook != WIN31_LOOK)
{ {
if (es->style & WS_BORDER)
{
es->style &= ~WS_BORDER; es->style &= ~WS_BORDER;
wnd->dwStyle &= ~WS_BORDER;
wnd->dwExStyle |= WS_EX_CLIENTEDGE;
}
} }
else else
{ {
......
...@@ -479,6 +479,12 @@ static BOOL DIALOG_CreateControls( WND *pWnd, LPCSTR template, ...@@ -479,6 +479,12 @@ static BOOL DIALOG_CreateControls( WND *pWnd, LPCSTR template,
{ {
template = (LPCSTR)DIALOG_GetControl32( (WORD *)template, &info, template = (LPCSTR)DIALOG_GetControl32( (WORD *)template, &info,
dlgTemplate->dialogEx ); 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, hwndCtrl = CreateWindowExW( info.exStyle | WS_EX_NOPARENTNOTIFY,
(LPCWSTR)info.className, (LPCWSTR)info.className,
(LPCWSTR)info.windowName, (LPCWSTR)info.windowName,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment