diff --git a/reactos/lib/user32/controls/edit.c b/reactos/lib/user32/controls/edit.c index 459bbd21fa1..01c275fa896 100644 --- a/reactos/lib/user32/controls/edit.c +++ b/reactos/lib/user32/controls/edit.c @@ -17,6 +17,7 @@ #include #include #include +#include #include #define MAX(x,y) x > y ? x : y diff --git a/reactos/lib/user32/controls/icontitle.c b/reactos/lib/user32/controls/icontitle.c index c125ba6135f..496d24a7a0f 100644 --- a/reactos/lib/user32/controls/icontitle.c +++ b/reactos/lib/user32/controls/icontitle.c @@ -9,6 +9,7 @@ #include #include #include +#include #define WM_ISACTIVEICON 0x0035 @@ -39,11 +40,11 @@ HWND ICONTITLE_Create( WND* wnd ) HWND hWnd; if( wnd->dwStyle & WS_CHILD ) - hWnd = CreateWindowExA( 0, ICONTITLE_CLASS_ATOM, NULL, + hWnd = CreateWindowExA( 0, ICONTITLE_CLASS_NAME, NULL, WS_CHILD | WS_CLIPSIBLINGS, 0, 0, 1, 1, wnd->parent->hwndSelf, 0, wnd->hInstance, NULL ); else - hWnd = CreateWindowExA( 0, ICONTITLE_CLASS_ATOM, NULL, + hWnd = CreateWindowExA( 0, ICONTITLE_CLASS_NAME, NULL, WS_CLIPSIBLINGS, 0, 0, 1, 1, wnd->hwndSelf, 0, wnd->hInstance, NULL ); wndPtr = WIN_FindWndPtr( hWnd ); diff --git a/reactos/lib/user32/graphics/fill.c b/reactos/lib/user32/graphics/fill.c index ef49ec22483..e00ee6feacc 100644 --- a/reactos/lib/user32/graphics/fill.c +++ b/reactos/lib/user32/graphics/fill.c @@ -1,7 +1,57 @@ #include +#include + +/*********************************************************************** + * FillWindow (USER.324) + */ +void FillWindow( HWND hwndParent, HWND hwnd, HDC hdc, HBRUSH hbrush ) +{ + RECT rect; + GetClientRect( hwnd, &rect ); + // DPtoLP16( hdc, (LPPOINT16)&rect, 2 ); + PaintRect( hwndParent, hwnd, hdc, hbrush, &rect ); +} + + +/*********************************************************************** + * PaintRect (USER.325) + */ +void PaintRect( HWND hwndParent, HWND hwnd, HDC hdc, + HBRUSH hbrush, const RECT *rect) +{ + if( hbrush <= CTLCOLOR_MAX ) + { + if( hwndParent ) + hbrush = PAINT_GetControlBrush( hwndParent, hwnd, hdc, (UINT)hbrush ); + else + return; + } + if( hbrush ) + FillRect( hdc, rect, hbrush ); +} + + +/*********************************************************************** + * GetControlBrush (USER.326) + */ +HBRUSH STDCALL GetControlBrush( HWND hwnd, HDC hdc, UINT ctlType ) +{ + WND* wndPtr = WIN_FindWndPtr( hwnd ); + + if((ctlType <= CTLCOLOR_MAX) && wndPtr ) + { + WND* parent; + if( wndPtr->dwStyle & WS_POPUP ) parent = wndPtr->owner; + else parent = wndPtr->parent; + if( !parent ) parent = wndPtr; + return (HBRUSH)PAINT_GetControlBrush( parent->hwndSelf, hwnd, hdc, ctlType ); + } + return (HBRUSH)0; +} + INT STDCALL FrameRect( HDC hdc, const RECT *rect, HBRUSH hbrush ) { HBRUSH prevBrush; diff --git a/reactos/lib/user32/internal/defwnd.c b/reactos/lib/user32/internal/defwnd.c index 61c4fe2df46..206060c80a9 100644 --- a/reactos/lib/user32/internal/defwnd.c +++ b/reactos/lib/user32/internal/defwnd.c @@ -428,16 +428,5 @@ LRESULT DEFWND_DefWinProc( WND *wndPtr, UINT msg, WPARAM wParam, } -/*********************************************************************** - * FillWindow (USER.324) - */ -void FillWindow( HWND hwndParent, HWND hwnd, HDC hdc, HBRUSH hbrush ) -{ - RECT rect; - GetClientRect( hwnd, &rect ); - // DPtoLP16( hdc, (LPPOINT16)&rect, 2 ); - // PaintRect( hwndParent, hwnd, hdc, hbrush, &rect ); -} - diff --git a/reactos/lib/user32/internal/menu.c b/reactos/lib/user32/internal/menu.c index ab0aefd63d0..e4fe07039f8 100644 --- a/reactos/lib/user32/internal/menu.c +++ b/reactos/lib/user32/internal/menu.c @@ -8,6 +8,7 @@ #include #include #include +#include #include //#include @@ -1177,7 +1178,7 @@ WINBOOL MENU_PatchResidentPopup( HQUEUE checkQueue, WND* checkWnd ) { // assert( uSubPWndLevel == 0 ); - pTopPopupWnd = WIN_FindWndPtr(CreateWindowA( POPUPMENU_CLASS_ATOM, NULL, + pTopPopupWnd = WIN_FindWndPtr(CreateWindowA( POPUPMENU_CLASS_NAME, NULL, WS_POPUP, x, y, width, height, hwndOwner, 0, wndOwner->hInstance, (LPVOID)hmenu )); @@ -1189,7 +1190,7 @@ WINBOOL MENU_PatchResidentPopup( HQUEUE checkQueue, WND* checkWnd ) { /* create a new window for the submenu */ - menu->hWnd = CreateWindowA( POPUPMENU_CLASS_ATOM, NULL, + menu->hWnd = CreateWindowA( POPUPMENU_CLASS_NAME, NULL, WS_POPUP, x, y, width, height, menu->hWnd, 0, wndOwner->hInstance, (LPVOID)hmenu ); diff --git a/reactos/lib/user32/windows/msg.c b/reactos/lib/user32/windows/msg.c index 56d52d2da8b..2659b03180e 100644 --- a/reactos/lib/user32/windows/msg.c +++ b/reactos/lib/user32/windows/msg.c @@ -269,7 +269,7 @@ LRESULT STDCALL SendMessageA( HWND hwnd, UINT msg, WPARAM wParam, MSG_CallWndProcHook( (LPMSG)&hwnd, FALSE); - return MSG_SendMessage(wndPtr,msg,wParam,lParam,FALSE); + return MSG_SendMessage(wndPtr,msg,wParam,lParam); } @@ -295,7 +295,7 @@ LRESULT STDCALL SendMessageW( HWND hwnd, UINT msg, WPARAM wParam, MSG_CallWndProcHook( (LPMSG)&hwnd, FALSE); - return MSG_SendMessage(wndPtr,msg,wParam,lParam,TRUE); + return MSG_SendMessage(wndPtr,msg,wParam,lParam); } /***********************************************************************