Add needed casts for a "no warnings" compile of comctl32.

This commit is contained in:
Michael Stefaniuc 2002-10-23 20:19:22 +00:00 committed by Alexandre Julliard
parent fb1a572b64
commit f3d1893f80
14 changed files with 60 additions and 53 deletions

View File

@ -385,8 +385,8 @@ static DWORD CALLBACK ANIMATE_AnimationThread(LPVOID ptr_)
hDC = GetDC(infoPtr->hWnd); hDC = GetDC(infoPtr->hWnd);
/* sometimes the animation window will be destroyed in between /* sometimes the animation window will be destroyed in between
* by the main program, so a ReleaseDC() error msg is possible */ * by the main program, so a ReleaseDC() error msg is possible */
infoPtr->hbrushBG = SendMessageA(GetParent(infoPtr->hWnd), infoPtr->hbrushBG = (HBRUSH)SendMessageA(GetParent(infoPtr->hWnd),
WM_CTLCOLORSTATIC, hDC, WM_CTLCOLORSTATIC, (WPARAM)hDC,
(LPARAM)infoPtr->hWnd); (LPARAM)infoPtr->hWnd);
ReleaseDC(infoPtr->hWnd,hDC); ReleaseDC(infoPtr->hWnd,hDC);
} }
@ -690,7 +690,7 @@ static LRESULT ANIMATE_OpenA(HWND hWnd, WPARAM wParam, LPARAM lParam)
} }
if (!hInstance) if (!hInstance)
hInstance = GetWindowLongA(hWnd, GWL_HINSTANCE); hInstance = (HINSTANCE)GetWindowLongA(hWnd, GWL_HINSTANCE);
if (HIWORD(lParam)) { if (HIWORD(lParam)) {
TRACE("(\"%s\");\n", (LPSTR)lParam); TRACE("(\"%s\");\n", (LPSTR)lParam);
@ -816,8 +816,8 @@ static LRESULT ANIMATE_EraseBackground(HWND hWnd, WPARAM wParam, LPARAM lParam)
if(GetWindowLongA(hWnd, GWL_STYLE) & ACS_TRANSPARENT) if(GetWindowLongA(hWnd, GWL_STYLE) & ACS_TRANSPARENT)
{ {
hBrush = SendMessageA(GetParent(hWnd),WM_CTLCOLORSTATIC,(HDC)wParam, hBrush = (HBRUSH)SendMessageA(GetParent(hWnd),WM_CTLCOLORSTATIC,
(LPARAM)hWnd); wParam, (LPARAM)hWnd);
} }
GetClientRect(hWnd, &rect); GetClientRect(hWnd, &rect);
@ -874,8 +874,9 @@ static LRESULT WINAPI ANIMATE_WindowProc(HWND hWnd, UINT uMsg, WPARAM wParam, LP
if (GetWindowLongA(hWnd, GWL_STYLE) & ACS_TRANSPARENT) if (GetWindowLongA(hWnd, GWL_STYLE) & ACS_TRANSPARENT)
{ {
ANIMATE_INFO* infoPtr = ANIMATE_GetInfoPtr(hWnd); ANIMATE_INFO* infoPtr = ANIMATE_GetInfoPtr(hWnd);
infoPtr->hbrushBG = SendMessageA(GetParent(hWnd), WM_CTLCOLORSTATIC, infoPtr->hbrushBG = (HBRUSH)SendMessageA(GetParent(hWnd),
(HDC)wParam, (LPARAM)hWnd); WM_CTLCOLORSTATIC,
wParam, (LPARAM)hWnd);
} }
return ANIMATE_DrawFrame(ANIMATE_GetInfoPtr(hWnd)); return ANIMATE_DrawFrame(ANIMATE_GetInfoPtr(hWnd));
@ -893,8 +894,9 @@ static LRESULT WINAPI ANIMATE_WindowProc(HWND hWnd, UINT uMsg, WPARAM wParam, LP
return DefWindowProcA(hWnd, uMsg, wParam, lParam); return DefWindowProcA(hWnd, uMsg, wParam, lParam);
if (GetWindowLongA(hWnd, GWL_STYLE) & ACS_TRANSPARENT) if (GetWindowLongA(hWnd, GWL_STYLE) & ACS_TRANSPARENT)
infoPtr->hbrushBG = SendMessageA(GetParent(hWnd), WM_CTLCOLORSTATIC, infoPtr->hbrushBG = (HBRUSH)SendMessageA(GetParent(hWnd),
(HDC)wParam, (LPARAM)hWnd); WM_CTLCOLORSTATIC,
wParam, (LPARAM)hWnd);
if (wParam) if (wParam)
{ {

View File

@ -319,7 +319,7 @@ static void COMBOEX_GetComboFontSize (COMBOEX_INFO *infoPtr, SIZE *size)
HDC mydc; HDC mydc;
mydc = GetDC (0); /* why the entire screen???? */ mydc = GetDC (0); /* why the entire screen???? */
nfont = SendMessageW (infoPtr->hwndCombo, WM_GETFONT, 0, 0); nfont = (HFONT)SendMessageW (infoPtr->hwndCombo, WM_GETFONT, 0, 0);
ofont = (HFONT) SelectObject (mydc, nfont); ofont = (HFONT) SelectObject (mydc, nfont);
GetTextExtentPointA (mydc, "A", 1, size); GetTextExtentPointA (mydc, "A", 1, size);
SelectObject (mydc, ofont); SelectObject (mydc, ofont);
@ -962,7 +962,7 @@ static LRESULT COMBOEX_Create (HWND hwnd, LPCREATESTRUCTA cs)
GetWindowLongW (hwnd, GWL_STYLE), GetWindowLongW (hwnd, GWL_STYLE),
cs->y, cs->x, cs->cx, cs->cy, hwnd, cs->y, cs->x, cs->cx, cs->cy, hwnd,
(HMENU) GetWindowLongW (hwnd, GWL_ID), (HMENU) GetWindowLongW (hwnd, GWL_ID),
GetWindowLongW (hwnd, GWL_HINSTANCE), NULL); (HINSTANCE)GetWindowLongW (hwnd, GWL_HINSTANCE), NULL);
/* /*
* native does the following at this point according to trace: * native does the following at this point according to trace:
@ -979,7 +979,7 @@ static LRESULT COMBOEX_Create (HWND hwnd, LPCREATESTRUCTA cs)
SetPropA(infoPtr->hwndCombo, COMBOEX_SUBCLASS_PROP, hwnd); SetPropA(infoPtr->hwndCombo, COMBOEX_SUBCLASS_PROP, hwnd);
infoPtr->prevComboWndProc = (WNDPROC)SetWindowLongW(infoPtr->hwndCombo, infoPtr->prevComboWndProc = (WNDPROC)SetWindowLongW(infoPtr->hwndCombo,
GWL_WNDPROC, (LONG)COMBOEX_ComboWndProc); GWL_WNDPROC, (LONG)COMBOEX_ComboWndProc);
infoPtr->font = SendMessageW (infoPtr->hwndCombo, WM_GETFONT, 0, 0); infoPtr->font = (HFONT)SendMessageW (infoPtr->hwndCombo, WM_GETFONT, 0, 0);
/* /*
@ -992,8 +992,7 @@ static LRESULT COMBOEX_Create (HWND hwnd, LPCREATESTRUCTA cs)
0, 0, 0, 0, /* will set later */ 0, 0, 0, 0, /* will set later */
infoPtr->hwndCombo, infoPtr->hwndCombo,
(HMENU) GetWindowLongW (hwnd, GWL_ID), (HMENU) GetWindowLongW (hwnd, GWL_ID),
GetWindowLongW (hwnd, GWL_HINSTANCE), (HINSTANCE)GetWindowLongW (hwnd, GWL_HINSTANCE), NULL);
NULL);
/* native does the following at this point according to trace: /* native does the following at this point according to trace:
* GetWindowThreadProcessId(hwndEdit,0) * GetWindowThreadProcessId(hwndEdit,0)
@ -1009,7 +1008,7 @@ static LRESULT COMBOEX_Create (HWND hwnd, LPCREATESTRUCTA cs)
SetPropA(infoPtr->hwndEdit, COMBOEX_SUBCLASS_PROP, hwnd); SetPropA(infoPtr->hwndEdit, COMBOEX_SUBCLASS_PROP, hwnd);
infoPtr->prevEditWndProc = (WNDPROC)SetWindowLongW(infoPtr->hwndEdit, infoPtr->prevEditWndProc = (WNDPROC)SetWindowLongW(infoPtr->hwndEdit,
GWL_WNDPROC, (LONG)COMBOEX_EditWndProc); GWL_WNDPROC, (LONG)COMBOEX_EditWndProc);
infoPtr->font = SendMessageW (infoPtr->hwndCombo, WM_GETFONT, 0, 0); infoPtr->font = (HFONT)SendMessageW(infoPtr->hwndCombo, WM_GETFONT, 0, 0);
} }
/* /*

View File

@ -356,9 +356,9 @@ ShowHideMenuCtl (HWND hwnd, UINT uFlags, LPINT lpInfo)
while (*lpMenuId != uFlags) while (*lpMenuId != uFlags)
lpMenuId += 2; lpMenuId += 2;
if (GetMenuState (lpInfo[1], uFlags, MF_BYCOMMAND) & MFS_CHECKED) { if (GetMenuState ((HMENU)lpInfo[1], uFlags, MF_BYCOMMAND) & MFS_CHECKED) {
/* uncheck menu item */ /* uncheck menu item */
CheckMenuItem (lpInfo[0], *lpMenuId, MF_BYCOMMAND | MF_UNCHECKED); CheckMenuItem ((HMENU)lpInfo[0], *lpMenuId, MF_BYCOMMAND | MF_UNCHECKED);
/* hide control */ /* hide control */
lpMenuId++; lpMenuId++;
@ -367,7 +367,7 @@ ShowHideMenuCtl (HWND hwnd, UINT uFlags, LPINT lpInfo)
} }
else { else {
/* check menu item */ /* check menu item */
CheckMenuItem (lpInfo[0], *lpMenuId, MF_BYCOMMAND | MF_CHECKED); CheckMenuItem ((HMENU)lpInfo[0], *lpMenuId, MF_BYCOMMAND | MF_CHECKED);
/* show control */ /* show control */
lpMenuId++; lpMenuId++;
@ -535,7 +535,7 @@ CreateStatusWindowA (INT style, LPCSTR text, HWND parent, UINT wid)
return CreateWindowA(STATUSCLASSNAMEA, text, style, return CreateWindowA(STATUSCLASSNAMEA, text, style,
CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT,
CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT,
parent, wid, 0, 0); parent, (HMENU)wid, 0, 0);
} }
@ -559,7 +559,7 @@ CreateStatusWindowW (INT style, LPCWSTR text, HWND parent, UINT wid)
return CreateWindowW(STATUSCLASSNAMEW, text, style, return CreateWindowW(STATUSCLASSNAMEW, text, style,
CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT,
CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT,
parent, wid, 0, 0); parent, (HMENU)wid, 0, 0);
} }
@ -592,7 +592,7 @@ CreateUpDownControl (DWORD style, INT x, INT y, INT cx, INT cy,
{ {
HWND hUD = HWND hUD =
CreateWindowA (UPDOWN_CLASSA, 0, style, x, y, cx, cy, CreateWindowA (UPDOWN_CLASSA, 0, style, x, y, cx, cy,
parent, id, inst, 0); parent, (HMENU)id, inst, 0);
if (hUD) { if (hUD) {
SendMessageA (hUD, UDM_SETBUDDY, (WPARAM)buddy, 0); SendMessageA (hUD, UDM_SETBUDDY, (WPARAM)buddy, 0);
SendMessageA (hUD, UDM_SETRANGE, 0, MAKELONG(maxVal, minVal)); SendMessageA (hUD, UDM_SETRANGE, 0, MAKELONG(maxVal, minVal));

View File

@ -1159,7 +1159,7 @@ DATETIME_Create (HWND hwnd, WPARAM wParam, LPARAM lParam)
WS_CHILD | WS_VISIBLE | BS_AUTOCHECKBOX, WS_CHILD | WS_VISIBLE | BS_AUTOCHECKBOX,
2,2,13,13, 2,2,13,13,
hwnd, hwnd,
0, GetWindowLongA (hwnd, GWL_HINSTANCE), 0); 0, (HINSTANCE)GetWindowLongA (hwnd, GWL_HINSTANCE), 0);
SendMessageA (infoPtr->hwndCheckbut, BM_SETCHECK, 1, 0); SendMessageA (infoPtr->hwndCheckbut, BM_SETCHECK, 1, 0);
} }

View File

@ -262,7 +262,7 @@ HOTKEY_EraseBackground (HOTKEY_INFO *infoPtr, WPARAM wParam, LPARAM lParam)
inline static LRESULT inline static LRESULT
HOTKEY_GetFont (HOTKEY_INFO *infoPtr, WPARAM wParam, LPARAM lParam) HOTKEY_GetFont (HOTKEY_INFO *infoPtr, WPARAM wParam, LPARAM lParam)
{ {
return infoPtr->hFont; return (LRESULT)infoPtr->hFont;
} }
static LRESULT static LRESULT

View File

@ -195,12 +195,13 @@ ImageList_Add (HIMAGELIST himl, HBITMAP hbmImage, HBITMAP hbmMask)
if(himl->hbmMask) if(himl->hbmMask)
{ {
HDC hdcMask, hdcTemp, hOldBitmapMask, hOldBitmapTemp; HDC hdcMask, hdcTemp;
HBITMAP hOldBitmapMask, hOldBitmapTemp;
hdcMask = CreateCompatibleDC (0); hdcMask = CreateCompatibleDC (0);
hdcTemp = CreateCompatibleDC(0); hdcTemp = CreateCompatibleDC(0);
hOldBitmapMask = (HBITMAP) SelectObject(hdcMask, himl->hbmMask); hOldBitmapMask = SelectObject(hdcMask, himl->hbmMask);
hOldBitmapTemp = (HBITMAP) SelectObject(hdcTemp, hbmMask); hOldBitmapTemp = SelectObject(hdcTemp, hbmMask);
BitBlt (hdcMask, BitBlt (hdcMask,
nStartX, 0, bmp.bmWidth, bmp.bmHeight, nStartX, 0, bmp.bmWidth, bmp.bmHeight,

View File

@ -179,7 +179,7 @@ static LRESULT IPADDRESS_Create (HWND hwnd)
CreateWindowW (EDIT, NULL, WS_CHILD | WS_VISIBLE | ES_CENTER, CreateWindowW (EDIT, NULL, WS_CHILD | WS_VISIBLE | ES_CENTER,
edit.left, edit.top, edit.right - edit.left, edit.left, edit.top, edit.right - edit.left,
edit.bottom - edit.top, hwnd, (HMENU) 1, edit.bottom - edit.top, hwnd, (HMENU) 1,
GetWindowLongW (hwnd, GWL_HINSTANCE), NULL); (HINSTANCE)GetWindowLongW(hwnd, GWL_HINSTANCE), NULL);
SetPropA(part->EditHwnd, IP_SUBCLASS_PROP, hwnd); SetPropA(part->EditHwnd, IP_SUBCLASS_PROP, hwnd);
part->OrigProc = (WNDPROC) part->OrigProc = (WNDPROC)
SetWindowLongW (part->EditHwnd, GWL_WNDPROC, SetWindowLongW (part->EditHwnd, GWL_WNDPROC,

View File

@ -314,7 +314,7 @@ static LRESULT WINAPI ProgressWindowProc(HWND hwnd, UINT message,
return (LRESULT)infoPtr->Font; return (LRESULT)infoPtr->Font;
case WM_SETFONT: case WM_SETFONT:
return PROGRESS_SetFont (infoPtr, (HFONT)wParam, (BOOL)lParam); return (LRESULT)PROGRESS_SetFont(infoPtr, (HFONT)wParam, (BOOL)lParam);
case WM_PAINT: case WM_PAINT:
return PROGRESS_Paint (infoPtr, (HDC)wParam); return PROGRESS_Paint (infoPtr, (HDC)wParam);

View File

@ -24,14 +24,16 @@
*/ */
#include <string.h> #include <string.h>
#include "winbase.h" #include "winbase.h"
#include "commctrl.h" #include "commctrl.h"
#include "prsht.h" #include "prsht.h"
#include "winnls.h" #include "winnls.h"
#include "comctl32.h" #include "comctl32.h"
#include "wine/debug.h"
#include "heap.h" #include "heap.h"
#include "wine/debug.h"
#include "wine/unicode.h"
/****************************************************************************** /******************************************************************************
* Data structures * Data structures

View File

@ -899,10 +899,9 @@ STATUSBAR_WMCreate (HWND hwnd, LPCREATESTRUCTA lpCreate)
if (dwStyle & SBT_TOOLTIPS) { if (dwStyle & SBT_TOOLTIPS) {
infoPtr->hwndToolTip = infoPtr->hwndToolTip =
CreateWindowExW (0, TOOLTIPS_CLASSW, NULL, 0, CreateWindowExW (0, TOOLTIPS_CLASSW, NULL, 0,
CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT,
CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, hwnd, 0,
hwnd, 0, (HINSTANCE)GetWindowLongW(hwnd, GWL_HINSTANCE), NULL);
GetWindowLongW (hwnd, GWL_HINSTANCE), NULL);
if (infoPtr->hwndToolTip) { if (infoPtr->hwndToolTip) {
NMTOOLTIPSCREATED nmttc; NMTOOLTIPSCREATED nmttc;
@ -1188,7 +1187,7 @@ StatusWindowProc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
return STATUSBAR_WMDestroy (infoPtr); return STATUSBAR_WMDestroy (infoPtr);
case WM_GETFONT: case WM_GETFONT:
return infoPtr->hFont? infoPtr->hFont : infoPtr->hDefaultFont; return (LRESULT)(infoPtr->hFont? infoPtr->hFont : infoPtr->hDefaultFont);
case WM_GETTEXT: case WM_GETTEXT:
return STATUSBAR_WMGetText (infoPtr, (INT)wParam, (LPWSTR)lParam); return STATUSBAR_WMGetText (infoPtr, (INT)wParam, (LPWSTR)lParam);

View File

@ -2765,7 +2765,7 @@ TOOLBAR_Customize (HWND hwnd)
if(!(template = (LPVOID)LoadResource (COMCTL32_hModule, hRes))) if(!(template = (LPVOID)LoadResource (COMCTL32_hModule, hRes)))
return FALSE; return FALSE;
ret = DialogBoxIndirectParamA (GetWindowLongA (hwnd, GWL_HINSTANCE), ret = DialogBoxIndirectParamA ((HINSTANCE)GetWindowLongA(hwnd, GWL_HINSTANCE),
(LPDLGTEMPLATEA)template, (LPDLGTEMPLATEA)template,
hwnd, hwnd,
(DLGPROC)TOOLBAR_CustomizeDialogProc, (DLGPROC)TOOLBAR_CustomizeDialogProc,
@ -3683,7 +3683,7 @@ TOOLBAR_ReplaceBitmap (HWND hwnd, WPARAM wParam, LPARAM lParam)
lpReplace->hInstOld, lpReplace->nIDOld, lpReplace->hInstNew, lpReplace->nIDNew, lpReplace->hInstOld, lpReplace->nIDOld, lpReplace->hInstNew, lpReplace->nIDNew,
lpReplace->nButtons); lpReplace->nButtons);
if (lpReplace->hInstOld == -1) if (lpReplace->hInstOld == HINST_COMMCTRL)
{ {
FIXME("changing standard bitmaps not implemented\n"); FIXME("changing standard bitmaps not implemented\n");
return FALSE; return FALSE;
@ -4703,7 +4703,7 @@ TOOLBAR_GetFont (HWND hwnd, WPARAM wParam, LPARAM lParam)
{ {
TOOLBAR_INFO *infoPtr = TOOLBAR_GetInfoPtr (hwnd); TOOLBAR_INFO *infoPtr = TOOLBAR_GetInfoPtr (hwnd);
return infoPtr->hFont; return (LRESULT)infoPtr->hFont;
} }

View File

@ -720,10 +720,12 @@ TOOLTIPS_AddToolA (HWND hwnd, WPARAM wParam, LPARAM lParam)
/* install subclassing hook */ /* install subclassing hook */
if (toolPtr->uFlags & TTF_SUBCLASS) { if (toolPtr->uFlags & TTF_SUBCLASS) {
if (toolPtr->uFlags & TTF_IDISHWND) { if (toolPtr->uFlags & TTF_IDISHWND) {
SetWindowSubclass(toolPtr->uId, TOOLTIPS_SubclassProc, 1, hwnd); SetWindowSubclass((HWND)toolPtr->uId, TOOLTIPS_SubclassProc, 1,
(DWORD_PTR)hwnd);
} }
else { else {
SetWindowSubclass(toolPtr->hwnd, TOOLTIPS_SubclassProc, 1, hwnd); SetWindowSubclass(toolPtr->hwnd, TOOLTIPS_SubclassProc, 1,
(DWORD_PTR)hwnd);
} }
TRACE("subclassing installed!\n"); TRACE("subclassing installed!\n");
} }
@ -795,10 +797,12 @@ TOOLTIPS_AddToolW (HWND hwnd, WPARAM wParam, LPARAM lParam)
/* install subclassing hook */ /* install subclassing hook */
if (toolPtr->uFlags & TTF_SUBCLASS) { if (toolPtr->uFlags & TTF_SUBCLASS) {
if (toolPtr->uFlags & TTF_IDISHWND) { if (toolPtr->uFlags & TTF_IDISHWND) {
SetWindowSubclass(toolPtr->uId, TOOLTIPS_SubclassProc, 1, hwnd); SetWindowSubclass((HWND)toolPtr->uId, TOOLTIPS_SubclassProc, 1,
(DWORD_PTR)hwnd);
} }
else { else {
SetWindowSubclass(toolPtr->hwnd, TOOLTIPS_SubclassProc, 1, hwnd); SetWindowSubclass(toolPtr->hwnd, TOOLTIPS_SubclassProc, 1,
(DWORD_PTR)hwnd);
} }
TRACE("subclassing installed!\n"); TRACE("subclassing installed!\n");
} }
@ -841,7 +845,7 @@ TOOLTIPS_DelToolA (HWND hwnd, WPARAM wParam, LPARAM lParam)
/* remove subclassing */ /* remove subclassing */
if (toolPtr->uFlags & TTF_SUBCLASS) { if (toolPtr->uFlags & TTF_SUBCLASS) {
if (toolPtr->uFlags & TTF_IDISHWND) { if (toolPtr->uFlags & TTF_IDISHWND) {
RemoveWindowSubclass(toolPtr->uId, TOOLTIPS_SubclassProc, 1); RemoveWindowSubclass((HWND)toolPtr->uId, TOOLTIPS_SubclassProc, 1);
} }
else { else {
RemoveWindowSubclass(toolPtr->hwnd, TOOLTIPS_SubclassProc, 1); RemoveWindowSubclass(toolPtr->hwnd, TOOLTIPS_SubclassProc, 1);
@ -916,7 +920,7 @@ TOOLTIPS_DelToolW (HWND hwnd, WPARAM wParam, LPARAM lParam)
/* remove subclassing */ /* remove subclassing */
if (toolPtr->uFlags & TTF_SUBCLASS) { if (toolPtr->uFlags & TTF_SUBCLASS) {
if (toolPtr->uFlags & TTF_IDISHWND) { if (toolPtr->uFlags & TTF_IDISHWND) {
RemoveWindowSubclass(toolPtr->uId, TOOLTIPS_SubclassProc, 1); RemoveWindowSubclass((HWND)toolPtr->uId, TOOLTIPS_SubclassProc, 1);
} }
else { else {
RemoveWindowSubclass(toolPtr->hwnd, TOOLTIPS_SubclassProc, 1); RemoveWindowSubclass(toolPtr->hwnd, TOOLTIPS_SubclassProc, 1);
@ -1966,7 +1970,7 @@ TOOLTIPS_Destroy (HWND hwnd, WPARAM wParam, LPARAM lParam)
/* remove subclassing */ /* remove subclassing */
if (toolPtr->uFlags & TTF_SUBCLASS) { if (toolPtr->uFlags & TTF_SUBCLASS) {
if (toolPtr->uFlags & TTF_IDISHWND) { if (toolPtr->uFlags & TTF_IDISHWND) {
RemoveWindowSubclass(toolPtr->uId, TOOLTIPS_SubclassProc, 1); RemoveWindowSubclass((HWND)toolPtr->uId, TOOLTIPS_SubclassProc, 1);
} }
else { else {
RemoveWindowSubclass(toolPtr->hwnd, TOOLTIPS_SubclassProc, 1); RemoveWindowSubclass(toolPtr->hwnd, TOOLTIPS_SubclassProc, 1);
@ -2007,7 +2011,7 @@ TOOLTIPS_GetFont (HWND hwnd, WPARAM wParam, LPARAM lParam)
{ {
TOOLTIPS_INFO *infoPtr = TOOLTIPS_GetInfoPtr (hwnd); TOOLTIPS_INFO *infoPtr = TOOLTIPS_GetInfoPtr (hwnd);
return infoPtr->hFont; return (LRESULT)infoPtr->hFont;
} }
@ -2222,7 +2226,7 @@ TOOLTIPS_SubclassProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam, UINT_
msg.message = uMsg; msg.message = uMsg;
msg.wParam = wParam; msg.wParam = wParam;
msg.lParam = lParam; msg.lParam = lParam;
TOOLTIPS_RelayEvent(dwRef, 0, (LPARAM)&msg); TOOLTIPS_RelayEvent((HWND)dwRef, 0, (LPARAM)&msg);
break; break;
default: default:

View File

@ -1560,7 +1560,7 @@ TRACKBAR_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
return TRACKBAR_ClearTics (infoPtr, (BOOL)wParam); return TRACKBAR_ClearTics (infoPtr, (BOOL)wParam);
case TBM_GETBUDDY: case TBM_GETBUDDY:
return wParam ? infoPtr->hwndBuddyLA : infoPtr->hwndBuddyRB; return (LRESULT)(wParam ? infoPtr->hwndBuddyLA : infoPtr->hwndBuddyRB);
case TBM_GETCHANNELRECT: case TBM_GETCHANNELRECT:
return TRACKBAR_GetChannelRect (infoPtr, (LPRECT)lParam); return TRACKBAR_GetChannelRect (infoPtr, (LPRECT)lParam);

View File

@ -1770,7 +1770,7 @@ static LRESULT
TREEVIEW_GetFont(TREEVIEW_INFO *infoPtr) TREEVIEW_GetFont(TREEVIEW_INFO *infoPtr)
{ {
TRACE("%x\n", infoPtr->hFont); TRACE("%x\n", infoPtr->hFont);
return infoPtr->hFont; return (LRESULT)infoPtr->hFont;
} }
@ -2814,7 +2814,7 @@ TREEVIEW_Paint(TREEVIEW_INFO *infoPtr, WPARAM wParam)
rc.left = 0; rc.top = 0; rc.left = 0; rc.top = 0;
rc.right = bitmap.bmWidth; rc.right = bitmap.bmWidth;
rc.bottom = bitmap.bmHeight; rc.bottom = bitmap.bmHeight;
TREEVIEW_EraseBackground(infoPtr, wParam); TREEVIEW_EraseBackground(infoPtr, (HDC)wParam);
} }
} }
else else
@ -3476,7 +3476,7 @@ TREEVIEW_Command(TREEVIEW_INFO *infoPtr, WPARAM wParam, LPARAM lParam)
len = GetWindowTextA(infoPtr->hwndEdit, buffer, sizeof(buffer)); len = GetWindowTextA(infoPtr->hwndEdit, buffer, sizeof(buffer));
/* Select font to get the right dimension of the string */ /* Select font to get the right dimension of the string */
hFont = SendMessageA(infoPtr->hwndEdit, WM_GETFONT, 0, 0); hFont = (HFONT)SendMessageA(infoPtr->hwndEdit, WM_GETFONT, 0, 0);
if (hFont != 0) if (hFont != 0)
{ {
hOldFont = SelectObject(hdc, hFont); hOldFont = SelectObject(hdc, hFont);
@ -3526,7 +3526,7 @@ TREEVIEW_EditLabelA(TREEVIEW_INFO *infoPtr, HTREEITEM hItem)
HWND hwndEdit; HWND hwndEdit;
SIZE sz; SIZE sz;
TREEVIEW_ITEM *editItem = hItem; TREEVIEW_ITEM *editItem = hItem;
HINSTANCE hinst = GetWindowLongA(hwnd, GWL_HINSTANCE); HINSTANCE hinst = (HINSTANCE)GetWindowLongA(hwnd, GWL_HINSTANCE);
HDC hdc; HDC hdc;
HFONT hOldFont=0; HFONT hOldFont=0;
TEXTMETRICA textMetric; TEXTMETRICA textMetric;
@ -3589,8 +3589,8 @@ TREEVIEW_EditLabelA(TREEVIEW_INFO *infoPtr, HTREEITEM hItem)
SetWindowLongA(hwndEdit, GWL_STYLE, SetWindowLongA(hwndEdit, GWL_STYLE,
GetWindowLongA(hwndEdit, GWL_STYLE) | WS_BORDER); GetWindowLongA(hwndEdit, GWL_STYLE) | WS_BORDER);
SendMessageA(hwndEdit, WM_SETFONT, TREEVIEW_FontForItem(infoPtr, editItem), SendMessageA(hwndEdit, WM_SETFONT,
FALSE); (WPARAM)TREEVIEW_FontForItem(infoPtr, editItem), FALSE);
infoPtr->wpEditOrig = (WNDPROC)SetWindowLongA(hwndEdit, GWL_WNDPROC, infoPtr->wpEditOrig = (WNDPROC)SetWindowLongA(hwndEdit, GWL_WNDPROC,
(DWORD) (DWORD)