From: Jacek Caban jacek@codeweavers.com
--- dlls/user32/defwnd.c | 32 -------------------------------- dlls/win32u/defwnd.c | 8 ++++++++ 2 files changed, 8 insertions(+), 32 deletions(-)
diff --git a/dlls/user32/defwnd.c b/dlls/user32/defwnd.c index 8373aa8e797..70d62c4f718 100644 --- a/dlls/user32/defwnd.c +++ b/dlls/user32/defwnd.c @@ -93,22 +93,6 @@ LRESULT WINAPI DefWindowProcA( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam
switch(msg) { - case WM_NCCREATE: - if (lParam) - { - CREATESTRUCTA *cs = (CREATESTRUCTA *)lParam; - - result = NtUserMessageCall( hwnd, msg, wParam, lParam, 0, NtUserDefWindowProc, TRUE ); - - if(cs->style & (WS_HSCROLL | WS_VSCROLL)) - { - SCROLLINFO si = {sizeof si, SIF_ALL, 0, 100, 0, 0, 0}; - NtUserSetScrollInfo( hwnd, SB_HORZ, &si, FALSE ); - NtUserSetScrollInfo( hwnd, SB_VERT, &si, FALSE ); - } - } - break; - case WM_SYSCOMMAND: result = NC_HandleSysCommand( hwnd, wParam, lParam ); break; @@ -220,22 +204,6 @@ LRESULT WINAPI DefWindowProcW(
switch(msg) { - case WM_NCCREATE: - if (lParam) - { - CREATESTRUCTW *cs = (CREATESTRUCTW *)lParam; - - result = NtUserMessageCall( hwnd, msg, wParam, lParam, 0, NtUserDefWindowProc, FALSE ); - - if(cs->style & (WS_HSCROLL | WS_VSCROLL)) - { - SCROLLINFO si = {sizeof si, SIF_ALL, 0, 100, 0, 0, 0}; - NtUserSetScrollInfo( hwnd, SB_HORZ, &si, FALSE ); - NtUserSetScrollInfo( hwnd, SB_VERT, &si, FALSE ); - } - } - break; - case WM_SYSCOMMAND: result = NC_HandleSysCommand( hwnd, wParam, lParam ); break; diff --git a/dlls/win32u/defwnd.c b/dlls/win32u/defwnd.c index f44540f7f98..3e42e3b1e22 100644 --- a/dlls/win32u/defwnd.c +++ b/dlls/win32u/defwnd.c @@ -2369,6 +2369,14 @@ LRESULT default_window_proc( HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam, { CREATESTRUCTW *cs = (CREATESTRUCTW *)lparam; set_window_text( hwnd, cs->lpszName, ansi ); + + if (cs->style & (WS_HSCROLL | WS_VSCROLL)) + { + SCROLLINFO si = { .cbSize = sizeof(si), .fMask = SIF_ALL, .nMax = 100 }; + NtUserSetScrollInfo( hwnd, SB_HORZ, &si, FALSE ); + NtUserSetScrollInfo( hwnd, SB_VERT, &si, FALSE ); + } + result = 1; } break;