Fix warnings in 64bit.
diff --git a/dlls/comctl32/animate.c b/dlls/comctl32/animate.c
index 1a15609..e02c2b4 100644
--- a/dlls/comctl32/animate.c
+++ b/dlls/comctl32/animate.c
@@ -53,7 +53,7 @@
HMODULE hModule;
HIC (WINAPI *fnICOpen)(DWORD, DWORD, UINT);
LRESULT (WINAPI *fnICClose)(HIC);
- LRESULT (WINAPI *fnICSendMessage)(HIC, UINT, DWORD, DWORD);
+ LRESULT (WINAPI *fnICSendMessage)(HIC, UINT, DWORD_PTR, DWORD_PTR);
DWORD (WINAPIV *fnICDecompress)(HIC,DWORD,LPBITMAPINFOHEADER,LPVOID,LPBITMAPINFOHEADER,LPVOID);
} fnIC;
@@ -139,7 +139,8 @@
{
infoPtr->hMMio = mmioOpenW(lpName, 0, MMIO_ALLOCBUF | MMIO_READ | MMIO_DENYWRITE);
- return (BOOL)infoPtr->hMMio;
+ if(!infoPtr->hMMio) return FALSE;
+ return TRUE;
}
@@ -655,14 +656,14 @@
}
outSize = fnIC.fnICSendMessage(infoPtr->hic, ICM_DECOMPRESS_GET_FORMAT,
- (DWORD)infoPtr->inbih, 0L);
+ (DWORD_PTR)infoPtr->inbih, 0L);
infoPtr->outbih = Alloc(outSize);
if (!infoPtr->outbih)
return FALSE;
if (fnIC.fnICSendMessage(infoPtr->hic, ICM_DECOMPRESS_GET_FORMAT,
- (DWORD)infoPtr->inbih, (DWORD)infoPtr->outbih) != outSize)
+ (DWORD_PTR)infoPtr->inbih, (DWORD_PTR)infoPtr->outbih) != outSize)
{
WARN("Can't get output BIH\n");
return FALSE;
@@ -673,7 +674,7 @@
return FALSE;
if (fnIC.fnICSendMessage(infoPtr->hic, ICM_DECOMPRESS_BEGIN,
- (DWORD)infoPtr->inbih, (DWORD)infoPtr->outbih) != ICERR_OK) {
+ (DWORD_PTR)infoPtr->inbih, (DWORD_PTR)infoPtr->outbih) != ICERR_OK) {
WARN("Can't begin decompression\n");
return FALSE;
}
@@ -696,10 +697,10 @@
if (!hInstance)
hInstance = (HINSTANCE)GetWindowLongPtrW(infoPtr->hwndSelf, GWLP_HINSTANCE);
- if (HIWORD(lpszName))
- {
- TRACE("(\"%s\");\n", debugstr_w(lpszName));
+ TRACE("(%s)\n", debugstr_w(lpszName));
+ if (HIWORD(lpszName))
+ {
if (!ANIMATE_LoadResW(infoPtr, hInstance, lpszName))
{
TRACE("No AVI resource found!\n");
@@ -712,9 +713,7 @@
}
else
{
- TRACE("(%u);\n", (WORD)(DWORD)lpszName);
-
- if (!ANIMATE_LoadResW(infoPtr, hInstance, MAKEINTRESOURCEW((INT)lpszName)))
+ if (!ANIMATE_LoadResW(infoPtr, hInstance, lpszName))
{
WARN("No AVI resource found!\n");
return FALSE;
diff --git a/dlls/comctl32/comboex.c b/dlls/comctl32/comboex.c
index 3fcbbea..4720ea5 100644
--- a/dlls/comctl32/comboex.c
+++ b/dlls/comctl32/comboex.c
@@ -839,10 +839,10 @@
}
-static DWORD COMBOEX_GetItemData (COMBOEX_INFO *infoPtr, INT index)
+static DWORD_PTR COMBOEX_GetItemData (COMBOEX_INFO *infoPtr, INT index)
{
CBE_ITEMDATA *item1, *item2;
- DWORD ret = 0;
+ DWORD_PTR ret = 0;
item1 = get_item_data(infoPtr, index);
if ((item1 != NULL) && ((LRESULT)item1 != CB_ERR)) {
@@ -854,7 +854,7 @@
if (item1->mask & CBEIF_LPARAM) ret = item1->lParam;
TRACE("returning 0x%08lx\n", ret);
} else {
- ret = (DWORD)item1;
+ ret = (DWORD_PTR)item1;
TRACE("non-valid result from combo, returning 0x%08lx\n", ret);
}
return ret;
@@ -878,7 +878,7 @@
}
-static DWORD COMBOEX_SetItemData (COMBOEX_INFO *infoPtr, INT index, DWORD data)
+static DWORD_PTR COMBOEX_SetItemData (COMBOEX_INFO *infoPtr, INT index, DWORD_PTR data)
{
CBE_ITEMDATA *item1, *item2;
@@ -894,8 +894,8 @@
TRACE("setting lparam to 0x%08lx\n", data);
return 0;
}
- TRACE("non-valid result from combo 0x%08lx\n", (DWORD)item1);
- return (LRESULT)item1;
+ TRACE("non-valid result from combo %p\n", item1);
+ return (DWORD_PTR)item1;
}
@@ -1136,10 +1136,10 @@
n = SendMessageW (infoPtr->hwndCombo, CB_GETCOUNT, 0, 0);
for (cursel = 0; cursel < n; cursel++){
item = get_item_data(infoPtr, cursel);
- if ((INT)item == CB_ERR) break;
+ if ((INT_PTR)item == CB_ERR) break;
if (!cmptext(COMBOEX_GetText(infoPtr, item), wintext)) break;
}
- if ((cursel == n) || ((INT)item == CB_ERR)) {
+ if ((cursel == n) || ((INT_PTR)item == CB_ERR)) {
TRACE("failed to find match??? item=%p cursel=%d\n",
item, cursel);
if (infoPtr->hwndEdit)
@@ -1149,7 +1149,7 @@
}
else {
item = get_item_data(infoPtr, cursel);
- if ((INT)item == CB_ERR) {
+ if ((INT_PTR)item == CB_ERR) {
TRACE("failed to find match??? item=%p cursel=%d\n",
item, cursel);
if (infoPtr->hwndEdit)
@@ -2223,7 +2223,7 @@
return COMBOEX_SetCursel (infoPtr, (INT)wParam);
case CB_SETITEMDATA:
- return COMBOEX_SetItemData (infoPtr, (INT)wParam, (DWORD)lParam);
+ return COMBOEX_SetItemData (infoPtr, (INT)wParam, (DWORD_PTR)lParam);
case CB_SETITEMHEIGHT:
return COMBOEX_SetItemHeight (infoPtr, (INT)wParam, (UINT)lParam);
diff --git a/dlls/comctl32/comctl32undoc.c b/dlls/comctl32/comctl32undoc.c
index bf19c53..8e89a62 100644
--- a/dlls/comctl32/comctl32undoc.c
+++ b/dlls/comctl32/comctl32undoc.c
@@ -673,9 +673,9 @@
&newkey,
&dwdisp))) {
/* error - what to do ??? */
- ERR("(%lu %lu %lx %lx \"%s\" %p): Could not open key, error=%d\n",
+ ERR("(%lu %lu %lx %p %s %p): Could not open key, error=%d\n",
mp->extview.cbSize, mp->extview.nMaxItems, mp->extview.dwFlags,
- (DWORD)mp->extview.hKey, debugstr_w(mp->extview.lpszSubKey),
+ mp->extview.hKey, debugstr_w(mp->extview.lpszSubKey),
mp->extview.lpfnCompare, err);
return 0;
}
@@ -716,9 +716,9 @@
else
mp->cursize = 0;
- TRACE("(%lu %lu %lx %lx \"%s\" %p): Current Size = %ld\n",
+ TRACE("(%lu %lu %lx %p %s %p): Current Size = %ld\n",
mp->extview.cbSize, mp->extview.nMaxItems, mp->extview.dwFlags,
- (DWORD)mp->extview.hKey, debugstr_w(mp->extview.lpszSubKey),
+ mp->extview.hKey, debugstr_w(mp->extview.lpszSubKey),
mp->extview.lpfnCompare, mp->cursize);
return (HANDLE)mp;
}
diff --git a/dlls/comctl32/commctrl.c b/dlls/comctl32/commctrl.c
index 20af987..13e483d 100644
--- a/dlls/comctl32/commctrl.c
+++ b/dlls/comctl32/commctrl.c
@@ -119,7 +119,7 @@
COMCTL32_hModule = (HMODULE)hinstDLL;
/* add global subclassing atom (used by 'tooltip' and 'updown') */
- COMCTL32_wSubclass = (LPWSTR)(DWORD)GlobalAddAtomW (strCC32SubclassInfo);
+ COMCTL32_wSubclass = (LPWSTR)(DWORD_PTR)GlobalAddAtomW (strCC32SubclassInfo);
TRACE("Subclassing atom added: %p\n", COMCTL32_wSubclass);
/* create local pattern brush */
@@ -308,7 +308,7 @@
*/
BOOL WINAPI
-ShowHideMenuCtl (HWND hwnd, UINT uFlags, LPINT lpInfo)
+ShowHideMenuCtl (HWND hwnd, UINT_PTR uFlags, LPINT lpInfo)
{
LPINT lpMenuId;
@@ -325,9 +325,9 @@
while (*lpMenuId != uFlags)
lpMenuId += 2;
- if (GetMenuState ((HMENU)lpInfo[1], uFlags, MF_BYCOMMAND) & MFS_CHECKED) {
+ if (GetMenuState ((HMENU)(DWORD_PTR)lpInfo[1], uFlags, MF_BYCOMMAND) & MFS_CHECKED) {
/* uncheck menu item */
- CheckMenuItem ((HMENU)lpInfo[0], *lpMenuId, MF_BYCOMMAND | MF_UNCHECKED);
+ CheckMenuItem ((HMENU)(DWORD_PTR)lpInfo[0], *lpMenuId, MF_BYCOMMAND | MF_UNCHECKED);
/* hide control */
lpMenuId++;
@@ -336,7 +336,7 @@
}
else {
/* check menu item */
- CheckMenuItem ((HMENU)lpInfo[0], *lpMenuId, MF_BYCOMMAND | MF_CHECKED);
+ CheckMenuItem ((HMENU)(DWORD_PTR)lpInfo[0], *lpMenuId, MF_BYCOMMAND | MF_CHECKED);
/* show control */
lpMenuId++;
@@ -376,8 +376,8 @@
INT *lpRun;
HWND hwndCtrl;
- TRACE("(0x%08lx 0x%08lx 0x%08lx)\n",
- (DWORD)hwnd, (DWORD)lpRect, (DWORD)lpInfo);
+ TRACE("(%p %p %p)\n",
+ hwnd, lpRect, lpInfo);
GetClientRect (hwnd, lpRect);
lpRun = lpInfo;
@@ -506,7 +506,7 @@
return CreateWindowA(STATUSCLASSNAMEA, text, style,
CW_USEDEFAULT, CW_USEDEFAULT,
CW_USEDEFAULT, CW_USEDEFAULT,
- parent, (HMENU)wid, 0, 0);
+ parent, (HMENU)(DWORD_PTR)wid, 0, 0);
}
@@ -532,7 +532,7 @@
return CreateWindowW(STATUSCLASSNAMEW, text, style,
CW_USEDEFAULT, CW_USEDEFAULT,
CW_USEDEFAULT, CW_USEDEFAULT,
- parent, (HMENU)wid, 0, 0);
+ parent, (HMENU)(DWORD_PTR)wid, 0, 0);
}
@@ -567,7 +567,7 @@
{
HWND hUD =
CreateWindowW (UPDOWN_CLASSW, 0, style, x, y, cx, cy,
- parent, (HMENU)id, inst, 0);
+ parent, (HMENU)(DWORD_PTR)id, inst, 0);
if (hUD) {
SendMessageW (hUD, UDM_SETBUDDY, (WPARAM)buddy, 0);
SendMessageW (hUD, UDM_SETRANGE, 0, MAKELONG(maxVal, minVal));
@@ -728,7 +728,7 @@
hwndTB =
CreateWindowExW(0, TOOLBARCLASSNAMEW, NULL, style|WS_CHILD, 0,0,100,30,
- hwnd, (HMENU)wID, COMCTL32_hModule, NULL);
+ hwnd, (HMENU)(DWORD_PTR)wID, COMCTL32_hModule, NULL);
if(hwndTB) {
TBADDBITMAP tbab;
@@ -787,7 +787,7 @@
*/
HBITMAP WINAPI
-CreateMappedBitmap (HINSTANCE hInstance, INT idBitmap, UINT wFlags,
+CreateMappedBitmap (HINSTANCE hInstance, INT_PTR idBitmap, UINT wFlags,
LPCOLORMAP lpColorMap, INT iNumMaps)
{
HGLOBAL hglb;
diff --git a/dlls/comctl32/header.c b/dlls/comctl32/header.c
index 5ef8447..356f312 100644
--- a/dlls/comctl32/header.c
+++ b/dlls/comctl32/header.c
@@ -1173,7 +1173,7 @@
HEADER_INFO *infoPtr = HEADER_GetInfoPtr (hwnd);
HIMAGELIST himlOld;
- TRACE("(himl 0x%x)\n", (int)himl);
+ TRACE("(himl %p)\n", himl);
himlOld = infoPtr->himl;
infoPtr->himl = himl;
diff --git a/dlls/comctl32/imagelist.c b/dlls/comctl32/imagelist.c
index dc191e4..70712b4 100644
--- a/dlls/comctl32/imagelist.c
+++ b/dlls/comctl32/imagelist.c
@@ -1084,8 +1084,8 @@
bMask = (himl->flags & ILC_MASK) && (fStyle & ILD_MASK) ;
bBlend = (fStyle & (ILD_BLEND25 | ILD_BLEND50) ) && !bMask;
- TRACE("himl(0x%lx) hbmMask(%p) iImage(%d) x(%d) y(%d) cx(%d) cy(%d)\n",
- (DWORD)himl, himl->hbmMask, pimldp->i, pimldp->x, pimldp->y, cx, cy);
+ TRACE("himl(%p) hbmMask(%p) iImage(%d) x(%d) y(%d) cx(%d) cy(%d)\n",
+ himl, himl->hbmMask, pimldp->i, pimldp->x, pimldp->y, cx, cy);
/* we will use these DCs to access the images and masks in the ImageList */
hImageListDC = himl->hdcImage;
diff --git a/dlls/comctl32/ipaddress.c b/dlls/comctl32/ipaddress.c
index e4654b1..f4da2ff 100644
--- a/dlls/comctl32/ipaddress.c
+++ b/dlls/comctl32/ipaddress.c
@@ -143,7 +143,7 @@
fgCol = COLOR_GRAYTEXT;
}
- FillRect (hdc, &rect, (HBRUSH) (bgCol+1));
+ FillRect (hdc, &rect, (HBRUSH)(DWORD_PTR)(bgCol+1));
DrawEdge (hdc, &rect, EDGE_SUNKEN, BF_RECT | BF_ADJUST);
SetBkColor (hdc, GetSysColor(bgCol));
diff --git a/dlls/comctl32/listview.c b/dlls/comctl32/listview.c
index d7d543a..25c6333 100644
--- a/dlls/comctl32/listview.c
+++ b/dlls/comctl32/listview.c
@@ -1246,8 +1246,8 @@
TRACE("building icon ranges:\n");
for (nItem = 0; nItem < infoPtr->nItemCount; nItem++)
{
- rcItem.left = (LONG)DPA_GetPtr(infoPtr->hdpaPosX, nItem);
- rcItem.top = (LONG)DPA_GetPtr(infoPtr->hdpaPosY, nItem);
+ rcItem.left = (LONG_PTR)DPA_GetPtr(infoPtr->hdpaPosX, nItem);
+ rcItem.top = (LONG_PTR)DPA_GetPtr(infoPtr->hdpaPosY, nItem);
rcItem.right = rcItem.left + infoPtr->nItemWidth;
rcItem.bottom = rcItem.top + infoPtr->nItemHeight;
if (IntersectRect(&rcTemp, &rcItem, &frame))
@@ -1844,8 +1844,8 @@
if ((uView == LVS_SMALLICON) || (uView == LVS_ICON))
{
- lpptPosition->x = (LONG)DPA_GetPtr(infoPtr->hdpaPosX, nItem);
- lpptPosition->y = (LONG)DPA_GetPtr(infoPtr->hdpaPosY, nItem);
+ lpptPosition->x = (LONG_PTR)DPA_GetPtr(infoPtr->hdpaPosX, nItem);
+ lpptPosition->y = (LONG_PTR)DPA_GetPtr(infoPtr->hdpaPosY, nItem);
}
else if (uView == LVS_LIST)
{
@@ -2221,8 +2221,8 @@
if (!isNew)
{
- old.x = (LONG)DPA_GetPtr(infoPtr->hdpaPosX, nItem);
- old.y = (LONG)DPA_GetPtr(infoPtr->hdpaPosY, nItem);
+ old.x = (LONG_PTR)DPA_GetPtr(infoPtr->hdpaPosX, nItem);
+ old.y = (LONG_PTR)DPA_GetPtr(infoPtr->hdpaPosY, nItem);
if (lppt->x == old.x && lppt->y == old.y) return TRUE;
LISTVIEW_InvalidateItem(infoPtr, nItem);
@@ -2230,8 +2230,8 @@
/* Allocating a POINTER for every item is too resource intensive,
* so we'll keep the (x,y) in different arrays */
- if (!DPA_SetPtr(infoPtr->hdpaPosX, nItem, (void *)lppt->x)) return FALSE;
- if (!DPA_SetPtr(infoPtr->hdpaPosY, nItem, (void *)lppt->y)) return FALSE;
+ if (!DPA_SetPtr(infoPtr->hdpaPosX, nItem, (void *)(LONG_PTR)lppt->x)) return FALSE;
+ if (!DPA_SetPtr(infoPtr->hdpaPosY, nItem, (void *)(LONG_PTR)lppt->y)) return FALSE;
LISTVIEW_InvalidateItem(infoPtr, nItem);
@@ -2310,8 +2310,8 @@
case LVS_SMALLICON:
for (i = 0; i < infoPtr->nItemCount; i++)
{
- x = (LONG)DPA_GetPtr(infoPtr->hdpaPosX, i);
- y = (LONG)DPA_GetPtr(infoPtr->hdpaPosY, i);
+ x = (LONG_PTR)DPA_GetPtr(infoPtr->hdpaPosX, i);
+ y = (LONG_PTR)DPA_GetPtr(infoPtr->hdpaPosY, i);
lprcView->right = max(lprcView->right, x);
lprcView->bottom = max(lprcView->bottom, y);
}
diff --git a/dlls/comctl32/propsheet.c b/dlls/comctl32/propsheet.c
index 68ebd8f..5e53912 100644
--- a/dlls/comctl32/propsheet.c
+++ b/dlls/comctl32/propsheet.c
@@ -162,7 +162,7 @@
/******************************************************************************
* Prototypes
*/
-static int PROPSHEET_CreateDialog(PropSheetInfo* psInfo);
+static INT_PTR PROPSHEET_CreateDialog(PropSheetInfo* psInfo);
static BOOL PROPSHEET_SizeMismatch(HWND hwndDlg, PropSheetInfo* psInfo);
static BOOL PROPSHEET_AdjustSize(HWND hwndDlg, PropSheetInfo* psInfo);
static BOOL PROPSHEET_AdjustButtons(HWND hwndParent, PropSheetInfo* psInfo);
@@ -594,7 +594,7 @@
if ( !HIWORD( lppsp->pszTitle ) )
{
- if (!LoadStringW( lppsp->hInstance, (UINT)lppsp->pszTitle,szTitle,sizeof(szTitle) ))
+ if (!LoadStringW( lppsp->hInstance, (DWORD_PTR)lppsp->pszTitle,szTitle,sizeof(szTitle) ))
{
pTitle = pszNull;
FIXME("Could not load resource #%04x?\n",LOWORD(lppsp->pszTitle));
@@ -643,7 +643,7 @@
*
* Creates the actual property sheet.
*/
-int PROPSHEET_CreateDialog(PropSheetInfo* psInfo)
+INT_PTR PROPSHEET_CreateDialog(PropSheetInfo* psInfo)
{
LRESULT ret;
LPCVOID template;
@@ -711,7 +711,7 @@
* -1 (error). */
if( psInfo->unicode )
{
- ret = (int)CreateDialogIndirectParamW(psInfo->ppshheader.hInstance,
+ ret = (INT_PTR)CreateDialogIndirectParamW(psInfo->ppshheader.hInstance,
(LPDLGTEMPLATEW) temp,
psInfo->ppshheader.hwndParent,
PROPSHEET_DialogProc,
@@ -720,7 +720,7 @@
}
else
{
- ret = (int)CreateDialogIndirectParamA(psInfo->ppshheader.hInstance,
+ ret = (INT_PTR)CreateDialogIndirectParamA(psInfo->ppshheader.hInstance,
(LPDLGTEMPLATEA) temp,
psInfo->ppshheader.hwndParent,
PROPSHEET_DialogProc,
@@ -830,8 +830,8 @@
rc.right -= rc.left;
rc.bottom -= rc.top;
- TRACE("setting tab %08lx, rc (0,0)-(%ld,%ld)\n",
- (DWORD)hwndTabCtrl, rc.right, rc.bottom);
+ TRACE("setting tab %p, rc (0,0)-(%ld,%ld)\n",
+ hwndTabCtrl, rc.right, rc.bottom);
SetWindowPos(hwndTabCtrl, 0, 0, 0, rc.right, rc.bottom,
SWP_NOMOVE | SWP_NOZORDER | SWP_NOACTIVATE);
@@ -846,8 +846,8 @@
/*
* Resize the property sheet.
*/
- TRACE("setting dialog %08lx, rc (0,0)-(%ld,%ld)\n",
- (DWORD)hwndDlg, rc.right, rc.bottom);
+ TRACE("setting dialog %p, rc (0,0)-(%ld,%ld)\n",
+ hwndDlg, rc.right, rc.bottom);
SetWindowPos(hwndDlg, 0, 0, 0, rc.right, rc.bottom,
SWP_NOMOVE | SWP_NOZORDER | SWP_NOACTIVATE);
return TRUE;
@@ -882,8 +882,8 @@
AdjustWindowRect(&rc, GetWindowLongW(hwndDlg, GWL_STYLE), FALSE);
/* Resize the property sheet */
- TRACE("setting dialog %08lx, rc (0,0)-(%ld,%ld)\n",
- (DWORD)hwndDlg, rc.right, rc.bottom);
+ TRACE("setting dialog %p, rc (0,0)-(%ld,%ld)\n",
+ hwndDlg, rc.right, rc.bottom);
SetWindowPos(hwndDlg, 0, 0, 0, rc.right - rc.left, rc.bottom - rc.top,
SWP_NOMOVE | SWP_NOZORDER | SWP_NOACTIVATE);
@@ -1364,7 +1364,7 @@
TRACE("%d items\n",nrofitems);
while (nrofitems > 0)
{
- p = (WORD*)(((DWORD)p + 3) & ~3); /* DWORD align */
+ p = (WORD*)(((DWORD_PTR)p + 3) & ~3); /* DWORD align */
/* skip header */
p += (istemplateex ? sizeof(MyDLGITEMTEMPLATEEX) : sizeof(DLGITEMTEMPLATE))/sizeof(WORD);
@@ -1567,7 +1567,7 @@
!(psInfo->ppshheader.dwFlags & PSH_USEHBMWATERMARK))
{
((PropSheetInfo *)psInfo)->ppshheader.u4.hbmWatermark =
- CreateMappedBitmap(psInfo->ppshheader.hInstance, (INT)psInfo->ppshheader.u4.pszbmWatermark, 0, NULL, 0);
+ CreateMappedBitmap(psInfo->ppshheader.hInstance, (INT_PTR)psInfo->ppshheader.u4.pszbmWatermark, 0, NULL, 0);
}
/* Same behavior as for watermarks */
@@ -1575,7 +1575,7 @@
!(psInfo->ppshheader.dwFlags & PSH_USEHBMHEADER))
{
((PropSheetInfo *)psInfo)->ppshheader.u5.hbmHeader =
- CreateMappedBitmap(psInfo->ppshheader.hInstance, (INT)psInfo->ppshheader.u5.pszbmHeader, 0, NULL, 0);
+ CreateMappedBitmap(psInfo->ppshheader.hInstance, (INT_PTR)psInfo->ppshheader.u5.pszbmHeader, 0, NULL, 0);
}
}
}
@@ -2634,7 +2634,7 @@
TRACE("(%p, %d)\n", hwndDlg, iPageId);
for (index = 0; index < psInfo->nPages; index++) {
psp = (LPCPROPSHEETPAGEW)psInfo->proppage[index].hpage;
- if (psp->u.pszTemplate == (LPCWSTR)iPageId)
+ if (psp->u.pszTemplate == MAKEINTRESOURCEW(iPageId))
return index;
}
@@ -2802,9 +2802,9 @@
*| ID_PSREBOOTSYSTEM - The user must reboot the computer for the changes to take effect.
*| ID_PSRESTARTWINDOWS - The user must restart Windows for the changes to take effect.
*/
-INT WINAPI PropertySheetA(LPCPROPSHEETHEADERA lppsh)
+INT_PTR WINAPI PropertySheetA(LPCPROPSHEETHEADERA lppsh)
{
- int bRet = 0;
+ INT_PTR bRet = 0;
PropSheetInfo* psInfo = (PropSheetInfo*) GlobalAlloc(GPTR,
sizeof(PropSheetInfo));
UINT i, n;
@@ -2853,9 +2853,9 @@
*
* See PropertySheetA.
*/
-INT WINAPI PropertySheetW(LPCPROPSHEETHEADERW lppsh)
+INT_PTR WINAPI PropertySheetW(LPCPROPSHEETHEADERW lppsh)
{
- int bRet = 0;
+ INT_PTR bRet = 0;
PropSheetInfo* psInfo = (PropSheetInfo*) GlobalAlloc(GPTR,
sizeof(PropSheetInfo));
UINT i, n;
@@ -3241,7 +3241,7 @@
}
else
{
- nLength = LoadStringW(ppshpage->hInstance, (UINT)ppshpage->pszHeaderTitle,
+ nLength = LoadStringW(ppshpage->hInstance, (UINT_PTR)ppshpage->pszHeaderTitle,
szBuffer, 256);
if (nLength != 0)
{
@@ -3265,7 +3265,7 @@
}
else
{
- nLength = LoadStringW(ppshpage->hInstance, (UINT)ppshpage->pszHeaderSubTitle,
+ nLength = LoadStringW(ppshpage->hInstance, (UINT_PTR)ppshpage->pszHeaderSubTitle,
szBuffer, 256);
if (nLength != 0)
{
@@ -3443,7 +3443,7 @@
WCHAR szText[256];
if (LoadStringW(psInfo->ppshheader.hInstance,
- (UINT)psInfo->ppshheader.pszCaption, szText, 255))
+ (UINT_PTR)psInfo->ppshheader.pszCaption, szText, 255))
PROPSHEET_SetTitleW(hwnd, psInfo->ppshheader.dwFlags, szText);
}
else
diff --git a/dlls/comctl32/status.c b/dlls/comctl32/status.c
index 61f1c34..5723e98 100644
--- a/dlls/comctl32/status.c
+++ b/dlls/comctl32/status.c
@@ -199,7 +199,7 @@
dis.hwndItem = infoPtr->Self;
dis.hDC = hdc;
dis.rcItem = r;
- dis.itemData = (INT)part->text;
+ dis.itemData = (ULONG_PTR)part->text;
SendMessageW (infoPtr->Notify, WM_DRAWITEM, (WPARAM)dis.CtlID, (LPARAM)&dis);
} else {
if (part->hIcon) {
diff --git a/dlls/comctl32/tab.c b/dlls/comctl32/tab.c
index d5c0485..7572e58 100644
--- a/dlls/comctl32/tab.c
+++ b/dlls/comctl32/tab.c
@@ -711,7 +711,7 @@
(
HWND hwnd, /* handle of window for timer messages */
UINT uMsg, /* WM_TIMER message */
- UINT idEvent, /* timer identifier */
+ UINT_PTR idEvent, /* timer identifier */
DWORD dwTime /* current system time */
)
{
diff --git a/dlls/comctl32/theming.c b/dlls/comctl32/theming.c
index b33bb24..a03b641 100644
--- a/dlls/comctl32/theming.c
+++ b/dlls/comctl32/theming.c
@@ -153,7 +153,7 @@
*/
LRESULT THEMING_CallOriginalClass (HWND wnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
- int subclass = (int)GetPropW (wnd, MAKEINTATOMW (atSubclassProp));
+ INT_PTR subclass = (INT_PTR)GetPropW (wnd, MAKEINTATOMW (atSubclassProp));
WNDPROC oldProc = originalProcs[subclass];
return CallWindowProcW (oldProc, wnd, msg, wParam, lParam);
}
diff --git a/dlls/comctl32/toolbar.c b/dlls/comctl32/toolbar.c
index 93f5fc3..ee7e73e 100644
--- a/dlls/comctl32/toolbar.c
+++ b/dlls/comctl32/toolbar.c
@@ -98,7 +98,7 @@
BYTE bHot;
BYTE bDropDownPressed;
DWORD dwData;
- INT iString;
+ INT_PTR iString;
INT nRow;
RECT rect;
INT cx; /* manually set size */
@@ -2203,8 +2203,7 @@
return FALSE;
/* UNDOCUMENTED: dialog hwnd immediately follows NMHDR */
- /* FIXME: this hack won't work on 64-bit - we need to declare a structure for this */
- nmtb.iItem = (int)hwnd;
+ memcpy(&nmtb.iItem, &hwnd, sizeof(hwnd));
/* Send TBN_INITCUSTOMIZE notification */
if (TOOLBAR_SendNotify ((NMHDR *) &nmtb, infoPtr, TBN_INITCUSTOMIZE) ==
TBNRF_HIDEHELP)
@@ -4775,7 +4774,7 @@
if (lptbbi->dwMask & TBIF_STYLE)
btnPtr->fsStyle = lptbbi->fsStyle;
- if ((lptbbi->dwMask & TBIF_TEXT) && ((INT)lptbbi->pszText != -1)) {
+ if ((lptbbi->dwMask & TBIF_TEXT) && ((INT_PTR)lptbbi->pszText != -1)) {
if ((HIWORD(btnPtr->iString) == 0) || (btnPtr->iString == -1))
/* iString is index, zero it to make Str_SetPtr succeed */
btnPtr->iString=0;
@@ -4829,7 +4828,7 @@
if (lptbbi->dwMask & TBIF_STYLE)
btnPtr->fsStyle = lptbbi->fsStyle;
- if ((lptbbi->dwMask & TBIF_TEXT) && ((INT)lptbbi->pszText != -1)) {
+ if ((lptbbi->dwMask & TBIF_TEXT) && ((INT_PTR)lptbbi->pszText != -1)) {
if ((HIWORD(btnPtr->iString) == 0) || (btnPtr->iString == -1))
/* iString is index, zero it to make Str_SetPtr succeed */
btnPtr->iString=0;
diff --git a/dlls/comctl32/tooltips.c b/dlls/comctl32/tooltips.c
index 80073d4..e641aaa 100644
--- a/dlls/comctl32/tooltips.c
+++ b/dlls/comctl32/tooltips.c
@@ -113,7 +113,7 @@
UINT uFlags;
HWND hwnd;
BOOL bNotifyUnicode;
- UINT uId;
+ UINT_PTR uId;
RECT rect;
HINSTANCE hinst;
LPWSTR lpszText;
@@ -323,8 +323,8 @@
SendMessageW(toolPtr->hwnd, WM_NOTIFY,
(WPARAM)toolPtr->uId, (LPARAM)&ttnmdi);
- if (HIWORD((UINT)ttnmdi.lpszText) == 0) {
- LoadStringW(ttnmdi.hinst, (UINT)ttnmdi.lpszText,
+ if (IS_INTRESOURCE(ttnmdi.lpszText)) {
+ LoadStringW(ttnmdi.hinst, LOWORD(ttnmdi.lpszText),
infoPtr->szTipText, INFOTIPSIZE);
if (ttnmdi.uFlags & TTF_DI_SETITEM) {
toolPtr->hinst = ttnmdi.hinst;
@@ -372,8 +372,8 @@
SendMessageW(toolPtr->hwnd, WM_NOTIFY,
(WPARAM)toolPtr->uId, (LPARAM)&ttnmdi);
- if (HIWORD((UINT)ttnmdi.lpszText) == 0) {
- LoadStringW(ttnmdi.hinst, (UINT)ttnmdi.lpszText,
+ if (IS_INTRESOURCE(ttnmdi.lpszText)) {
+ LoadStringW(ttnmdi.hinst, LOWORD(ttnmdi.lpszText),
infoPtr->szTipText, INFOTIPSIZE);
if (ttnmdi.uFlags & TTF_DI_SETITEM) {
toolPtr->hinst = ttnmdi.hinst;
@@ -406,11 +406,11 @@
{
TTTOOL_INFO *toolPtr = &infoPtr->tools[nTool];
- if (HIWORD((UINT)toolPtr->lpszText) == 0 && toolPtr->hinst) {
+ if (IS_INTRESOURCE(toolPtr->lpszText) && toolPtr->hinst) {
/* load a resource */
TRACE("load res string %p %x\n",
- toolPtr->hinst, (int)toolPtr->lpszText);
- LoadStringW (toolPtr->hinst, (UINT)toolPtr->lpszText,
+ toolPtr->hinst, LOWORD(toolPtr->lpszText));
+ LoadStringW (toolPtr->hinst, LOWORD(toolPtr->lpszText),
infoPtr->szTipText, INFOTIPSIZE);
}
else if (toolPtr->lpszText) {
@@ -1015,8 +1015,8 @@
toolPtr->rect = lpToolInfo->rect;
toolPtr->hinst = lpToolInfo->hinst;
- if (HIWORD(lpToolInfo->lpszText) == 0) {
- TRACE("add string id %x!\n", (int)lpToolInfo->lpszText);
+ if (IS_INTRESOURCE(lpToolInfo->lpszText)) {
+ TRACE("add string id %x!\n", LOWORD(lpToolInfo->lpszText));
toolPtr->lpszText = (LPWSTR)lpToolInfo->lpszText;
}
else if (lpToolInfo->lpszText) {
@@ -1106,8 +1106,8 @@
toolPtr->rect = lpToolInfo->rect;
toolPtr->hinst = lpToolInfo->hinst;
- if (HIWORD(lpToolInfo->lpszText) == 0) {
- TRACE("add string id %x!\n", (int)lpToolInfo->lpszText);
+ if (IS_INTRESOURCE(lpToolInfo->lpszText)) {
+ TRACE("add string id %x\n", LOWORD(lpToolInfo->lpszText));
toolPtr->lpszText = (LPWSTR)lpToolInfo->lpszText;
}
else if (lpToolInfo->lpszText) {
@@ -1173,7 +1173,7 @@
toolPtr = &infoPtr->tools[nTool];
if (toolPtr->lpszText) {
if ( (toolPtr->lpszText != LPSTR_TEXTCALLBACKW) &&
- (HIWORD((INT)toolPtr->lpszText) != 0) )
+ !IS_INTRESOURCE(toolPtr->lpszText) )
Free (toolPtr->lpszText);
}
@@ -2015,8 +2015,8 @@
toolPtr->rect = lpToolInfo->rect;
toolPtr->hinst = lpToolInfo->hinst;
- if (HIWORD(lpToolInfo->lpszText) == 0) {
- TRACE("set string id %x!\n", (INT)lpToolInfo->lpszText);
+ if (IS_INTRESOURCE(lpToolInfo->lpszText)) {
+ TRACE("set string id %x\n", LOWORD(lpToolInfo->lpszText));
toolPtr->lpszText = (LPWSTR)lpToolInfo->lpszText;
}
else if (lpToolInfo->lpszText) {
@@ -2024,7 +2024,7 @@
toolPtr->lpszText = LPSTR_TEXTCALLBACKW;
else {
if ( (toolPtr->lpszText) &&
- (HIWORD((INT)toolPtr->lpszText) != 0) ) {
+ !IS_INTRESOURCE(toolPtr->lpszText) ) {
Free (toolPtr->lpszText);
toolPtr->lpszText = NULL;
}
@@ -2072,8 +2072,8 @@
toolPtr->rect = lpToolInfo->rect;
toolPtr->hinst = lpToolInfo->hinst;
- if (HIWORD(lpToolInfo->lpszText) == 0) {
- TRACE("set string id %x!\n", (INT)lpToolInfo->lpszText);
+ if (IS_INTRESOURCE(lpToolInfo->lpszText)) {
+ TRACE("set string id %x!\n", LOWORD(lpToolInfo->lpszText));
toolPtr->lpszText = lpToolInfo->lpszText;
}
else {
@@ -2081,7 +2081,7 @@
toolPtr->lpszText = LPSTR_TEXTCALLBACKW;
else {
if ( (toolPtr->lpszText) &&
- (HIWORD((INT)toolPtr->lpszText) != 0) ) {
+ !IS_INTRESOURCE(toolPtr->lpszText) ) {
Free (toolPtr->lpszText);
toolPtr->lpszText = NULL;
}
@@ -2199,7 +2199,7 @@
/* copy tool text */
toolPtr->hinst = lpToolInfo->hinst;
- if (HIWORD(lpToolInfo->lpszText) == 0){
+ if (IS_INTRESOURCE(lpToolInfo->lpszText)){
toolPtr->lpszText = (LPWSTR)lpToolInfo->lpszText;
}
else if (lpToolInfo->lpszText) {
@@ -2207,7 +2207,7 @@
toolPtr->lpszText = LPSTR_TEXTCALLBACKW;
else {
if ( (toolPtr->lpszText) &&
- (HIWORD((INT)toolPtr->lpszText) != 0) ) {
+ !IS_INTRESOURCE(toolPtr->lpszText) ) {
Free (toolPtr->lpszText);
toolPtr->lpszText = NULL;
}
@@ -2256,7 +2256,7 @@
/* copy tool text */
toolPtr->hinst = lpToolInfo->hinst;
- if (HIWORD(lpToolInfo->lpszText) == 0){
+ if (IS_INTRESOURCE(lpToolInfo->lpszText)){
toolPtr->lpszText = lpToolInfo->lpszText;
}
else if (lpToolInfo->lpszText) {
@@ -2264,7 +2264,7 @@
toolPtr->lpszText = LPSTR_TEXTCALLBACKW;
else {
if ( (toolPtr->lpszText) &&
- (HIWORD((INT)toolPtr->lpszText) != 0) ) {
+ !IS_INTRESOURCE(toolPtr->lpszText) ) {
Free (toolPtr->lpszText);
toolPtr->lpszText = NULL;
}
@@ -2337,7 +2337,7 @@
toolPtr = &infoPtr->tools[i];
if (toolPtr->lpszText) {
if ( (toolPtr->lpszText != LPSTR_TEXTCALLBACKW) &&
- (HIWORD((INT)toolPtr->lpszText) != 0) )
+ !IS_INTRESOURCE(toolPtr->lpszText) )
{
Free (toolPtr->lpszText);
toolPtr->lpszText = NULL;
diff --git a/dlls/comctl32/treeview.c b/dlls/comctl32/treeview.c
index ac01889..d397afd 100644
--- a/dlls/comctl32/treeview.c
+++ b/dlls/comctl32/treeview.c
@@ -659,12 +659,13 @@
{
HWND hwnd = infoPtr->hwnd;
LPNMCUSTOMDRAW nmcd;
- DWORD dwDrawStage, dwItemSpec;
+ DWORD dwDrawStage;
+ DWORD_PTR dwItemSpec;
UINT uItemState;
INT retval;
dwDrawStage = CDDS_ITEM | uItemDrawState;
- dwItemSpec = (DWORD)wineItem;
+ dwItemSpec = (DWORD_PTR)wineItem;
uItemState = 0;
if (wineItem->state & TVIS_SELECTED)
uItemState |= CDIS_SELECTED;
@@ -1238,11 +1239,11 @@
insertAfter = ptdi->hInsertAfter;
/* Validate this now for convenience. */
- switch ((DWORD)insertAfter)
+ switch ((DWORD_PTR)insertAfter)
{
- case (DWORD)TVI_FIRST:
- case (DWORD)TVI_LAST:
- case (DWORD)TVI_SORT:
+ case (DWORD_PTR)TVI_FIRST:
+ case (DWORD_PTR)TVI_LAST:
+ case (DWORD_PTR)TVI_SORT:
break;
default:
@@ -1274,9 +1275,9 @@
infoPtr->uNumItems++;
- switch ((DWORD)insertAfter)
+ switch ((DWORD_PTR)insertAfter)
{
- case (DWORD)TVI_FIRST:
+ case (DWORD_PTR)TVI_FIRST:
{
TREEVIEW_ITEM *originalFirst = parentItem->firstChild;
TREEVIEW_InsertBefore(newItem, parentItem->firstChild, parentItem);
@@ -1285,7 +1286,7 @@
}
break;
- case (DWORD)TVI_LAST:
+ case (DWORD_PTR)TVI_LAST:
TREEVIEW_InsertAfter(newItem, parentItem->lastChild, parentItem);
break;
@@ -1294,7 +1295,7 @@
TREEVIEW_InsertAfter(newItem, insertAfter, insertAfter->parent);
break;
- case (DWORD)TVI_SORT:
+ case (DWORD_PTR)TVI_SORT:
{
TREEVIEW_ITEM *aChild;
TREEVIEW_ITEM *previousChild = NULL;
@@ -2591,9 +2592,9 @@
/* Draw insertion mark if necessary */
if (infoPtr->insertMarkItem)
- TRACE("item:%d,mark:%d\n",
+ TRACE("item:%d,mark:%p\n",
TREEVIEW_GetItemIndex(infoPtr, wineItem),
- (int)infoPtr->insertMarkItem);
+ infoPtr->insertMarkItem);
if (wineItem == infoPtr->insertMarkItem)
{
@@ -2972,7 +2973,7 @@
/* Check for a valid handle to the parent item */
if (!TREEVIEW_ValidItem(infoPtr, parent))
{
- ERR("invalid item hParent=%x\n", (INT)parent);
+ ERR("invalid item hParent=%p\n", parent);
return FALSE;
}
@@ -3643,7 +3644,7 @@
TEXTMETRICW textMetric;
static const WCHAR EditW[] = {'E','d','i','t',0};
- TRACE("%x %p\n", (unsigned)hwnd, hItem);
+ TRACE("%p %p\n", hwnd, hItem);
if (!TREEVIEW_ValidItem(infoPtr, editItem))
return NULL;
diff --git a/include/commctrl.h b/include/commctrl.h
index 2fbdd22..0513823 100644
--- a/include/commctrl.h
+++ b/include/commctrl.h
@@ -27,7 +27,7 @@
extern "C" {
#endif
-BOOL WINAPI ShowHideMenuCtl (HWND, UINT, LPINT);
+BOOL WINAPI ShowHideMenuCtl (HWND, UINT_PTR, LPINT);
VOID WINAPI GetEffectiveClientRect (HWND, LPRECT, LPINT);
VOID WINAPI InitCommonControls (VOID);
@@ -155,8 +155,8 @@
typedef struct tagNMMOUSE
{
NMHDR hdr;
- DWORD dwItemSpec;
- DWORD dwItemData;
+ DWORD_PTR dwItemSpec;
+ DWORD_PTR dwItemData;
POINT pt;
DWORD dwHitInfo; /* info where on item or control the mouse is */
} NMMOUSE, *LPNMMOUSE;
@@ -261,7 +261,7 @@
DWORD dwDrawStage;
HDC hdc;
RECT rc;
- DWORD dwItemSpec;
+ DWORD_PTR dwItemSpec;
UINT uItemState;
LPARAM lItemlParam;
} NMCUSTOMDRAW, *LPNMCUSTOMDRAW;
@@ -1293,8 +1293,8 @@
BYTE fsState;
BYTE fsStyle;
BYTE bReserved[2];
- DWORD dwData;
- INT iString;
+ DWORD_PTR dwData;
+ INT_PTR iString;
} TBBUTTON, *PTBBUTTON, *LPTBBUTTON;
typedef const TBBUTTON *LPCTBBUTTON;
@@ -1307,7 +1307,7 @@
typedef struct tagTBADDBITMAP {
HINSTANCE hInst;
- UINT nID;
+ UINT_PTR nID;
} TBADDBITMAP, *LPTBADDBITMAP;
#define HINST_COMMCTRL ((HINSTANCE)-1)
@@ -1378,7 +1378,7 @@
BYTE fsState;
BYTE fsStyle;
WORD cx;
- DWORD lParam;
+ DWORD_PTR lParam;
LPSTR pszText;
INT cchText;
} TBBUTTONINFOA, *LPTBBUTTONINFOA;
@@ -1392,7 +1392,7 @@
BYTE fsState;
BYTE fsStyle;
WORD cx;
- DWORD lParam;
+ DWORD_PTR lParam;
LPWSTR pszText;
INT cchText;
} TBBUTTONINFOW, *LPTBBUTTONINFOW;
@@ -1434,7 +1434,7 @@
NMHDR hdr;
DWORD dwMask;
int idCommand;
- DWORD lParam;
+ DWORD_PTR lParam;
int iImage;
LPSTR pszText;
int cchText;
@@ -1445,7 +1445,7 @@
NMHDR hdr;
DWORD dwMask;
int idCommand;
- DWORD lParam;
+ DWORD_PTR lParam;
int iImage;
LPWSTR pszText;
int cchText;
@@ -1488,9 +1488,9 @@
typedef struct
{
HINSTANCE hInstOld;
- UINT nIDOld;
+ UINT_PTR nIDOld;
HINSTANCE hInstNew;
- UINT nIDNew;
+ UINT_PTR nIDNew;
INT nButtons;
} TBREPLACEBITMAP, *LPTBREPLACEBITMAP;
@@ -1562,7 +1562,7 @@
INT, INT, INT, INT, INT, UINT);
HBITMAP WINAPI
-CreateMappedBitmap (HINSTANCE, INT, UINT, LPCOLORMAP, INT);
+CreateMappedBitmap (HINSTANCE, INT_PTR, UINT, LPCOLORMAP, INT);
/* Tool tips */
@@ -1684,7 +1684,7 @@
UINT cbSize;
UINT uFlags;
HWND hwnd;
- UINT uId;
+ UINT_PTR uId;
RECT rect;
HINSTANCE hinst;
LPSTR lpszText;
@@ -1696,7 +1696,7 @@
UINT cbSize;
UINT uFlags;
HWND hwnd;
- UINT uId;
+ UINT_PTR uId;
RECT rect;
HINSTANCE hinst;
LPWSTR lpszText;
diff --git a/include/prsht.h b/include/prsht.h
index d01fbbb..28fd975 100644
--- a/include/prsht.h
+++ b/include/prsht.h
@@ -191,8 +191,8 @@
/*
* Property sheet support (methods)
*/
-INT WINAPI PropertySheetA(LPCPROPSHEETHEADERA);
-INT WINAPI PropertySheetW(LPCPROPSHEETHEADERW);
+INT_PTR WINAPI PropertySheetA(LPCPROPSHEETHEADERA);
+INT_PTR WINAPI PropertySheetW(LPCPROPSHEETHEADERW);
#define PropertySheet WINELIB_NAME_AW(PropertySheet)
HPROPSHEETPAGE WINAPI CreatePropertySheetPageA(LPCPROPSHEETPAGEA);
HPROPSHEETPAGE WINAPI CreatePropertySheetPageW(LPCPROPSHEETPAGEW);