user32: Remove superfluous pointer casts.

This commit is contained in:
Michael Stefaniuc 2009-03-02 10:24:30 +01:00 committed by Alexandre Julliard
parent d15619b215
commit 214b40b109
22 changed files with 85 additions and 90 deletions

View File

@ -1164,10 +1164,10 @@ BOOL WINAPI GetClassInfoExW( HINSTANCE hInstance, LPCWSTR name, WNDCLASSEXW *wc
wc->cbClsExtra = classPtr->cbClsExtra; wc->cbClsExtra = classPtr->cbClsExtra;
wc->cbWndExtra = classPtr->cbWndExtra; wc->cbWndExtra = classPtr->cbWndExtra;
wc->hInstance = (hInstance == user32_module) ? 0 : hInstance; wc->hInstance = (hInstance == user32_module) ? 0 : hInstance;
wc->hIcon = (HICON)classPtr->hIcon; wc->hIcon = classPtr->hIcon;
wc->hIconSm = (HICON)classPtr->hIconSm; wc->hIconSm = classPtr->hIconSm;
wc->hCursor = (HCURSOR)classPtr->hCursor; wc->hCursor = classPtr->hCursor;
wc->hbrBackground = (HBRUSH)classPtr->hbrBackground; wc->hbrBackground = classPtr->hbrBackground;
wc->lpszMenuName = CLASS_GetMenuNameW( classPtr ); wc->lpszMenuName = CLASS_GetMenuNameW( classPtr );
wc->lpszClassName = name; wc->lpszClassName = name;
atom = classPtr->atomName; atom = classPtr->atomName;

View File

@ -838,7 +838,7 @@ static HICON CURSORICON_CreateIconFromBMI( BITMAPINFO *bmi,
/* Transfer the bitmap bits to the CURSORICONINFO structure */ /* Transfer the bitmap bits to the CURSORICONINFO structure */
GetBitmapBits( hAndBits, sizeAnd, (char *)(info + 1) ); GetBitmapBits( hAndBits, sizeAnd, info + 1 );
GetBitmapBits( hXorBits, sizeXor, (char *)(info + 1) + sizeAnd ); GetBitmapBits( hXorBits, sizeXor, (char *)(info + 1) + sizeAnd );
GlobalUnlock16( hObj ); GlobalUnlock16( hObj );
} }
@ -1613,8 +1613,7 @@ BOOL WINAPI DrawIcon( HDC hdc, INT x, INT y, HICON hIcon )
if (!(ptr = GlobalLock16(HICON_16(hIcon)))) return FALSE; if (!(ptr = GlobalLock16(HICON_16(hIcon)))) return FALSE;
if (!(hMemDC = CreateCompatibleDC( hdc ))) return FALSE; if (!(hMemDC = CreateCompatibleDC( hdc ))) return FALSE;
hAndBits = CreateBitmap( ptr->nWidth, ptr->nHeight, 1, 1, hAndBits = CreateBitmap( ptr->nWidth, ptr->nHeight, 1, 1, ptr + 1 );
(char *)(ptr+1) );
hXorBits = CreateBitmap( ptr->nWidth, ptr->nHeight, ptr->bPlanes, hXorBits = CreateBitmap( ptr->nWidth, ptr->nHeight, ptr->bPlanes,
ptr->bBitsPerPixel, (char *)(ptr + 1) ptr->bBitsPerPixel, (char *)(ptr + 1)
+ ptr->nHeight * get_bitmap_width_bytes(ptr->nWidth,1) ); + ptr->nHeight * get_bitmap_width_bytes(ptr->nWidth,1) );
@ -1677,7 +1676,7 @@ HCURSOR WINAPI SetCursor( HCURSOR hCursor /* [in] Handle of cursor to show */ )
/* Change the cursor shape only if it is visible */ /* Change the cursor shape only if it is visible */
if (thread_info->cursor_count >= 0) if (thread_info->cursor_count >= 0)
{ {
USER_Driver->pSetCursor( (CURSORICONINFO*)GlobalLock16(HCURSOR_16(hCursor)) ); USER_Driver->pSetCursor(GlobalLock16(HCURSOR_16(hCursor)));
GlobalUnlock16(HCURSOR_16(hCursor)); GlobalUnlock16(HCURSOR_16(hCursor));
} }
return hOldCursor; return hOldCursor;
@ -1696,7 +1695,7 @@ INT WINAPI ShowCursor( BOOL bShow )
{ {
if (++thread_info->cursor_count == 0) /* Show it */ if (++thread_info->cursor_count == 0) /* Show it */
{ {
USER_Driver->pSetCursor((CURSORICONINFO*)GlobalLock16(HCURSOR_16(thread_info->cursor))); USER_Driver->pSetCursor(GlobalLock16(HCURSOR_16(thread_info->cursor)));
GlobalUnlock16(HCURSOR_16(thread_info->cursor)); GlobalUnlock16(HCURSOR_16(thread_info->cursor));
} }
} }
@ -1977,7 +1976,7 @@ BOOL WINAPI GetIconInfo(HICON hIcon, PICONINFO iconinfo)
} }
iconinfo->hbmMask = CreateBitmap ( ciconinfo->nWidth, height, iconinfo->hbmMask = CreateBitmap ( ciconinfo->nWidth, height,
1, 1, (char *)(ciconinfo + 1)); 1, 1, ciconinfo + 1);
GlobalUnlock16(HICON_16(hIcon)); GlobalUnlock16(HICON_16(hIcon));
@ -2062,7 +2061,7 @@ HICON WINAPI CreateIconIndirect(PICONINFO iconinfo)
/* Some apps pass a color bitmap as a mask, convert it to b/w */ /* Some apps pass a color bitmap as a mask, convert it to b/w */
if (bmpAnd.bmBitsPixel == 1) if (bmpAnd.bmBitsPixel == 1)
{ {
GetBitmapBits( iconinfo->hbmMask, sizeAnd, (char*)(info + 1) ); GetBitmapBits( iconinfo->hbmMask, sizeAnd, info + 1 );
} }
else else
{ {
@ -2085,7 +2084,7 @@ HICON WINAPI CreateIconIndirect(PICONINFO iconinfo)
DeleteDC( hdc_mem ); DeleteDC( hdc_mem );
ReleaseDC( 0, hdc ); ReleaseDC( 0, hdc );
GetBitmapBits( hbmp_mono, sizeAnd, (char*)(info + 1) ); GetBitmapBits( hbmp_mono, sizeAnd, info + 1 );
DeleteObject( hbmp_mono ); DeleteObject( hbmp_mono );
} }
@ -2232,8 +2231,7 @@ BOOL WINAPI DrawIconEx( HDC hdc, INT x0, INT y0, HICON hIcon,
(char *)(ptr + 1) (char *)(ptr + 1)
+ ptr->nHeight * + ptr->nHeight *
get_bitmap_width_bytes(ptr->nWidth,1) ); get_bitmap_width_bytes(ptr->nWidth,1) );
hAndBits = CreateBitmap ( ptr->nWidth, ptr->nHeight, hAndBits = CreateBitmap ( ptr->nWidth, ptr->nHeight, 1, 1, ptr + 1 );
1, 1, (char *)(ptr+1) );
oldFg = SetTextColor( hdc, RGB(0,0,0) ); oldFg = SetTextColor( hdc, RGB(0,0,0) );
oldBg = SetBkColor( hdc, RGB(255,255,255) ); oldBg = SetBkColor( hdc, RGB(255,255,255) );

View File

@ -730,7 +730,7 @@ static WDML_XACT* WDML_ClientQueuePoke(WDML_CONV* pConv, LPVOID pData, DWORD cbD
hglobal = pData; hglobal = pData;
dh = GlobalLock(hglobal); dh = GlobalLock(hglobal);
cbData = GlobalSize(hglobal) - sizeof(DDE_DATAHANDLE_HEAD); cbData = GlobalSize(hglobal) - sizeof(DDE_DATAHANDLE_HEAD);
pData = (LPVOID)(dh + 1); pData = dh + 1;
GlobalUnlock(hglobal); GlobalUnlock(hglobal);
} }

View File

@ -1345,7 +1345,7 @@ HDDEDATA WINAPI DdeCreateDataHandle(DWORD idInst, LPBYTE pSrc, DWORD cb, DWORD c
GlobalUnlock(hMem); GlobalUnlock(hMem);
TRACE("=> %p\n", hMem); TRACE("=> %p\n", hMem);
return (HDDEDATA)hMem; return hMem;
} }
/***************************************************************** /*****************************************************************
@ -1577,8 +1577,8 @@ HGLOBAL WDML_DataHandle2Global(HDDEDATA hDdeData, BOOL fResponse, BOOL fRelease,
DWORD dwSize; DWORD dwSize;
HGLOBAL hMem = 0; HGLOBAL hMem = 0;
dwSize = GlobalSize((HGLOBAL)hDdeData) - sizeof(DDE_DATAHANDLE_HEAD); dwSize = GlobalSize(hDdeData) - sizeof(DDE_DATAHANDLE_HEAD);
pDdh = GlobalLock((HGLOBAL)hDdeData); pDdh = GlobalLock(hDdeData);
if (dwSize && pDdh) if (dwSize && pDdh)
{ {
WINE_DDEHEAD* wdh = NULL; WINE_DDEHEAD* wdh = NULL;
@ -1628,7 +1628,7 @@ HGLOBAL WDML_DataHandle2Global(HDDEDATA hDdeData, BOOL fResponse, BOOL fRelease,
wdh->cfFormat = pDdh->cfFormat; wdh->cfFormat = pDdh->cfFormat;
GlobalUnlock(hMem); GlobalUnlock(hMem);
} }
GlobalUnlock((HGLOBAL)hDdeData); GlobalUnlock(hDdeData);
} }
return hMem; return hMem;

View File

@ -291,7 +291,7 @@ HDDEDATA WINAPI DdeClientTransaction16(LPVOID pData, DWORD cbData, HCONV hConv,
HSZ hszItem, UINT16 wFmt, UINT16 wType, HSZ hszItem, UINT16 wFmt, UINT16 wType,
DWORD dwTimeout, LPDWORD pdwResult) DWORD dwTimeout, LPDWORD pdwResult)
{ {
return DdeClientTransaction((LPBYTE)pData, cbData, hConv, hszItem, return DdeClientTransaction(pData, cbData, hConv, hszItem,
wFmt, wType, dwTimeout, pdwResult); wFmt, wType, dwTimeout, pdwResult);
} }

View File

@ -236,7 +236,7 @@ BOOL DESKTOP_SetPattern( LPCWSTR pattern )
int i; int i;
for (i = 0; i < 8; i++) pattern[i] = pat[i] & 0xffff; for (i = 0; i < 8; i++) pattern[i] = pat[i] & 0xffff;
hbitmap = CreateBitmap( 8, 8, 1, 1, (LPSTR)pattern ); hbitmap = CreateBitmap( 8, 8, 1, 1, pattern );
hbrushPattern = CreatePatternBrush( hbitmap ); hbrushPattern = CreatePatternBrush( hbitmap );
DeleteObject( hbitmap ); DeleteObject( hbitmap );
} }

View File

@ -205,7 +205,7 @@ static const WORD *DIALOG_GetControl32( const WORD *p, DLG_CONTROL_INFO *info,
} }
else else
{ {
info->className = (LPCWSTR)p; info->className = p;
p += strlenW( info->className ) + 1; p += strlenW( info->className ) + 1;
} }
@ -216,7 +216,7 @@ static const WORD *DIALOG_GetControl32( const WORD *p, DLG_CONTROL_INFO *info,
} }
else else
{ {
info->windowName = (LPCWSTR)p; info->windowName = p;
p += strlenW( info->windowName ) + 1; p += strlenW( info->windowName ) + 1;
} }
@ -393,7 +393,7 @@ static LPCSTR DIALOG_ParseTemplate32( LPCSTR template, DLG_TEMPLATE * result )
TRACE(" MENU %04x\n", LOWORD(result->menuName) ); TRACE(" MENU %04x\n", LOWORD(result->menuName) );
break; break;
default: default:
result->menuName = (LPCWSTR)p; result->menuName = p;
TRACE(" MENU %s\n", debugstr_w(result->menuName) ); TRACE(" MENU %s\n", debugstr_w(result->menuName) );
p += strlenW( result->menuName ) + 1; p += strlenW( result->menuName ) + 1;
break; break;
@ -413,7 +413,7 @@ static LPCSTR DIALOG_ParseTemplate32( LPCSTR template, DLG_TEMPLATE * result )
TRACE(" CLASS %04x\n", LOWORD(result->className) ); TRACE(" CLASS %04x\n", LOWORD(result->className) );
break; break;
default: default:
result->className = (LPCWSTR)p; result->className = p;
TRACE(" CLASS %s\n", debugstr_w( result->className )); TRACE(" CLASS %s\n", debugstr_w( result->className ));
p += strlenW( result->className ) + 1; p += strlenW( result->className ) + 1;
break; break;
@ -421,7 +421,7 @@ static LPCSTR DIALOG_ParseTemplate32( LPCSTR template, DLG_TEMPLATE * result )
/* Get the window caption */ /* Get the window caption */
result->caption = (LPCWSTR)p; result->caption = p;
p += strlenW( result->caption ) + 1; p += strlenW( result->caption ) + 1;
TRACE(" CAPTION %s\n", debugstr_w( result->caption ) ); TRACE(" CAPTION %s\n", debugstr_w( result->caption ) );
@ -441,7 +441,7 @@ static LPCSTR DIALOG_ParseTemplate32( LPCSTR template, DLG_TEMPLATE * result )
result->weight = GET_WORD(p); p++; result->weight = GET_WORD(p); p++;
result->italic = LOBYTE(GET_WORD(p)); p++; result->italic = LOBYTE(GET_WORD(p)); p++;
} }
result->faceName = (LPCWSTR)p; result->faceName = p;
p += strlenW( result->faceName ) + 1; p += strlenW( result->faceName ) + 1;
TRACE(" FONT %d, %s, %d, %s\n", TRACE(" FONT %d, %s, %d, %s\n",
result->pointSize, debugstr_w( result->faceName ), result->pointSize, debugstr_w( result->faceName ),

View File

@ -223,7 +223,7 @@ static BYTE * ICO_GetIconDirectory( LPBYTE peimage, LPicoICONDIR* lplpiID, ULONG
/* copy the entries */ /* copy the entries */
for( i=0; i < lpcid->idCount; i++ ) for( i=0; i < lpcid->idCount; i++ )
{ {
memcpy((void*)&(lpID->idEntries[i]),(void*)&(lpcid->idEntries[i]), sizeof(CURSORICONDIRENTRY) - 2); memcpy(&lpID->idEntries[i], &lpcid->idEntries[i], sizeof(CURSORICONDIRENTRY) - 2);
lpID->idEntries[i].wResId = i; lpID->idEntries[i].wResId = i;
} }
@ -776,7 +776,7 @@ UINT WINAPI PrivateExtractIconExW (
cxsmicon = GetSystemMetrics(SM_CXSMICON); cxsmicon = GetSystemMetrics(SM_CXSMICON);
cysmicon = GetSystemMetrics(SM_CYSMICON); cysmicon = GetSystemMetrics(SM_CYSMICON);
ret = ICO_ExtractIconExW(lpwstrFile, (HICON*)hIcon, nIndex, 2, cxicon | (cxsmicon<<16), ret = ICO_ExtractIconExW(lpwstrFile, hIcon, nIndex, 2, cxicon | (cxsmicon<<16),
cyicon | (cysmicon<<16), NULL, LR_DEFAULTCOLOR); cyicon | (cysmicon<<16), NULL, LR_DEFAULTCOLOR);
*phIconLarge = hIcon[0]; *phIconLarge = hIcon[0];
*phIconSmall = hIcon[1]; *phIconSmall = hIcon[1];

View File

@ -379,7 +379,7 @@ static LRESULT call_hook( struct hook_info *info, INT code, WPARAM wparam, LPARA
thread_info->hook = info->handle; thread_info->hook = info->handle;
thread_info->hook_unicode = info->next_unicode; thread_info->hook_unicode = info->next_unicode;
ret = call_hook_proc( (HOOKPROC)info->proc, info->id, code, wparam, lparam, ret = call_hook_proc( info->proc, info->id, code, wparam, lparam,
info->prev_unicode, info->next_unicode ); info->prev_unicode, info->next_unicode );
thread_info->hook = prev; thread_info->hook = prev;
thread_info->hook_unicode = prev_unicode; thread_info->hook_unicode = prev_unicode;

View File

@ -2620,7 +2620,7 @@ static LRESULT ListBoxWndProc_common( HWND hwnd, UINT msg,
if (msg == WM_CREATE) if (msg == WM_CREATE)
{ {
CREATESTRUCTW *lpcs = (CREATESTRUCTW *)lParam; CREATESTRUCTW *lpcs = (CREATESTRUCTW *)lParam;
if (lpcs->style & LBS_COMBOBOX) lphc = (LPHEADCOMBO)lpcs->lpCreateParams; if (lpcs->style & LBS_COMBOBOX) lphc = lpcs->lpCreateParams;
if (!LISTBOX_Create( hwnd, lphc )) return -1; if (!LISTBOX_Create( hwnd, lphc )) return -1;
TRACE("creating hwnd %p descr %p\n", hwnd, (void *)GetWindowLongPtrW( hwnd, 0 ) ); TRACE("creating hwnd %p descr %p\n", hwnd, (void *)GetWindowLongPtrW( hwnd, 0 ) );
return 0; return 0;

View File

@ -2025,7 +2025,6 @@ static HWND MDI_MoreWindowsDialog(HWND hwnd)
if (template == 0) if (template == 0)
return 0; return 0;
return (HWND) DialogBoxIndirectParamA(user32_module, return (HWND) DialogBoxIndirectParamA(user32_module, template, hwnd,
(const DLGTEMPLATE*) template, MDI_MoreWindowsDlgProc, (LPARAM) hwnd);
hwnd, MDI_MoreWindowsDlgProc, (LPARAM) hwnd);
} }

View File

@ -4018,7 +4018,7 @@ HMENU WINAPI CreateMenu(void)
HMENU hMenu; HMENU hMenu;
LPPOPUPMENU menu; LPPOPUPMENU menu;
if (!(hMenu = USER_HEAP_ALLOC( sizeof(POPUPMENU) ))) return 0; if (!(hMenu = USER_HEAP_ALLOC( sizeof(POPUPMENU) ))) return 0;
menu = (LPPOPUPMENU) USER_HEAP_LIN_ADDR(hMenu); menu = USER_HEAP_LIN_ADDR(hMenu);
ZeroMemory(menu, sizeof(POPUPMENU)); ZeroMemory(menu, sizeof(POPUPMENU));
menu->wMagic = MENU_MAGIC; menu->wMagic = MENU_MAGIC;
@ -4354,7 +4354,7 @@ HMENU WINAPI LoadMenuA( HINSTANCE instance, LPCSTR name )
{ {
HRSRC hrsrc = FindResourceA( instance, name, (LPSTR)RT_MENU ); HRSRC hrsrc = FindResourceA( instance, name, (LPSTR)RT_MENU );
if (!hrsrc) return 0; if (!hrsrc) return 0;
return LoadMenuIndirectA( (LPCVOID)LoadResource( instance, hrsrc )); return LoadMenuIndirectA( LoadResource( instance, hrsrc ));
} }
@ -4365,7 +4365,7 @@ HMENU WINAPI LoadMenuW( HINSTANCE instance, LPCWSTR name )
{ {
HRSRC hrsrc = FindResourceW( instance, name, (LPWSTR)RT_MENU ); HRSRC hrsrc = FindResourceW( instance, name, (LPWSTR)RT_MENU );
if (!hrsrc) return 0; if (!hrsrc) return 0;
return LoadMenuIndirectW( (LPCVOID)LoadResource( instance, hrsrc )); return LoadMenuIndirectW( LoadResource( instance, hrsrc ));
} }
@ -4376,7 +4376,7 @@ HMENU16 WINAPI LoadMenuIndirect16( LPCVOID template )
{ {
HMENU hMenu; HMENU hMenu;
WORD version, offset; WORD version, offset;
LPCSTR p = (LPCSTR)template; LPCSTR p = template;
TRACE("(%p)\n", template ); TRACE("(%p)\n", template );
version = GET_WORD(p); version = GET_WORD(p);
@ -4405,7 +4405,7 @@ HMENU WINAPI LoadMenuIndirectW( LPCVOID template )
{ {
HMENU hMenu; HMENU hMenu;
WORD version, offset; WORD version, offset;
LPCSTR p = (LPCSTR)template; LPCSTR p = template;
version = GET_WORD(p); version = GET_WORD(p);
p += sizeof(WORD); p += sizeof(WORD);

View File

@ -980,7 +980,7 @@ static BOOL unpack_message( HWND hwnd, UINT message, WPARAM *wparam, LPARAM *lpa
case WM_WINE_KEYBOARD_LL_HOOK: case WM_WINE_KEYBOARD_LL_HOOK:
case WM_WINE_MOUSE_LL_HOOK: case WM_WINE_MOUSE_LL_HOOK:
{ {
struct hook_extra_info *h_extra = (struct hook_extra_info *)*buffer; struct hook_extra_info *h_extra = *buffer;
minsize = sizeof(struct hook_extra_info) + minsize = sizeof(struct hook_extra_info) +
(message == WM_WINE_KEYBOARD_LL_HOOK ? sizeof(KBDLLHOOKSTRUCT) (message == WM_WINE_KEYBOARD_LL_HOOK ? sizeof(KBDLLHOOKSTRUCT)
@ -1467,7 +1467,7 @@ static BOOL post_dde_message( struct packed_message *data, const struct send_mes
{ {
if ((ptr = GlobalLock( (HGLOBAL)uiLo) )) if ((ptr = GlobalLock( (HGLOBAL)uiLo) ))
{ {
DDEDATA *dde_data = (DDEDATA *)ptr; DDEDATA *dde_data = ptr;
TRACE("unused %d, fResponse %d, fRelease %d, fDeferUpd %d, fAckReq %d, cfFormat %d\n", TRACE("unused %d, fResponse %d, fRelease %d, fDeferUpd %d, fAckReq %d, cfFormat %d\n",
dde_data->unused, dde_data->fResponse, dde_data->fRelease, dde_data->unused, dde_data->fResponse, dde_data->fRelease,
dde_data->reserved, dde_data->fAckReq, dde_data->cfFormat); dde_data->reserved, dde_data->fAckReq, dde_data->cfFormat);

View File

@ -337,8 +337,8 @@ static INT_PTR CALLBACK MSGBOX_DlgProc( HWND hwnd, UINT message,
LPMSGBOXPARAMSW mbp = (LPMSGBOXPARAMSW)lParam; LPMSGBOXPARAMSW mbp = (LPMSGBOXPARAMSW)lParam;
SetWindowContextHelpId(hwnd, mbp->dwContextHelpId); SetWindowContextHelpId(hwnd, mbp->dwContextHelpId);
hFont = MSGBOX_OnInit(hwnd, mbp); hFont = MSGBOX_OnInit(hwnd, mbp);
SetPropA(hwnd, "WINE_MSGBOX_HFONT", (HANDLE)hFont); SetPropA(hwnd, "WINE_MSGBOX_HFONT", hFont);
SetPropA(hwnd, "WINE_MSGBOX_HELPCALLBACK", (HANDLE)mbp->lpfnMsgBoxCallback); SetPropA(hwnd, "WINE_MSGBOX_HELPCALLBACK", mbp->lpfnMsgBoxCallback);
break; break;
} }

View File

@ -77,11 +77,9 @@ HACCEL WINAPI LoadAcceleratorsW(HINSTANCE instance,LPCWSTR lpTableName)
DWORD size; DWORD size;
if (HIWORD(lpTableName)) if (HIWORD(lpTableName))
TRACE_(accel)("%p '%s'\n", TRACE_(accel)("%p '%s'\n", instance, (const char *)( lpTableName ) );
(LPVOID)instance, (const char *)( lpTableName ) );
else else
TRACE_(accel)("%p 0x%04x\n", TRACE_(accel)("%p 0x%04x\n", instance, LOWORD(lpTableName) );
(LPVOID)instance, LOWORD(lpTableName) );
if (!(hRsrc = FindResourceW( instance, lpTableName, (LPWSTR)RT_ACCELERATOR ))) if (!(hRsrc = FindResourceW( instance, lpTableName, (LPWSTR)RT_ACCELERATOR )))
{ {
@ -156,7 +154,7 @@ INT WINAPI CopyAcceleratorTableW(HACCEL src, LPACCEL dst,
as far as possible. */ as far as possible. */
if((dst && (entries < 1)) || (src == NULL) || !accel) { if((dst && (entries < 1)) || (src == NULL) || !accel) {
WARN_(accel)("Application sent invalid parameters (%p %p %d).\n", WARN_(accel)("Application sent invalid parameters (%p %p %d).\n",
(LPVOID)src, (LPVOID)dst, entries); src, dst, entries);
return 0; return 0;
} }
xsize = GlobalSize16(HACCEL_16(src))/sizeof(ACCEL16); xsize = GlobalSize16(HACCEL_16(src))/sizeof(ACCEL16);

View File

@ -156,8 +156,8 @@ static SCROLLBAR_INFO *SCROLL_GetInternalInfo( HWND hwnd, INT nBar, BOOL alloc )
if (!wndPtr || wndPtr == WND_OTHER_PROCESS || wndPtr == WND_DESKTOP) return NULL; if (!wndPtr || wndPtr == WND_OTHER_PROCESS || wndPtr == WND_DESKTOP) return NULL;
switch(nBar) switch(nBar)
{ {
case SB_HORZ: infoPtr = (SCROLLBAR_INFO *)wndPtr->pHScroll; break; case SB_HORZ: infoPtr = wndPtr->pHScroll; break;
case SB_VERT: infoPtr = (SCROLLBAR_INFO *)wndPtr->pVScroll; break; case SB_VERT: infoPtr = wndPtr->pVScroll; break;
case SB_CTL: infoPtr = (SCROLLBAR_INFO *)wndPtr->wExtra; break; case SB_CTL: infoPtr = (SCROLLBAR_INFO *)wndPtr->wExtra; break;
case SB_BOTH: WARN("with SB_BOTH\n"); break; case SB_BOTH: WARN("with SB_BOTH\n"); break;
} }

View File

@ -151,7 +151,7 @@ static HICON STATIC_SetIcon( HWND hwnd, HICON hicon, DWORD style )
CURSORICONINFO * info; CURSORICONINFO * info;
if ((style & SS_TYPEMASK) != SS_ICON) return 0; if ((style & SS_TYPEMASK) != SS_ICON) return 0;
info = hicon?(CURSORICONINFO *) GlobalLock16(HICON_16(hicon)):NULL; info = hicon ? GlobalLock16(HICON_16(hicon)) : NULL;
if (hicon && !info) { if (hicon && !info) {
WARN("hicon != 0, but info == 0\n"); WARN("hicon != 0, but info == 0\n");
return 0; return 0;
@ -805,7 +805,7 @@ static void STATIC_PaintIconfn( HWND hwnd, HDC hdc, DWORD style )
GetClientRect( hwnd, &rc ); GetClientRect( hwnd, &rc );
hbrush = STATIC_SendWmCtlColorStatic(hwnd, hdc); hbrush = STATIC_SendWmCtlColorStatic(hwnd, hdc);
hIcon = (HICON)GetWindowLongPtrW( hwnd, HICON_GWL_OFFSET ); hIcon = (HICON)GetWindowLongPtrW( hwnd, HICON_GWL_OFFSET );
info = hIcon ? (CURSORICONINFO *)GlobalLock16(HICON_16(hIcon)) : NULL; info = hIcon ? GlobalLock16(HICON_16(hIcon)) : NULL;
if (!hIcon || !info) if (!hIcon || !info)
{ {
FillRect(hdc, &rc, hbrush); FillRect(hdc, &rc, hbrush);

View File

@ -1389,7 +1389,7 @@ BOOL WINAPI SystemParametersInfoW( UINT uiAction, UINT uiParam,
break; break;
case SPI_SETDESKWALLPAPER: /* 20 */ case SPI_SETDESKWALLPAPER: /* 20 */
if (!pvParam || !SetDeskWallPaper( (LPSTR)pvParam )) return FALSE; if (!pvParam || !SetDeskWallPaper( pvParam )) return FALSE;
SYSPARAMS_Save(SPI_SETDESKWALLPAPER_REGKEY, SPI_SETDESKWALLPAPER_VALNAME, pvParam, fWinIni); SYSPARAMS_Save(SPI_SETDESKWALLPAPER_REGKEY, SPI_SETDESKWALLPAPER_VALNAME, pvParam, fWinIni);
break; break;
@ -1404,7 +1404,7 @@ BOOL WINAPI SystemParametersInfoW( UINT uiAction, UINT uiParam,
buf, sizeof(buf)/sizeof(WCHAR) ); buf, sizeof(buf)/sizeof(WCHAR) );
ret = DESKTOP_SetPattern( buf ); ret = DESKTOP_SetPattern( buf );
} else } else
ret = DESKTOP_SetPattern( (LPWSTR)pvParam ); ret = DESKTOP_SetPattern( pvParam );
break; break;
case SPI_GETKEYBOARDDELAY: case SPI_GETKEYBOARDDELAY:
@ -1554,7 +1554,7 @@ BOOL WINAPI SystemParametersInfoW( UINT uiAction, UINT uiParam,
case SPI_SETICONTITLELOGFONT: /* 34 */ case SPI_SETICONTITLELOGFONT: /* 34 */
if( uiParam == sizeof(LOGFONTW)) { if( uiParam == sizeof(LOGFONTW)) {
ret = SYSPARAMS_SaveLogFont( SPI_SETICONTITLELOGFONT_REGKEY, ret = SYSPARAMS_SaveLogFont( SPI_SETICONTITLELOGFONT_REGKEY,
SPI_SETICONTITLELOGFONT_VALNAME, (LOGFONTW *)pvParam, fWinIni); SPI_SETICONTITLELOGFONT_VALNAME, pvParam, fWinIni);
if( ret) { if( ret) {
icon_metrics.lfFont = *(LOGFONTW *)pvParam; icon_metrics.lfFont = *(LOGFONTW *)pvParam;
spi_loaded[SPI_SETICONTITLELOGFONT_IDX] = TRUE; spi_loaded[SPI_SETICONTITLELOGFONT_IDX] = TRUE;
@ -1750,7 +1750,7 @@ BOOL WINAPI SystemParametersInfoW( UINT uiAction, UINT uiParam,
if (!pvParam) return FALSE; if (!pvParam) return FALSE;
spi_idx = SPI_SETWORKAREA_IDX; spi_idx = SPI_SETWORKAREA_IDX;
CopyRect( &work_area, (RECT *)pvParam ); CopyRect( &work_area, pvParam );
spi_loaded[spi_idx] = TRUE; spi_loaded[spi_idx] = TRUE;
break; break;
} }
@ -1768,7 +1768,7 @@ BOOL WINAPI SystemParametersInfoW( UINT uiAction, UINT uiParam,
EnumDisplayMonitors( 0, NULL, enum_monitors, (LPARAM)&work_area ); EnumDisplayMonitors( 0, NULL, enum_monitors, (LPARAM)&work_area );
spi_loaded[spi_idx] = TRUE; spi_loaded[spi_idx] = TRUE;
} }
CopyRect( (RECT *)pvParam, &work_area ); CopyRect( pvParam, &work_area );
TRACE("work area %s\n", wine_dbgstr_rect( &work_area )); TRACE("work area %s\n", wine_dbgstr_rect( &work_area ));
break; break;
} }
@ -1777,7 +1777,7 @@ BOOL WINAPI SystemParametersInfoW( UINT uiAction, UINT uiParam,
case SPI_GETFILTERKEYS: /* 50 */ case SPI_GETFILTERKEYS: /* 50 */
{ {
LPFILTERKEYS lpFilterKeys = (LPFILTERKEYS)pvParam; LPFILTERKEYS lpFilterKeys = pvParam;
WARN("SPI_GETFILTERKEYS not fully implemented\n"); WARN("SPI_GETFILTERKEYS not fully implemented\n");
if (lpFilterKeys && lpFilterKeys->cbSize == sizeof(FILTERKEYS)) if (lpFilterKeys && lpFilterKeys->cbSize == sizeof(FILTERKEYS))
{ {
@ -1798,7 +1798,7 @@ BOOL WINAPI SystemParametersInfoW( UINT uiAction, UINT uiParam,
case SPI_GETTOGGLEKEYS: /* 52 */ case SPI_GETTOGGLEKEYS: /* 52 */
{ {
LPTOGGLEKEYS lpToggleKeys = (LPTOGGLEKEYS)pvParam; LPTOGGLEKEYS lpToggleKeys = pvParam;
WARN("SPI_GETTOGGLEKEYS not fully implemented\n"); WARN("SPI_GETTOGGLEKEYS not fully implemented\n");
if (lpToggleKeys && lpToggleKeys->cbSize == sizeof(TOGGLEKEYS)) if (lpToggleKeys && lpToggleKeys->cbSize == sizeof(TOGGLEKEYS))
{ {
@ -1815,7 +1815,7 @@ BOOL WINAPI SystemParametersInfoW( UINT uiAction, UINT uiParam,
case SPI_GETMOUSEKEYS: /* 54 */ case SPI_GETMOUSEKEYS: /* 54 */
{ {
LPMOUSEKEYS lpMouseKeys = (LPMOUSEKEYS)pvParam; LPMOUSEKEYS lpMouseKeys = pvParam;
WARN("SPI_GETMOUSEKEYS not fully implemented\n"); WARN("SPI_GETMOUSEKEYS not fully implemented\n");
if (lpMouseKeys && lpMouseKeys->cbSize == sizeof(MOUSEKEYS)) if (lpMouseKeys && lpMouseKeys->cbSize == sizeof(MOUSEKEYS))
{ {
@ -1851,7 +1851,7 @@ BOOL WINAPI SystemParametersInfoW( UINT uiAction, UINT uiParam,
case SPI_GETSTICKYKEYS: /* 58 */ case SPI_GETSTICKYKEYS: /* 58 */
{ {
LPSTICKYKEYS lpStickyKeys = (LPSTICKYKEYS)pvParam; LPSTICKYKEYS lpStickyKeys = pvParam;
WARN("SPI_GETSTICKYKEYS not fully implemented\n"); WARN("SPI_GETSTICKYKEYS not fully implemented\n");
if (lpStickyKeys && lpStickyKeys->cbSize == sizeof(STICKYKEYS)) if (lpStickyKeys && lpStickyKeys->cbSize == sizeof(STICKYKEYS))
{ {
@ -1868,7 +1868,7 @@ BOOL WINAPI SystemParametersInfoW( UINT uiAction, UINT uiParam,
case SPI_GETACCESSTIMEOUT: /* 60 */ case SPI_GETACCESSTIMEOUT: /* 60 */
{ {
LPACCESSTIMEOUT lpAccessTimeout = (LPACCESSTIMEOUT)pvParam; LPACCESSTIMEOUT lpAccessTimeout = pvParam;
WARN("SPI_GETACCESSTIMEOUT not fully implemented\n"); WARN("SPI_GETACCESSTIMEOUT not fully implemented\n");
if (lpAccessTimeout && lpAccessTimeout->cbSize == sizeof(ACCESSTIMEOUT)) if (lpAccessTimeout && lpAccessTimeout->cbSize == sizeof(ACCESSTIMEOUT))
{ {
@ -1886,7 +1886,7 @@ BOOL WINAPI SystemParametersInfoW( UINT uiAction, UINT uiParam,
case SPI_GETSERIALKEYS: /* 62 WINVER >= 0x400 */ case SPI_GETSERIALKEYS: /* 62 WINVER >= 0x400 */
{ {
LPSERIALKEYSW lpSerialKeysW = (LPSERIALKEYSW)pvParam; LPSERIALKEYSW lpSerialKeysW = pvParam;
WARN("SPI_GETSERIALKEYS not fully implemented\n"); WARN("SPI_GETSERIALKEYS not fully implemented\n");
if (lpSerialKeysW && lpSerialKeysW->cbSize == sizeof(SERIALKEYSW)) if (lpSerialKeysW && lpSerialKeysW->cbSize == sizeof(SERIALKEYSW))
{ {
@ -1907,7 +1907,7 @@ BOOL WINAPI SystemParametersInfoW( UINT uiAction, UINT uiParam,
case SPI_GETSOUNDSENTRY: /* 64 */ case SPI_GETSOUNDSENTRY: /* 64 */
{ {
LPSOUNDSENTRYW lpSoundSentryW = (LPSOUNDSENTRYW)pvParam; LPSOUNDSENTRYW lpSoundSentryW = pvParam;
WARN("SPI_GETSOUNDSENTRY not fully implemented\n"); WARN("SPI_GETSOUNDSENTRY not fully implemented\n");
if (lpSoundSentryW && lpSoundSentryW->cbSize == sizeof(SOUNDSENTRYW)) if (lpSoundSentryW && lpSoundSentryW->cbSize == sizeof(SOUNDSENTRYW))
{ {
@ -1934,7 +1934,7 @@ BOOL WINAPI SystemParametersInfoW( UINT uiAction, UINT uiParam,
case SPI_GETHIGHCONTRAST: /* 66 WINVER >= 0x400 */ case SPI_GETHIGHCONTRAST: /* 66 WINVER >= 0x400 */
{ {
LPHIGHCONTRASTW lpHighContrastW = (LPHIGHCONTRASTW)pvParam; LPHIGHCONTRASTW lpHighContrastW = pvParam;
WARN("SPI_GETHIGHCONTRAST not fully implemented\n"); WARN("SPI_GETHIGHCONTRAST not fully implemented\n");
if (lpHighContrastW && lpHighContrastW->cbSize == sizeof(HIGHCONTRASTW)) if (lpHighContrastW && lpHighContrastW->cbSize == sizeof(HIGHCONTRASTW))
{ {
@ -1980,7 +1980,7 @@ BOOL WINAPI SystemParametersInfoW( UINT uiAction, UINT uiParam,
case SPI_GETANIMATION: /* 72 WINVER >= 0x400 */ case SPI_GETANIMATION: /* 72 WINVER >= 0x400 */
{ {
LPANIMATIONINFO lpAnimInfo = (LPANIMATIONINFO)pvParam; LPANIMATIONINFO lpAnimInfo = pvParam;
/* Tell it "disabled" */ /* Tell it "disabled" */
if (lpAnimInfo && lpAnimInfo->cbSize == sizeof(ANIMATIONINFO)) if (lpAnimInfo && lpAnimInfo->cbSize == sizeof(ANIMATIONINFO))
@ -2212,12 +2212,12 @@ BOOL WINAPI SystemParametersInfoW( UINT uiAction, UINT uiParam,
if (SYSPARAMS_Load(SPI_SETDESKWALLPAPER_REGKEY, SPI_SETDESKWALLPAPER_VALNAME, buf, sizeof(buf))) if (SYSPARAMS_Load(SPI_SETDESKWALLPAPER_REGKEY, SPI_SETDESKWALLPAPER_VALNAME, buf, sizeof(buf)))
{ {
lstrcpynW((WCHAR*)pvParam, buf, uiParam); lstrcpynW(pvParam, buf, uiParam);
} }
else else
{ {
/* Return an empty string */ /* Return an empty string */
memset((WCHAR*)pvParam, 0, uiParam); memset(pvParam, 0, uiParam);
} }
break; break;
@ -2563,7 +2563,7 @@ BOOL16 WINAPI SystemParametersInfo16( UINT16 uAction, UINT16 uParam,
ret = SystemParametersInfoA( uAction, uParam, lpvParam ? &tmp : NULL, fuWinIni ); ret = SystemParametersInfoA( uAction, uParam, lpvParam ? &tmp : NULL, fuWinIni );
if (ret && lpvParam) if (ret && lpvParam)
{ {
RECT16 *r16 = (RECT16 *)lpvParam; RECT16 *r16 = lpvParam;
r16->left = tmp.left; r16->left = tmp.left;
r16->top = tmp.top; r16->top = tmp.top;
r16->right = tmp.right; r16->right = tmp.right;
@ -2607,8 +2607,8 @@ BOOL WINAPI SystemParametersInfoA( UINT uiAction, UINT uiParam,
{ {
WCHAR buffer[256]; WCHAR buffer[256];
if (pvParam) if (pvParam)
if (!MultiByteToWideChar( CP_ACP, 0, (LPSTR)pvParam, -1, if (!MultiByteToWideChar( CP_ACP, 0, pvParam, -1, buffer,
buffer, sizeof(buffer)/sizeof(WCHAR) )) sizeof(buffer)/sizeof(WCHAR) ))
buffer[sizeof(buffer)/sizeof(WCHAR)-1] = 0; buffer[sizeof(buffer)/sizeof(WCHAR)-1] = 0;
ret = SystemParametersInfoW( uiAction, uiParam, pvParam ? buffer : NULL, fuWinIni ); ret = SystemParametersInfoW( uiAction, uiParam, pvParam ? buffer : NULL, fuWinIni );
break; break;
@ -2619,14 +2619,14 @@ BOOL WINAPI SystemParametersInfoA( UINT uiAction, UINT uiParam,
LOGFONTW tmp; LOGFONTW tmp;
ret = SystemParametersInfoW( uiAction, uiParam, pvParam ? &tmp : NULL, fuWinIni ); ret = SystemParametersInfoW( uiAction, uiParam, pvParam ? &tmp : NULL, fuWinIni );
if (ret && pvParam) if (ret && pvParam)
SYSPARAMS_LogFont32WTo32A( &tmp, (LPLOGFONTA)pvParam ); SYSPARAMS_LogFont32WTo32A( &tmp, pvParam );
break; break;
} }
case SPI_GETNONCLIENTMETRICS: /* 41 WINVER >= 0x400 */ case SPI_GETNONCLIENTMETRICS: /* 41 WINVER >= 0x400 */
{ {
NONCLIENTMETRICSW tmp; NONCLIENTMETRICSW tmp;
LPNONCLIENTMETRICSA lpnmA = (LPNONCLIENTMETRICSA)pvParam; LPNONCLIENTMETRICSA lpnmA = pvParam;
if (lpnmA && lpnmA->cbSize == sizeof(NONCLIENTMETRICSA)) if (lpnmA && lpnmA->cbSize == sizeof(NONCLIENTMETRICSA))
{ {
tmp.cbSize = sizeof(NONCLIENTMETRICSW); tmp.cbSize = sizeof(NONCLIENTMETRICSW);
@ -2642,7 +2642,7 @@ BOOL WINAPI SystemParametersInfoA( UINT uiAction, UINT uiParam,
case SPI_SETNONCLIENTMETRICS: /* 42 WINVER >= 0x400 */ case SPI_SETNONCLIENTMETRICS: /* 42 WINVER >= 0x400 */
{ {
NONCLIENTMETRICSW tmp; NONCLIENTMETRICSW tmp;
LPNONCLIENTMETRICSA lpnmA = (LPNONCLIENTMETRICSA)pvParam; LPNONCLIENTMETRICSA lpnmA = pvParam;
if (lpnmA && lpnmA->cbSize == sizeof(NONCLIENTMETRICSA)) if (lpnmA && lpnmA->cbSize == sizeof(NONCLIENTMETRICSA))
{ {
tmp.cbSize = sizeof(NONCLIENTMETRICSW); tmp.cbSize = sizeof(NONCLIENTMETRICSW);
@ -2657,7 +2657,7 @@ BOOL WINAPI SystemParametersInfoA( UINT uiAction, UINT uiParam,
case SPI_GETICONMETRICS: /* 45 WINVER >= 0x400 */ case SPI_GETICONMETRICS: /* 45 WINVER >= 0x400 */
{ {
ICONMETRICSW tmp; ICONMETRICSW tmp;
LPICONMETRICSA lpimA = (LPICONMETRICSA)pvParam; LPICONMETRICSA lpimA = pvParam;
if (lpimA && lpimA->cbSize == sizeof(ICONMETRICSA)) if (lpimA && lpimA->cbSize == sizeof(ICONMETRICSA))
{ {
tmp.cbSize = sizeof(ICONMETRICSW); tmp.cbSize = sizeof(ICONMETRICSW);
@ -2678,7 +2678,7 @@ BOOL WINAPI SystemParametersInfoA( UINT uiAction, UINT uiParam,
case SPI_SETICONMETRICS: /* 46 WINVER >= 0x400 */ case SPI_SETICONMETRICS: /* 46 WINVER >= 0x400 */
{ {
ICONMETRICSW tmp; ICONMETRICSW tmp;
LPICONMETRICSA lpimA = (LPICONMETRICSA)pvParam; LPICONMETRICSA lpimA = pvParam;
if (lpimA && lpimA->cbSize == sizeof(ICONMETRICSA)) if (lpimA && lpimA->cbSize == sizeof(ICONMETRICSA))
{ {
tmp.cbSize = sizeof(ICONMETRICSW); tmp.cbSize = sizeof(ICONMETRICSW);
@ -2696,7 +2696,7 @@ BOOL WINAPI SystemParametersInfoA( UINT uiAction, UINT uiParam,
case SPI_GETHIGHCONTRAST: /* 66 WINVER >= 0x400 */ case SPI_GETHIGHCONTRAST: /* 66 WINVER >= 0x400 */
{ {
HIGHCONTRASTW tmp; HIGHCONTRASTW tmp;
LPHIGHCONTRASTA lphcA = (LPHIGHCONTRASTA)pvParam; LPHIGHCONTRASTA lphcA = pvParam;
if (lphcA && lphcA->cbSize == sizeof(HIGHCONTRASTA)) if (lphcA && lphcA->cbSize == sizeof(HIGHCONTRASTA))
{ {
tmp.cbSize = sizeof(HIGHCONTRASTW); tmp.cbSize = sizeof(HIGHCONTRASTW);

View File

@ -764,7 +764,7 @@ static BOOL UITOOLS95_DFC_ButtonRadio(HDC dc, LPRECT r, UINT uFlags)
if(BorderShrink < 1) BorderShrink = 1; if(BorderShrink < 1) BorderShrink = 1;
if((uFlags & 0xff) == DFCS_BUTTONRADIOIMAGE) if((uFlags & 0xff) == DFCS_BUTTONRADIOIMAGE)
FillRect(dc, r, (HBRUSH)GetStockObject(BLACK_BRUSH)); FillRect(dc, r, GetStockObject(BLACK_BRUSH));
xc = myr.left + SmallDiam - SmallDiam/2; xc = myr.left + SmallDiam - SmallDiam/2;
yc = myr.top + SmallDiam - SmallDiam/2; yc = myr.top + SmallDiam - SmallDiam/2;
@ -1145,7 +1145,7 @@ static BOOL UITOOLS95_DrawFrameMenu(HDC dc, LPRECT r, UINT uFlags)
/* without luck. It seems as if this behavior is inherited from the */ /* without luck. It seems as if this behavior is inherited from the */
/* win31 DFC() implementation... (you remember, B/W menus). */ /* win31 DFC() implementation... (you remember, B/W menus). */
FillRect(dc, r, (HBRUSH)GetStockObject(WHITE_BRUSH)); FillRect(dc, r, GetStockObject(WHITE_BRUSH));
hbsave = SelectObject(dc, GetStockObject(BLACK_BRUSH)); hbsave = SelectObject(dc, GetStockObject(BLACK_BRUSH));
hpsave = SelectObject(dc, GetStockObject(BLACK_PEN)); hpsave = SelectObject(dc, GetStockObject(BLACK_PEN));
@ -1667,7 +1667,7 @@ static BOOL UITOOLS_DrawState(HDC hdc, HBRUSH hbr, DRAWSTATEPROC func, LPARAM lp
rc.left = rc.top = 0; rc.left = rc.top = 0;
rc.right = cx; rc.right = cx;
rc.bottom = cy; rc.bottom = cy;
if(!FillRect(memdc, &rc, (HBRUSH)GetStockObject(WHITE_BRUSH))) goto cleanup; if(!FillRect(memdc, &rc, GetStockObject(WHITE_BRUSH))) goto cleanup;
SetBkColor(memdc, RGB(255, 255, 255)); SetBkColor(memdc, RGB(255, 255, 255));
SetTextColor(memdc, RGB(0, 0, 0)); SetTextColor(memdc, RGB(0, 0, 0));
hfsave = SelectObject(memdc, GetCurrentObject(hdc, OBJ_FONT)); hfsave = SelectObject(memdc, GetCurrentObject(hdc, OBJ_FONT));

View File

@ -983,7 +983,7 @@ static HWND WIN_CreateWindowEx( CREATESTRUCTA *cs, LPCWSTR className, UINT flags
mdi_cs.style = cs->style; mdi_cs.style = cs->style;
mdi_cs.lParam = (LPARAM)cs->lpCreateParams; mdi_cs.lParam = (LPARAM)cs->lpCreateParams;
cs->lpCreateParams = (LPVOID)&mdi_cs; cs->lpCreateParams = &mdi_cs;
if (GetWindowLongW(cs->hwndParent, GWL_STYLE) & MDIS_ALLCHILDSTYLES) if (GetWindowLongW(cs->hwndParent, GWL_STYLE) & MDIS_ALLCHILDSTYLES)
{ {

View File

@ -2063,7 +2063,7 @@ HDWP WINAPI BeginDeferWindowPos( INT count )
handle = USER_HEAP_ALLOC( sizeof(DWP) + (count-1)*sizeof(WINDOWPOS) ); handle = USER_HEAP_ALLOC( sizeof(DWP) + (count-1)*sizeof(WINDOWPOS) );
if (!handle) return 0; if (!handle) return 0;
pDWP = (DWP *) USER_HEAP_LIN_ADDR( handle ); pDWP = USER_HEAP_LIN_ADDR( handle );
pDWP->actualCount = 0; pDWP->actualCount = 0;
pDWP->suggestedCount = count; pDWP->suggestedCount = count;
pDWP->valid = TRUE; pDWP->valid = TRUE;
@ -2134,7 +2134,7 @@ HDWP WINAPI DeferWindowPos( HDWP hdwp, HWND hwnd, HWND hwndAfter,
retvalue = 0; retvalue = 0;
goto END; goto END;
} }
pDWP = (DWP *) USER_HEAP_LIN_ADDR( newhdwp ); pDWP = USER_HEAP_LIN_ADDR( newhdwp );
pDWP->suggestedCount++; pDWP->suggestedCount++;
} }
pDWP->winPos[pDWP->actualCount].hwnd = hwnd; pDWP->winPos[pDWP->actualCount].hwnd = hwnd;
@ -2164,7 +2164,7 @@ BOOL WINAPI EndDeferWindowPos( HDWP hdwp )
TRACE("%p\n", hdwp); TRACE("%p\n", hdwp);
pDWP = (DWP *) USER_HEAP_LIN_ADDR( hdwp ); pDWP = USER_HEAP_LIN_ADDR( hdwp );
if (!pDWP) return FALSE; if (!pDWP) return FALSE;
for (i = 0, winpos = pDWP->winPos; res && i < pDWP->actualCount; i++, winpos++) for (i = 0, winpos = pDWP->winPos; res && i < pDWP->actualCount; i++, winpos++)
{ {

View File

@ -1641,7 +1641,7 @@ LRESULT WINPROC_CallProc32ATo16( winproc_callback16_t callback, HWND hwnd, UINT
if (mdi_child) if (mdi_child)
{ {
MDICREATESTRUCTA *mdi_cs = (MDICREATESTRUCTA *)cs32->lpCreateParams; MDICREATESTRUCTA *mdi_cs = cs32->lpCreateParams;
MDICREATESTRUCT32Ato16( mdi_cs, &mdi_cs16 ); MDICREATESTRUCT32Ato16( mdi_cs, &mdi_cs16 );
mdi_cs16.szTitle = MapLS( mdi_cs->szTitle ); mdi_cs16.szTitle = MapLS( mdi_cs->szTitle );
mdi_cs16.szClass = MapLS( mdi_cs->szClass ); mdi_cs16.szClass = MapLS( mdi_cs->szClass );
@ -1680,7 +1680,7 @@ LRESULT WINPROC_CallProc32ATo16( winproc_callback16_t callback, HWND hwnd, UINT
ret = callback( HWND_16(hwnd), msg, ((HWND)lParam == hwnd), ret = callback( HWND_16(hwnd), msg, ((HWND)lParam == hwnd),
MAKELPARAM( LOWORD(lParam), LOWORD(wParam) ), result, arg ); MAKELPARAM( LOWORD(lParam), LOWORD(wParam) ), result, arg );
else else
ret = callback( HWND_16(hwnd), msg, HWND_16( (HWND)wParam ), 0, result, arg ); ret = callback( HWND_16(hwnd), msg, HWND_16( wParam ), 0, result, arg );
break; break;
case WM_MDIGETACTIVE: case WM_MDIGETACTIVE:
ret = callback( HWND_16(hwnd), msg, wParam, lParam, result, arg ); ret = callback( HWND_16(hwnd), msg, wParam, lParam, result, arg );
@ -1916,7 +1916,7 @@ LRESULT WINPROC_CallProc32ATo16( winproc_callback16_t callback, HWND hwnd, UINT
ret = callback( HWND_16(hwnd), msg, wParam, lParam, result, arg ); ret = callback( HWND_16(hwnd), msg, wParam, lParam, result, arg );
break; break;
case WM_ACTIVATEAPP: case WM_ACTIVATEAPP:
ret = callback( HWND_16(hwnd), msg, wParam, HTASK_16( (HANDLE)lParam ), result, arg ); ret = callback( HWND_16(hwnd), msg, wParam, HTASK_16( lParam ), result, arg );
break; break;
case WM_PAINT: case WM_PAINT:
if (IsIconic( hwnd ) && GetClassLongPtrW( hwnd, GCLP_HICON )) if (IsIconic( hwnd ) && GetClassLongPtrW( hwnd, GCLP_HICON ))
@ -1932,7 +1932,7 @@ LRESULT WINPROC_CallProc32ATo16( winproc_callback16_t callback, HWND hwnd, UINT
case WM_DDE_TERMINATE: case WM_DDE_TERMINATE:
case WM_DDE_UNADVISE: case WM_DDE_UNADVISE:
case WM_DDE_REQUEST: case WM_DDE_REQUEST:
ret = callback( HWND_16(hwnd), msg, HWND_16((HWND)wParam), lParam, result, arg ); ret = callback( HWND_16(hwnd), msg, HWND_16(wParam), lParam, result, arg );
break; break;
case WM_DDE_ADVISE: case WM_DDE_ADVISE:
case WM_DDE_DATA: case WM_DDE_DATA:
@ -1943,7 +1943,7 @@ LRESULT WINPROC_CallProc32ATo16( winproc_callback16_t callback, HWND hwnd, UINT
UnpackDDElParam( msg, lParam, &lo32, &hi ); UnpackDDElParam( msg, lParam, &lo32, &hi );
if (lo32 && !(lo16 = convert_handle_32_to_16(lo32, GMEM_DDESHARE))) break; if (lo32 && !(lo16 = convert_handle_32_to_16(lo32, GMEM_DDESHARE))) break;
ret = callback( HWND_16(hwnd), msg, HWND_16((HWND)wParam), ret = callback( HWND_16(hwnd), msg, HWND_16(wParam),
MAKELPARAM(lo16, hi), result, arg ); MAKELPARAM(lo16, hi), result, arg );
} }
break; /* FIXME don't know how to free allocated memory (handle) !! */ break; /* FIXME don't know how to free allocated memory (handle) !! */
@ -1975,7 +1975,7 @@ LRESULT WINPROC_CallProc32ATo16( winproc_callback16_t callback, HWND hwnd, UINT
hi = convert_handle_32_to_16(hi, GMEM_DDESHARE); hi = convert_handle_32_to_16(hi, GMEM_DDESHARE);
break; break;
} }
ret = callback( HWND_16(hwnd), msg, HWND_16((HWND)wParam), ret = callback( HWND_16(hwnd), msg, HWND_16(wParam),
MAKELPARAM(lo, hi), result, arg ); MAKELPARAM(lo, hi), result, arg );
} }
break; /* FIXME don't know how to free allocated memory (handle) !! */ break; /* FIXME don't know how to free allocated memory (handle) !! */