Small fixes

svn path=/trunk/; revision=624
This commit is contained in:
Boudewijn Dekker 1999-08-21 17:51:35 +00:00
parent 2c4de44226
commit c4385e9139
6 changed files with 59 additions and 17 deletions

View file

@ -17,6 +17,7 @@
#include <user32/nc.h>
#include <user32/resource.h>
#include <user32/combo.h>
#include <user32/widgets.h>
#include <user32/debug.h>
#define MAX(x,y) x > y ? x : y

View file

@ -9,6 +9,7 @@
#include <user32/sysmetr.h>
#include <user32/win.h>
#include <user32/heapdup.h>
#include <user32/widgets.h>
#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 );

View file

@ -1,7 +1,57 @@
#include <windows.h>
#include <user32/win.h>
/***********************************************************************
* 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;

View file

@ -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 );
}

View file

@ -8,6 +8,7 @@
#include <user32/menu.h>
#include <user32/nc.h>
#include <user32/heapdup.h>
#include <user32/widgets.h>
#include <wchar.h>
//#include <stdlib.h>
@ -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 );

View file

@ -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);
}
/***********************************************************************