Hello, this fixes 117 warning in the user dll when compiled with -DSTRICT License: LGPL, X11 Changelog: Michael Stefaniuc <mstefani@redhat.com> - some more fixes for compiling the user dll with -DSTRICT bye michael -- Michael Stefaniuc Tel.: +49-711-96437-199 System Administration Fax.: +49-711-96437-111 Red Hat GmbH Email: mstefani@redhat.com Hauptstaetterstr. 58 http://www.redhat.de/ D-70178 Stuttgart
Index: controls/combo.c =================================================================== RCS file: /home/wine/wine/controls/combo.c,v retrieving revision 1.90 diff -u -u -r1.90 combo.c --- controls/combo.c 29 Oct 2002 21:31:27 -0000 1.90 +++ controls/combo.c 29 Oct 2002 22:53:53 -0000 @@ -582,7 +582,7 @@ lphc->droppedRect.right - lphc->droppedRect.left, lphc->droppedRect.bottom - lphc->droppedRect.top, hwnd, (HMENU)ID_CB_LISTBOX, - GetWindowLongA( hwnd, GWL_HINSTANCE ), lphc ); + (HINSTANCE)GetWindowLongA( hwnd, GWL_HINSTANCE ), lphc ); else lphc->hWndLBox = CreateWindowExA(lbeExStyle, "ComboLBox", NULL, lbeStyle, lphc->droppedRect.left, @@ -590,7 +590,7 @@ lphc->droppedRect.right - lphc->droppedRect.left, lphc->droppedRect.bottom - lphc->droppedRect.top, hwnd, (HMENU)ID_CB_LISTBOX, - GetWindowLongA( hwnd, GWL_HINSTANCE ), lphc ); + (HINSTANCE)GetWindowLongA( hwnd, GWL_HINSTANCE ), lphc ); if( lphc->hWndLBox ) { @@ -623,14 +623,14 @@ lphc->textRect.right - lphc->textRect.left, lphc->textRect.bottom - lphc->textRect.top, hwnd, (HMENU)ID_CB_EDIT, - GetWindowLongA( hwnd, GWL_HINSTANCE ), NULL ); + (HINSTANCE)GetWindowLongA( hwnd, GWL_HINSTANCE ), NULL ); else lphc->hWndEdit = CreateWindowExA(0, "Edit", NULL, lbeStyle, lphc->textRect.left, lphc->textRect.top, lphc->textRect.right - lphc->textRect.left, lphc->textRect.bottom - lphc->textRect.top, hwnd, (HMENU)ID_CB_EDIT, - GetWindowLongA( hwnd, GWL_HINSTANCE ), NULL ); + (HINSTANCE)GetWindowLongA( hwnd, GWL_HINSTANCE ), NULL ); if( !lphc->hWndEdit ) bEdit = FALSE; @@ -927,7 +927,8 @@ */ if (CB_DISABLED(lphc)) { - hBkgBrush = SendMessageW(lphc->owner, WM_CTLCOLORSTATIC, hDC, (LPARAM)lphc->self ); + hBkgBrush = (HBRUSH)SendMessageW(lphc->owner, WM_CTLCOLORSTATIC, + (WPARAM)hDC, (LPARAM)lphc->self ); /* * We have to change the text color since WM_CTLCOLORSTATIC will @@ -940,11 +941,13 @@ { if (lphc->wState & CBF_EDIT) { - hBkgBrush = SendMessageW(lphc->owner, WM_CTLCOLOREDIT, hDC, (LPARAM)lphc->self ); + hBkgBrush = (HBRUSH)SendMessageW(lphc->owner, WM_CTLCOLOREDIT, + (WPARAM)hDC, (LPARAM)lphc->self ); } else { - hBkgBrush = SendMessageW(lphc->owner, WM_CTLCOLORLISTBOX, hDC, (LPARAM)lphc->self ); + hBkgBrush = (HBRUSH)SendMessageW(lphc->owner, WM_CTLCOLORLISTBOX, + (WPARAM)hDC, (LPARAM)lphc->self ); } } @@ -1946,14 +1949,14 @@ case WM_PRINTCLIENT: if (lParam & PRF_ERASEBKGND) - COMBO_EraseBackground(hwnd, lphc, wParam); + COMBO_EraseBackground(hwnd, lphc, (HDC)wParam); /* Fallthrough */ case WM_PAINT: /* wParam may contain a valid HDC! */ - return COMBO_Paint(lphc, wParam); + return COMBO_Paint(lphc, (HDC)wParam); case WM_ERASEBKGND: - return COMBO_EraseBackground(hwnd, lphc, wParam); + return COMBO_EraseBackground(hwnd, lphc, (HDC)wParam); case WM_GETDLGCODE: { LRESULT result = DLGC_WANTARROWS | DLGC_WANTCHARS; @@ -1980,7 +1983,7 @@ !(lphc->wState & CBF_NORESIZE) ) COMBO_Size( lphc ); return TRUE; case WM_SETFONT: - COMBO_Font( lphc, (HFONT16)wParam, (BOOL)lParam ); + COMBO_Font( lphc, (HFONT)wParam, (BOOL)lParam ); return TRUE; case WM_GETFONT: return (LRESULT)lphc->hFont; Index: controls/desktop.c =================================================================== RCS file: /home/wine/wine/controls/desktop.c,v retrieving revision 1.27 diff -u -u -r1.27 desktop.c --- controls/desktop.c 17 Aug 2002 00:43:16 -0000 1.27 +++ controls/desktop.c 29 Oct 2002 22:53:53 -0000 @@ -51,7 +51,7 @@ DesktopWndProc, /* procW */ 0, /* extra */ IDC_ARROWA, /* cursor */ - COLOR_BACKGROUND+1 /* brush */ + (HBRUSH)(COLOR_BACKGROUND+1) /* brush */ }; @@ -151,7 +151,7 @@ (!fTileWallPaper && ((bitmapSize.cx < rect.right) || (bitmapSize.cy < rect.bottom)))) { HBRUSH brush = hbrushPattern; - if (!brush) brush = GetClassLongA( hwnd, GCL_HBRBACKGROUND ); + if (!brush) brush = (HBRUSH)GetClassLongA( hwnd, GCL_HBRBACKGROUND ); /* Set colors in case pattern is a monochrome bitmap */ SetBkColor( hdc, RGB(0,0,0) ); SetTextColor( hdc, GetSysColor(COLOR_BACKGROUND) ); Index: controls/edit.c =================================================================== RCS file: /home/wine/wine/controls/edit.c,v retrieving revision 1.103 diff -u -u -r1.103 edit.c --- controls/edit.c 25 Sep 2002 03:24:53 -0000 1.103 +++ controls/edit.c 29 Oct 2002 22:53:55 -0000 @@ -1506,7 +1506,7 @@ */ static void EDIT_LockBuffer(EDITSTATE *es) { - HINSTANCE hInstance = GetWindowLongW( es->hwndSelf, GWL_HINSTANCE ); + HINSTANCE hInstance = (HINSTANCE)GetWindowLongW( es->hwndSelf, GWL_HINSTANCE ); if (!es->text) { CHAR *textA = NULL; UINT countA = 0; @@ -2181,7 +2181,7 @@ */ static void EDIT_UnlockBuffer(EDITSTATE *es, BOOL force) { - HINSTANCE hInstance = GetWindowLongW( es->hwndSelf, GWL_HINSTANCE ); + HINSTANCE hInstance = (HINSTANCE)GetWindowLongW( es->hwndSelf, GWL_HINSTANCE ); /* Edit window might be already destroyed */ if(!IsWindow(es->hwndSelf)) @@ -2491,7 +2491,7 @@ */ static HLOCAL16 EDIT_EM_GetHandle16(EDITSTATE *es) { - HINSTANCE hInstance = GetWindowLongW( es->hwndSelf, GWL_HINSTANCE ); + HINSTANCE hInstance = (HINSTANCE)GetWindowLongW( es->hwndSelf, GWL_HINSTANCE ); CHAR *textA; UINT countA, alloc_size; @@ -3121,7 +3121,7 @@ */ static void EDIT_EM_SetHandle(EDITSTATE *es, HLOCAL hloc) { - HINSTANCE hInstance = GetWindowLongW( es->hwndSelf, GWL_HINSTANCE ); + HINSTANCE hInstance = (HINSTANCE)GetWindowLongW( es->hwndSelf, GWL_HINSTANCE ); if (!(es->style & ES_MULTILINE)) return; @@ -3201,7 +3201,7 @@ */ static void EDIT_EM_SetHandle16(EDITSTATE *es, HLOCAL16 hloc) { - HINSTANCE hInstance = GetWindowLongW( es->hwndSelf, GWL_HINSTANCE ); + HINSTANCE hInstance = (HINSTANCE)GetWindowLongW( es->hwndSelf, GWL_HINSTANCE ); INT countW, countA; HLOCAL hloc32W_new; WCHAR *textW; @@ -3748,7 +3748,7 @@ */ static LRESULT EDIT_WM_Destroy(EDITSTATE *es) { - HINSTANCE hInstance = GetWindowLongW( es->hwndSelf, GWL_HINSTANCE ); + HINSTANCE hInstance = (HINSTANCE)GetWindowLongW( es->hwndSelf, GWL_HINSTANCE ); LINEDEF *pc, *pp; if (es->hloc32W) { Index: controls/static.c =================================================================== RCS file: /home/wine/wine/controls/static.c,v retrieving revision 1.39 diff -u -u -r1.39 static.c --- controls/static.c 17 Oct 2002 16:43:44 -0000 1.39 +++ controls/static.c 29 Oct 2002 22:53:55 -0000 @@ -125,7 +125,7 @@ ERR("huh? hBitmap!=0, but not bitmap\n"); return 0; } - hOldBitmap = SetWindowLongA( hwnd, HICON_GWL_OFFSET, hBitmap ); + hOldBitmap = (HBITMAP)SetWindowLongA( hwnd, HICON_GWL_OFFSET, (LONG)hBitmap ); if (hBitmap) { BITMAP bm; @@ -143,7 +143,7 @@ */ static HICON STATIC_LoadIconA( HWND hwnd, LPCSTR name ) { - HINSTANCE hInstance = GetWindowLongA( hwnd, GWL_HINSTANCE ); + HINSTANCE hInstance = (HINSTANCE)GetWindowLongA( hwnd, GWL_HINSTANCE ); HICON hicon = LoadIconA( hInstance, name ); if (!hicon) hicon = LoadIconA( 0, name ); return hicon; @@ -156,7 +156,7 @@ */ static HICON STATIC_LoadIconW( HWND hwnd, LPCWSTR name ) { - HINSTANCE hInstance = GetWindowLongA( hwnd, GWL_HINSTANCE ); + HINSTANCE hInstance = (HINSTANCE)GetWindowLongA( hwnd, GWL_HINSTANCE ); HICON hicon = LoadIconW( hInstance, name ); if (!hicon) hicon = LoadIconW( 0, name ); return hicon; @@ -169,7 +169,7 @@ */ static HBITMAP STATIC_LoadBitmapA( HWND hwnd, LPCSTR name ) { - HINSTANCE hInstance = GetWindowLongA( hwnd, GWL_HINSTANCE ); + HINSTANCE hInstance = (HINSTANCE)GetWindowLongA( hwnd, GWL_HINSTANCE ); HBITMAP hbitmap = LoadBitmapA( hInstance, name ); if (!hbitmap) /* Try OEM icon (FIXME: is this right?) */ hbitmap = LoadBitmapA( 0, name ); @@ -183,7 +183,7 @@ */ static HBITMAP STATIC_LoadBitmapW( HWND hwnd, LPCWSTR name ) { - HINSTANCE hInstance = GetWindowLongA( hwnd, GWL_HINSTANCE ); + HINSTANCE hInstance = (HINSTANCE)GetWindowLongA( hwnd, GWL_HINSTANCE ); HBITMAP hbitmap = LoadBitmapW( hInstance, name ); if (!hbitmap) /* Try OEM icon (FIXME: is this right?) */ hbitmap = LoadBitmapW( 0, name ); @@ -360,7 +360,7 @@ case STM_SETIMAGE: switch(wParam) { case IMAGE_BITMAP: - lResult = STATIC_SetBitmap( hwnd, (HBITMAP)lParam, style ); + lResult = (LRESULT)STATIC_SetBitmap( hwnd, (HBITMAP)lParam, style ); break; case IMAGE_ICON: lResult = (LRESULT)STATIC_SetIcon( hwnd, (HICON)lParam, style ); @@ -418,7 +418,7 @@ dis.itemData = 0; GetClientRect( hwnd, &dis.rcItem ); - SendMessageW( GetParent(hwnd), WM_CTLCOLORSTATIC, hdc, (LPARAM)hwnd ); + SendMessageW( GetParent(hwnd), WM_CTLCOLORSTATIC, (WPARAM)hdc, (LPARAM)hwnd ); SendMessageW( GetParent(hwnd), WM_DRAWITEM, id, (LPARAM)&dis ); } @@ -462,15 +462,15 @@ if (style & SS_NOPREFIX) wFormat |= DT_NOPREFIX; - if ((hFont = GetWindowLongA( hwnd, HFONT_GWL_OFFSET ))) SelectObject( hdc, hFont ); + if ((hFont = (HFONT)GetWindowLongA( hwnd, HFONT_GWL_OFFSET ))) SelectObject( hdc, hFont ); if ((style & SS_NOPREFIX) || ((style & SS_TYPEMASK) != SS_SIMPLE)) { - hBrush = SendMessageW( GetParent(hwnd), WM_CTLCOLORSTATIC, hdc, - (LPARAM)hwnd ); + hBrush = (HBRUSH)SendMessageW( GetParent(hwnd), WM_CTLCOLORSTATIC, + (WPARAM)hdc, (LPARAM)hwnd ); if (!hBrush) /* did the app forget to call defwindowproc ? */ - hBrush = DefWindowProcW(GetParent(hwnd), WM_CTLCOLORSTATIC, hdc, - (LPARAM)hwnd); + hBrush = (HBRUSH)DefWindowProcW(GetParent(hwnd), WM_CTLCOLORSTATIC, + (WPARAM)hdc, (LPARAM)hwnd); FillRect( hdc, &rc, hBrush ); } if (!IsWindowEnabled(hwnd)) SetTextColor(hdc, GetSysColor(COLOR_GRAYTEXT)); @@ -529,7 +529,8 @@ HICON hIcon; GetClientRect( hwnd, &rc ); - hbrush = SendMessageW( GetParent(hwnd), WM_CTLCOLORSTATIC, hdc, (LPARAM)hwnd ); + hbrush = (HBRUSH)SendMessageW( GetParent(hwnd), WM_CTLCOLORSTATIC, + (WPARAM)hdc, (LPARAM)hwnd ); FillRect( hdc, &rc, hbrush ); if ((hIcon = (HICON)GetWindowLongA( hwnd, HICON_GWL_OFFSET ))) DrawIcon( hdc, rc.left, rc.top, hIcon ); @@ -543,7 +544,8 @@ HBITMAP hBitmap, oldbitmap; GetClientRect( hwnd, &rc ); - hbrush = SendMessageW( GetParent(hwnd), WM_CTLCOLORSTATIC, hdc, (LPARAM)hwnd ); + hbrush = (HBRUSH)SendMessageW( GetParent(hwnd), WM_CTLCOLORSTATIC, + (WPARAM)hdc, (LPARAM)hwnd ); FillRect( hdc, &rc, hbrush ); if ((hBitmap = (HBITMAP)GetWindowLongA( hwnd, HICON_GWL_OFFSET ))) Index: controls/uitools.c =================================================================== RCS file: /home/wine/wine/controls/uitools.c,v retrieving revision 1.28 diff -u -u -r1.28 uitools.c --- controls/uitools.c 9 Sep 2002 19:22:40 -0000 1.28 +++ controls/uitools.c 29 Oct 2002 22:53:56 -0000 @@ -24,6 +24,7 @@ #include "wine/winuser16.h" #include "winuser.h" #include "user.h" +#include "wownt32.h" #include "wine/debug.h" WINE_DEFAULT_DEBUG_CHANNEL(graphics); @@ -584,7 +585,7 @@ BOOL ret; CONV_RECT16TO32( rc, &rect32 ); - ret = DrawEdge( hdc, &rect32, edge, flags ); + ret = DrawEdge( HDC_32(hdc), &rect32, edge, flags ); CONV_RECT32TO16( &rect32, rc ); return ret; } @@ -1392,7 +1393,7 @@ BOOL ret; CONV_RECT16TO32( rc, &rect32 ); - ret = DrawFrameControl( hdc, &rect32, uType, uState ); + ret = DrawFrameControl( HDC_32(hdc), &rect32, uType, uState ); CONV_RECT32TO16( &rect32, rc ); return ret; } Index: windows/defwnd.c =================================================================== RCS file: /home/wine/wine/windows/defwnd.c,v retrieving revision 1.77 diff -u -u -r1.77 defwnd.c --- windows/defwnd.c 10 Oct 2002 21:22:13 -0000 1.77 +++ windows/defwnd.c 29 Oct 2002 22:53:56 -0000 @@ -31,6 +31,7 @@ #include "windef.h" #include "wingdi.h" #include "winnls.h" +#include "wownt32.h" #include "wine/unicode.h" #include "wine/winuser16.h" #include "wine/server.h" @@ -388,7 +389,7 @@ LONG hitcode; POINT pt; WND *wndPtr = WIN_GetPtr( hwnd ); - HMENU hMenu = wndPtr->hSysMenu; + HMENU hMenu = HMENU_32(wndPtr->hSysMenu); WIN_ReleasePtr( wndPtr ); if (!hMenu) return 0; pt.x = SLOWORD(lParam); @@ -488,7 +489,7 @@ { RECT rect; HDC hdc = (HDC)wParam; - HBRUSH hbr = GetClassLongW( hwnd, GCL_HBRBACKGROUND ); + HBRUSH hbr = (HBRUSH)GetClassLongW( hwnd, GCL_HBRBACKGROUND ); if (!hbr) return 0; if (GetClassLongW( hwnd, GCL_STYLE ) & CS_PARENTDC) @@ -622,7 +623,7 @@ UINT len; HICON hIcon = (HICON)GetClassLongW( hwnd, GCL_HICON ); - HINSTANCE instance = GetWindowLongW( hwnd, GWL_HINSTANCE ); + HINSTANCE instance = (HINSTANCE)GetWindowLongW( hwnd, GWL_HINSTANCE ); if (hIcon) return (LRESULT)hIcon; for(len=1; len<64; len++) if((hIcon = LoadIconW(instance, MAKEINTRESOURCEW(len)))) Index: windows/message.c =================================================================== RCS file: /home/wine/wine/windows/message.c,v retrieving revision 1.147 diff -u -u -r1.147 message.c --- windows/message.c 29 Oct 2002 00:41:42 -0000 1.147 +++ windows/message.c 29 Oct 2002 22:53:57 -0000 @@ -778,7 +778,7 @@ DWORD WINAPI WaitForInputIdle( HANDLE hProcess, DWORD dwTimeOut ) { DWORD start_time, elapsed, ret; - HANDLE idle_event = -1; + HANDLE idle_event = (HANDLE)-1; SERVER_START_REQ( wait_input_idle ) { Index: windows/nonclient.c =================================================================== RCS file: /home/wine/wine/windows/nonclient.c,v retrieving revision 1.102 diff -u -u -r1.102 nonclient.c --- windows/nonclient.c 29 Oct 2002 00:41:42 -0000 1.102 +++ windows/nonclient.c 29 Oct 2002 22:53:57 -0000 @@ -33,6 +33,7 @@ #include "wine/debug.h" #include "shellapi.h" #include "bitmap.h" +#include "wownt32.h" WINE_DEFAULT_DEBUG_CHANNEL(nonclient); WINE_DECLARE_DEBUG_CHANNEL(shell); @@ -873,7 +874,7 @@ /*********************************************************************** * NC_DrawMaxButton */ -static void NC_DrawMaxButton( HWND hwnd, HDC16 hdc, BOOL down ) +static void NC_DrawMaxButton( HWND hwnd, HDC hdc, BOOL down ) { RECT rect; UINT flags = IsZoomed(hwnd) ? DFCS_CAPTIONRESTORE : DFCS_CAPTIONMAX; @@ -884,14 +885,14 @@ rect.top += 1; rect.right -= 1; if (down) flags |= DFCS_PUSHED; - DrawFrameControl( hdc, &rect, DFC_CAPTION, flags ); + DrawFrameControl( HDC_32(hdc), &rect, DFC_CAPTION, flags ); } /*********************************************************************** * NC_DrawMinButton */ -static void NC_DrawMinButton( HWND hwnd, HDC16 hdc, BOOL down ) +static void NC_DrawMinButton( HWND hwnd, HDC hdc, BOOL down ) { RECT rect; UINT flags = DFCS_CAPTIONMIN; @@ -905,7 +906,7 @@ rect.top += 1; rect.right -= 1; if (down) flags |= DFCS_PUSHED; - DrawFrameControl( hdc, &rect, DFC_CAPTION, flags ); + DrawFrameControl( HDC_32(hdc), &rect, DFC_CAPTION, flags ); } @@ -998,7 +999,7 @@ * Draws the maximize button for Win95 style windows. * If bGrayed is true, then draw a disabled Maximize button */ -static void NC_DrawMaxButton95(HWND hwnd,HDC16 hdc,BOOL down, BOOL bGrayed) +static void NC_DrawMaxButton95(HWND hwnd,HDC hdc,BOOL down, BOOL bGrayed) { RECT rect; UINT flags = IsZoomed(hwnd) ? DFCS_CAPTIONRESTORE : DFCS_CAPTIONMAX; @@ -1012,7 +1013,7 @@ rect.right -= 2; if (down) flags |= DFCS_PUSHED; if (bGrayed) flags |= DFCS_INACTIVE; - DrawFrameControl( hdc, &rect, DFC_CAPTION, flags ); + DrawFrameControl( HDC_32(hdc), &rect, DFC_CAPTION, flags ); } /****************************************************************************** @@ -1021,7 +1022,7 @@ * Draws the minimize button for Win95 style windows. * If bGrayed is true, then draw a disabled Minimize button */ -static void NC_DrawMinButton95(HWND hwnd,HDC16 hdc,BOOL down, BOOL bGrayed) +static void NC_DrawMinButton95(HWND hwnd,HDC hdc,BOOL down, BOOL bGrayed) { RECT rect; UINT flags = DFCS_CAPTIONMIN; @@ -1038,7 +1039,7 @@ rect.right -= 2; if (down) flags |= DFCS_PUSHED; if (bGrayed) flags |= DFCS_INACTIVE; - DrawFrameControl( hdc, &rect, DFC_CAPTION, flags ); + DrawFrameControl( HDC_32(hdc), &rect, DFC_CAPTION, flags ); } /*********************************************************************** @@ -1409,10 +1410,10 @@ TRACE("%04x %d\n", hwnd, active ); - if (!(hdc = GetDCEx( hwnd, (clip > 1) ? clip : 0, DCX_USESTYLE | DCX_WINDOW | - ((clip > 1) ? (DCX_INTERSECTRGN | DCX_KEEPCLIPRGN): 0) ))) return; + if (!(hdc = GetDCEx( hwnd, (clip > (HRGN)1) ? clip : 0, DCX_USESTYLE | DCX_WINDOW | + ((clip > (HRGN)1) ? (DCX_INTERSECTRGN | DCX_KEEPCLIPRGN): 0) ))) return; - if (ExcludeVisRect16( hdc, rectClient.left-rectWindow.left, + if (ExcludeVisRect16( HDC_16(hdc), rectClient.left-rectWindow.left, rectClient.top-rectWindow.top, rectClient.right-rectWindow.left, rectClient.bottom-rectWindow.top ) @@ -1541,11 +1542,11 @@ Now, how is the "system" supposed to tell what happened? */ - if (!(hdc = GetDCEx( hwnd, (clip > 1) ? clip : 0, DCX_USESTYLE | DCX_WINDOW | - ((clip > 1) ?(DCX_INTERSECTRGN | DCX_KEEPCLIPRGN) : 0) ))) return; + if (!(hdc = GetDCEx( hwnd, (clip > (HRGN)1) ? clip : 0, DCX_USESTYLE | DCX_WINDOW | + ((clip > (HRGN)1) ?(DCX_INTERSECTRGN | DCX_KEEPCLIPRGN) : 0) ))) return; - if (ExcludeVisRect16( hdc, rectClient.left-rectWindow.left, + if (ExcludeVisRect16( HDC_16(hdc), rectClient.left-rectWindow.left, rectClient.top-rectWindow.top, rectClient.right-rectWindow.left, rectClient.bottom-rectWindow.top ) @@ -1559,7 +1560,7 @@ rect.right = rectWindow.right - rectWindow.left; rect.bottom = rectWindow.bottom - rectWindow.top; - if( clip > 1 ) + if( clip > (HRGN)1 ) GetRgnBox( clip, &rectClip ); else { @@ -1782,7 +1783,7 @@ DWORD wndStyle = GetWindowLongA( hwnd, GWL_STYLE); HMENU hSysMenu = GetSystemMenu(hwnd, FALSE); - void (*paintButton)(HWND, HDC16, BOOL, BOOL); + void (*paintButton)(HWND, HDC, BOOL, BOOL); if (wParam == HTMINBUTTON) { @@ -1857,7 +1858,7 @@ MSG msg; HDC hdc = GetWindowDC( hwnd ); BOOL pressed = TRUE; - void (*paintButton)(HWND, HDC16, BOOL); + void (*paintButton)(HWND, HDC, BOOL); SetCapture( hwnd ); @@ -2218,7 +2219,7 @@ SelectObject (hdcMask, hMaskBmp); /* Draw the grayed bitmap using the mask */ - hOldBrush = SelectObject (hdc, RGB(128, 128, 128)); + hOldBrush = SelectObject (hdc, (HGDIOBJ)RGB(128, 128, 128)); BitBlt (hdc, x, y, 12, 10, hdcMask, 0, 0, 0xB8074A); Index: windows/painting.c =================================================================== RCS file: /home/wine/wine/windows/painting.c,v retrieving revision 1.77 diff -u -u -r1.77 painting.c --- windows/painting.c 18 Oct 2002 04:05:49 -0000 1.77 +++ windows/painting.c 29 Oct 2002 22:53:58 -0000 @@ -74,7 +74,7 @@ static BOOL CALLBACK draw_state_callback( HDC hdc, LPARAM lparam, WPARAM wparam, int cx, int cy ) { const struct draw_state_info *info = (struct draw_state_info *)lparam; - return PAINTING_CallTo16_word_wlwww( info->proc, hdc, info->param, wparam, cx, cy ); + return PAINTING_CallTo16_word_wlwww( info->proc, HDC_16(hdc), info->param, wparam, cx, cy ); } @@ -212,7 +212,7 @@ if(wnd->hwndSelf == GetDesktopWindow()) { wnd->flags &= ~WIN_NEEDS_NCPAINT; - if( wnd->hrgnUpdate > 1 ) + if( wnd->hrgnUpdate > (HRGN)1 ) { if (!hRgn) hRgn = CreateRectRgn( 0, 0, 0, 0 ); CombineRgn( hRgn, wnd->hrgnUpdate, 0, RGN_COPY ); @@ -245,7 +245,7 @@ TRACE_(nonclient)( "\tclient box (%i,%i-%i,%i), hrgnUpdate %04x\n", r.left, r.top, r.right, r.bottom, wnd->hrgnUpdate ); - if( wnd->hrgnUpdate > 1 ) + if( wnd->hrgnUpdate > (HRGN)1 ) { /* Check if update rgn overlaps with nonclient area */ @@ -282,16 +282,16 @@ if(!hClip && wnd->hrgnUpdate ) goto copyrgn; } else - if( wnd->hrgnUpdate == 1 )/* entire window */ + if( wnd->hrgnUpdate == (HRGN)1 )/* entire window */ { if( uncFlags & UNC_UPDATE ) wnd->hrgnUpdate = CreateRectRgnIndirect( &r ); - if( uncFlags & UNC_REGION ) hrgnRet = 1; + if( uncFlags & UNC_REGION ) hrgnRet = (HRGN)1; uncFlags |= UNC_ENTIRE; } } else /* no WM_NCPAINT unless forced */ { - if( wnd->hrgnUpdate > 1 ) + if( wnd->hrgnUpdate > (HRGN)1 ) { copyrgn: if( uncFlags & UNC_REGION ) @@ -302,29 +302,29 @@ } } else - if( wnd->hrgnUpdate == 1 && (uncFlags & UNC_UPDATE) ) + if( wnd->hrgnUpdate == (HRGN)1 && (uncFlags & UNC_UPDATE) ) { GETCLIENTRECTW( wnd, r ); wnd->hrgnUpdate = CreateRectRgnIndirect( &r ); - if( uncFlags & UNC_REGION ) hrgnRet = 1; + if( uncFlags & UNC_REGION ) hrgnRet = (HRGN)1; } } if(!hClip && (uncFlags & UNC_ENTIRE) ) { /* still don't do anything if there is no nonclient area */ - hClip = (memcmp( &wnd->rectWindow, &wnd->rectClient, sizeof(RECT) ) != 0); + hClip = (HRGN)(memcmp( &wnd->rectWindow, &wnd->rectClient, sizeof(RECT) ) != 0); } if( hClip ) /* NOTE: WM_NCPAINT allows wParam to be 1 */ { - if ( hClip == hrgnRet && hrgnRet > 1 ) { + if ( hClip == hrgnRet && hrgnRet > (HRGN)1 ) { hClip = CreateRectRgn( 0, 0, 0, 0 ); CombineRgn( hClip, hrgnRet, 0, RGN_COPY ); } - SendMessageA( wnd->hwndSelf, WM_NCPAINT, hClip, 0L ); - if( (hClip > 1) && (hClip != hRgn) && (hClip != hrgnRet) ) + SendMessageA( wnd->hwndSelf, WM_NCPAINT, (WPARAM)hClip, 0L ); + if( (hClip > (HRGN)1) && (hClip != hRgn) && (hClip != hrgnRet) ) DeleteObject( hClip ); /* * Since all Window locks are suspended while processing the WM_NCPAINT @@ -354,7 +354,7 @@ HWND parent; HRGN hrg; - if (wndChild->hrgnUpdate == 1 ) { + if (wndChild->hrgnUpdate == (HRGN)1 ) { RECT r; r.left = 0; r.top = 0; @@ -374,7 +374,7 @@ { POINT ptOffset; RECT rect, rectParent; - if( wndParent->hrgnUpdate == 1 ) + if( wndParent->hrgnUpdate == (HRGN)1 ) { RECT r; @@ -431,7 +431,7 @@ if( flags & RDW_INVALIDATE ) { - if( hRgn > 1 ) + if( hRgn > (HRGN)1 ) { switch ((UINT)wndPtr->hrgnUpdate) { @@ -457,11 +457,11 @@ break; } } - else if( hRgn == 1 ) + else if( hRgn == (HRGN)1 ) { - if( wndPtr->hrgnUpdate > 1 ) + if( wndPtr->hrgnUpdate > (HRGN)1 ) DeleteObject( wndPtr->hrgnUpdate ); - wndPtr->hrgnUpdate = 1; + wndPtr->hrgnUpdate = (HRGN)1; } else hRgn = wndPtr->hrgnUpdate; /* this is a trick that depends on code in PAINT_RedrawWindow() */ @@ -477,9 +477,9 @@ { if( wndPtr->hrgnUpdate ) { - if( hRgn > 1 ) + if( hRgn > (HRGN)1 ) { - if( wndPtr->hrgnUpdate == 1 ) + if( wndPtr->hrgnUpdate == (HRGN)1 ) wndPtr->hrgnUpdate = CreateRectRgnIndirect( &r ); if( CombineRgn( wndPtr->hrgnUpdate, wndPtr->hrgnUpdate, hRgn, RGN_DIFF ) @@ -491,7 +491,7 @@ } else /* validate everything */ { - if( wndPtr->hrgnUpdate > 1 ) DeleteObject( wndPtr->hrgnUpdate ); + if( wndPtr->hrgnUpdate > (HRGN)1 ) DeleteObject( wndPtr->hrgnUpdate ); wndPtr->hrgnUpdate = 0; } @@ -517,7 +517,7 @@ if( flags & (RDW_INVALIDATE | RDW_VALIDATE) ) { HWND *list; - if( hRgn > 1 && bChildren && (list = WIN_ListChildren( wndPtr->hwndSelf ))) + if( hRgn > (HRGN)1 && bChildren && (list = WIN_ListChildren( wndPtr->hwndSelf ))) { POINT ptTotal, prevOrigin = {0,0}; POINT ptClient; @@ -656,7 +656,7 @@ if( hrgnRet ) { - if( hrgnRet > 1 ) hrgn = hrgnRet; else hrgnRet = 0; /* entire client */ + if( hrgnRet > (HRGN)1 ) hrgn = hrgnRet; else hrgnRet = 0; /* entire client */ if( wndPtr->flags & WIN_NEEDS_ERASEBKGND ) { if( bIcon ) dcx |= DCX_WINDOW; @@ -792,8 +792,8 @@ { if( flags & RDW_FRAME ) { - if (wndPtr->hrgnUpdate) hRgn = 1; - else wndPtr->hrgnUpdate = 1; + if (wndPtr->hrgnUpdate) hRgn = (HRGN)1; + else wndPtr->hrgnUpdate = (HRGN)1; } else { @@ -824,7 +824,7 @@ else /* entire window or client depending on RDW_NOFRAME */ { if( flags & RDW_NOFRAME ) - hRgn = 1; + hRgn = (HRGN)1; else { GETCLIENTRECTW( wndPtr, r2 ); @@ -839,10 +839,10 @@ /* Erase/update windows, from now on hRgn is a scratch region */ - hRgn = RDW_Paint( wndPtr, (hRgn == 1) ? 0 : hRgn, flags, 0 ); + hRgn = RDW_Paint( wndPtr, (hRgn == (HRGN)1) ? 0 : hRgn, flags, 0 ); END: - if( hRgn > 1 && (hRgn != hrgnUpdate) ) + if( hRgn > (HRGN)1 && (hRgn != hrgnUpdate) ) DeleteObject(hRgn ); WIN_ReleaseWndPtr(wndPtr); return TRUE; @@ -905,7 +905,7 @@ if (rect) { - if (wndPtr->hrgnUpdate > 1) + if (wndPtr->hrgnUpdate > (HRGN)1) { HRGN hrgn = CreateRectRgn( 0, 0, 0, 0 ); if (GetUpdateRgn( hwnd, hrgn, erase ) == ERROR) @@ -924,7 +924,7 @@ } } else - if( wndPtr->hrgnUpdate == 1 ) + if( wndPtr->hrgnUpdate == (HRGN)1 ) { GetClientRect( hwnd, rect ); if (erase) RedrawWindow( hwnd, NULL, 0, RDW_FRAME | RDW_ERASENOW | RDW_NOCHILDREN ); @@ -932,7 +932,7 @@ else SetRectEmpty( rect ); } - retvalue = (wndPtr->hrgnUpdate >= 1); + retvalue = (wndPtr->hrgnUpdate >= (HRGN)1); END: WIN_ReleaseWndPtr(wndPtr); return retvalue; @@ -955,7 +955,7 @@ goto END; } else - if (wndPtr->hrgnUpdate == 1) + if (wndPtr->hrgnUpdate == (HRGN)1) { SetRectRgn( hrgn, 0, 0, wndPtr->rectClient.right - wndPtr->rectClient.left, wndPtr->rectClient.bottom - wndPtr->rectClient.top ); @@ -991,7 +991,7 @@ wndPtr->rectWindow.top - wndPtr->rectClient.top, wndPtr->rectWindow.right - wndPtr->rectClient.left, wndPtr->rectWindow.bottom - wndPtr->rectClient.top); - if( wndPtr->hrgnUpdate > 1 ) + if( wndPtr->hrgnUpdate > (HRGN)1 ) { CombineRgn(hrgn, wndPtr->hrgnUpdate, 0, RGN_COPY); OffsetRgn(hrgn, wndPtr->rectWindow.left - wndPtr->rectClient.left, @@ -1026,10 +1026,10 @@ * it will be done later in the PatBlt(). */ - if (!(prevBrush = SelectObject( hdc, hbrush ))) return 0; - PatBlt( hdc, rect->left, rect->top, + if (!(prevBrush = SelectObject( HDC_32(hdc), HBRUSH_32(hbrush) ))) return 0; + PatBlt( HDC_32(hdc), rect->left, rect->top, rect->right - rect->left, rect->bottom - rect->top, PATCOPY ); - SelectObject( hdc, prevBrush ); + SelectObject( HDC_32(hdc), prevBrush ); return 1; } @@ -1058,7 +1058,7 @@ */ void WINAPI InvertRect16( HDC16 hdc, const RECT16 *rect ) { - PatBlt( hdc, rect->left, rect->top, + PatBlt( HDC_32(hdc), rect->left, rect->top, rect->right - rect->left, rect->bottom - rect->top, DSTINVERT ); } @@ -1106,7 +1106,7 @@ { RECT rect; CONV_RECT16TO32( rect16, &rect ); - return FrameRect( hdc, &rect, hbrush ); + return FrameRect( HDC_32(hdc), &rect, HBRUSH_32(hbrush) ); } @@ -1117,7 +1117,7 @@ { RECT rect32; CONV_RECT16TO32( rc, &rect32 ); - DrawFocusRect( hdc, &rect32 ); + DrawFocusRect( HDC_32(hdc), &rect32 ); } @@ -1425,14 +1425,15 @@ if (!cx || !cy) { SIZE s; - if (!GetTextExtentPoint32A( hdc, MapSL(ldata), wdata, &s )) return FALSE; + if (!GetTextExtentPoint32A( HDC_32(hdc), MapSL(ldata), wdata, &s )) return FALSE; if (!cx) cx = s.cx; if (!cy) cy = s.cy; } } info.proc = func; info.param = ldata; - return DrawStateA( hdc, hbr, draw_state_callback, (LPARAM)&info, wdata, x, y, cx, cy, flags ); + return DrawStateA( HDC_32(hdc), HBRUSH_32(hbr), draw_state_callback, + (LPARAM)&info, wdata, x, y, cx, cy, flags ); } Index: windows/scroll.c =================================================================== RCS file: /home/wine/wine/windows/scroll.c,v retrieving revision 1.38 diff -u -u -r1.38 scroll.c --- windows/scroll.c 17 Oct 2002 01:24:33 -0000 1.38 +++ windows/scroll.c 29 Oct 2002 22:53:58 -0000 @@ -27,6 +27,7 @@ #include "winuser.h" #include "user.h" #include "win.h" +#include "wownt32.h" #include "wine/debug.h" WINE_DEFAULT_DEBUG_CHANNEL(scroll); @@ -84,8 +85,9 @@ if (rect) CONV_RECT16TO32( rect, &rect32 ); if (cliprc) CONV_RECT16TO32( cliprc, &clipRect32 ); - ret = ScrollDC( hdc, dx, dy, rect ? &rect32 : NULL, - cliprc ? &clipRect32 : NULL, hrgnUpdate, &rcUpdate32 ); + ret = ScrollDC( HDC_32(hdc), dx, dy, rect ? &rect32 : NULL, + cliprc ? &clipRect32 : NULL, HRGN_32(hrgnUpdate), + &rcUpdate32 ); if (rcUpdate) CONV_RECT32TO16( &rcUpdate32, rcUpdate ); return ret; } Index: windows/sysparams.c =================================================================== RCS file: /home/wine/wine/windows/sysparams.c,v retrieving revision 1.41 diff -u -u -r1.41 sysparams.c --- windows/sysparams.c 28 Aug 2002 00:54:53 -0000 1.41 +++ windows/sysparams.c 29 Oct 2002 22:53:59 -0000 @@ -1585,7 +1585,7 @@ WINE_SPI_FIXME(SPI_SETICONS); /* 88 WINVER >= 0x400 */ case SPI_GETDEFAULTINPUTLANG: /* 89 WINVER >= 0x400 */ - ret = GetKeyboardLayout(0); + ret = GetKeyboardLayout(0) ? TRUE : FALSE; break; WINE_SPI_FIXME(SPI_SETDEFAULTINPUTLANG); /* 90 WINVER >= 0x400 */ Index: windows/win.c =================================================================== RCS file: /home/wine/wine/windows/win.c,v retrieving revision 1.203 diff -u -u -r1.203 win.c --- windows/win.c 29 Oct 2002 00:41:42 -0000 1.203 +++ windows/win.c 29 Oct 2002 22:54:00 -0000 @@ -691,7 +691,7 @@ } if (wndPtr->hSysMenu) { - DestroyMenu( wndPtr->hSysMenu ); + DestroyMenu( HMENU_32(wndPtr->hSysMenu) ); wndPtr->hSysMenu = 0; } USER_Driver.pDestroyWindow( hwnd ); @@ -1109,7 +1109,7 @@ wndPtr->pHScroll = NULL; wndPtr->userdata = 0; wndPtr->hSysMenu = (wndPtr->dwStyle & WS_SYSMENU) - ? MENU_GetSysMenu( hwnd, 0 ) : 0; + ? HMENU_16(MENU_GetSysMenu( hwnd, 0 )) : 0; wndPtr->cbWndExtra = wndExtra; if (wndExtra) memset( wndPtr->wExtra, 0, wndExtra); @@ -1252,7 +1252,7 @@ cs.lpCreateParams = data; cs.hInstance = (HINSTANCE)instance; - cs.hMenu = (HMENU)menu; + cs.hMenu = HMENU_32(menu); cs.hwndParent = WIN_Handle32( parent ); cs.style = style; cs.lpszName = windowName;
Attachment:
pgp00082.pgp
Description: PGP signature