diff --git a/reactos/dll/win32/user32/controls/icontitle.c b/reactos/dll/win32/user32/controls/icontitle.c index aaaf5e4a172..d8c9d9e9c85 100644 --- a/reactos/dll/win32/user32/controls/icontitle.c +++ b/reactos/dll/win32/user32/controls/icontitle.c @@ -189,27 +189,6 @@ LRESULT WINAPI IconTitleWndProc( HWND hWnd, UINT msg, { HWND owner = GetWindow( hWnd, GW_OWNER ); -#ifdef __REACTOS__ // Do this now, remove after Server side is fixed. - PWND pWnd; - - pWnd = ValidateHwnd(hWnd); - if (pWnd) - { - if (!pWnd->fnid) - { - NtUserSetWindowFNID(hWnd, FNID_ICONTITLE); - } - else - { - if (pWnd->fnid != FNID_ICONTITLE) - { - ERR("Wrong window class for IconTitle!\n"); - return 0; - } - } - } -#endif - if (!IsWindow(hWnd)) return 0; switch( msg ) @@ -223,12 +202,6 @@ LRESULT WINAPI IconTitleWndProc( HWND hWnd, UINT msg, hIconTitleFont = CreateFontIndirectA( &logFont ); } return (hIconTitleFont ? 0 : -1); -#ifdef __REACTOS__ - case WM_NCDESTROY: - NtUserSetWindowFNID(hWnd, FNID_DESTROY); - case WM_DESTROY: - break; -#endif case WM_NCHITTEST: return HTCAPTION; case WM_NCMOUSEMOVE: diff --git a/reactos/dll/win32/user32/controls/scrollbar.c b/reactos/dll/win32/user32/controls/scrollbar.c index 545d2cee145..220ff885c19 100644 --- a/reactos/dll/win32/user32/controls/scrollbar.c +++ b/reactos/dll/win32/user32/controls/scrollbar.c @@ -110,7 +110,7 @@ IntDrawScrollInterior(HWND hWnd, HDC hDC, INT nBar, BOOL Vertical, */ if (nBar == SB_CTL) { - hBrush = (HBRUSH)SendMessageW(GetParent(hWnd), WM_CTLCOLORSCROLLBAR, (WPARAM)hDC, (LPARAM)hWnd); + hBrush = GetControlBrush( hWnd, hDC, WM_CTLCOLORSCROLLBAR); if (!hBrush) hBrush = GetSysColorBrush(COLOR_SCROLLBAR); } @@ -1251,6 +1251,10 @@ ScrollBarWndProc(WNDPROC DefWindowProc, HWND Wnd, UINT Msg, WPARAM wParam, LPARA { if (!pWnd->fnid) { + if (Msg != WM_CREATE) + { + return DefWindowProc(Wnd, Msg, wParam, lParam); + } NtUserSetWindowFNID(Wnd, FNID_SCROLLBAR); } else @@ -1275,15 +1279,6 @@ ScrollBarWndProc(WNDPROC DefWindowProc, HWND Wnd, UINT Msg, WPARAM wParam, LPARA IntScrollCreateScrollBar(Wnd, (LPCREATESTRUCTW) lParam); break; -#ifdef __REACTOS__ - case WM_DESTROY: - return DefWindowProc(Wnd, Msg, wParam, lParam ); - - case WM_NCDESTROY: - NtUserSetWindowFNID(Wnd, FNID_DESTROY); - break; -#endif - //#if 0 /* FIXME */ case WM_ENABLE: { diff --git a/reactos/dll/win32/user32/windows/menu.c b/reactos/dll/win32/user32/windows/menu.c index 3e46264846e..e30f216b895 100644 --- a/reactos/dll/win32/user32/windows/menu.c +++ b/reactos/dll/win32/user32/windows/menu.c @@ -1899,6 +1899,10 @@ PopupMenuWndProcW(HWND Wnd, UINT Message, WPARAM wParam, LPARAM lParam) { if (!pWnd->fnid) { + if (Message != WM_NCCREATE) + { + return DefWindowProcW(Wnd, Message, wParam, lParam); + } NtUserSetWindowFNID(Wnd, FNID_MENU); } else @@ -1954,12 +1958,6 @@ PopupMenuWndProcW(HWND Wnd, UINT Message, WPARAM wParam, LPARAM lParam) } break; -#ifdef __REACTOS__ - case WM_NCDESTROY: - NtUserSetWindowFNID(Wnd, FNID_DESTROY); - break; -#endif - case WM_SHOWWINDOW: if (0 != wParam) {