gdi32: Fix compilation warnings in 64-bit mode.
This commit is contained in:
parent
e98ec6db4c
commit
edbc6e7b8a
@ -392,7 +392,7 @@ HFONT EMFDRV_SelectFont( PHYSDEV dev, HFONT hFont, HANDLE gdiFont )
|
|||||||
/******************************************************************
|
/******************************************************************
|
||||||
* EMFDRV_CreatePenIndirect
|
* EMFDRV_CreatePenIndirect
|
||||||
*/
|
*/
|
||||||
static HPEN EMFDRV_CreatePenIndirect(PHYSDEV dev, HPEN hPen )
|
static DWORD EMFDRV_CreatePenIndirect(PHYSDEV dev, HPEN hPen)
|
||||||
{
|
{
|
||||||
EMRCREATEPEN emr;
|
EMRCREATEPEN emr;
|
||||||
DWORD index = 0;
|
DWORD index = 0;
|
||||||
@ -423,7 +423,7 @@ static HPEN EMFDRV_CreatePenIndirect(PHYSDEV dev, HPEN hPen )
|
|||||||
|
|
||||||
if(!EMFDRV_WriteRecord( dev, &emr.emr ))
|
if(!EMFDRV_WriteRecord( dev, &emr.emr ))
|
||||||
index = 0;
|
index = 0;
|
||||||
return (HPEN)index;
|
return index;
|
||||||
}
|
}
|
||||||
|
|
||||||
/******************************************************************
|
/******************************************************************
|
||||||
@ -453,7 +453,7 @@ HPEN EMFDRV_SelectPen(PHYSDEV dev, HPEN hPen )
|
|||||||
if((index = EMFDRV_FindObject(dev, hPen)) != 0)
|
if((index = EMFDRV_FindObject(dev, hPen)) != 0)
|
||||||
goto found;
|
goto found;
|
||||||
|
|
||||||
if (!(index = (DWORD)EMFDRV_CreatePenIndirect(dev, hPen ))) return 0;
|
if (!(index = EMFDRV_CreatePenIndirect(dev, hPen))) return 0;
|
||||||
GDI_hdc_using_object(hPen, physDev->hdc);
|
GDI_hdc_using_object(hPen, physDev->hdc);
|
||||||
|
|
||||||
found:
|
found:
|
||||||
|
@ -356,7 +356,7 @@ DWORD WINAPI GdiGetCodePage( HDC hdc )
|
|||||||
int charset = GetTextCharset(hdc);
|
int charset = GetTextCharset(hdc);
|
||||||
|
|
||||||
/* Hmm, nicely designed api this one! */
|
/* Hmm, nicely designed api this one! */
|
||||||
if(TranslateCharsetInfo((DWORD*)charset, &csi, TCI_SRCCHARSET))
|
if(TranslateCharsetInfo(ULongToPtr(charset), &csi, TCI_SRCCHARSET))
|
||||||
cp = csi.ciACP;
|
cp = csi.ciACP;
|
||||||
else {
|
else {
|
||||||
switch(charset) {
|
switch(charset) {
|
||||||
@ -2653,7 +2653,7 @@ DWORD WINAPI GetKerningPairsA( HDC hDC, DWORD cPairs,
|
|||||||
}
|
}
|
||||||
|
|
||||||
charset = GetTextCharset(hDC);
|
charset = GetTextCharset(hDC);
|
||||||
if (!TranslateCharsetInfo((DWORD *)charset, &csi, TCI_SRCCHARSET))
|
if (!TranslateCharsetInfo(ULongToPtr(charset), &csi, TCI_SRCCHARSET))
|
||||||
{
|
{
|
||||||
FIXME("Can't find codepage for charset %d\n", charset);
|
FIXME("Can't find codepage for charset %d\n", charset);
|
||||||
return 0;
|
return 0;
|
||||||
@ -2762,10 +2762,10 @@ BOOL WINAPI TranslateCharsetInfo(
|
|||||||
while (!(*lpSrc>>index & 0x0001) && index<MAXTCIINDEX) index++;
|
while (!(*lpSrc>>index & 0x0001) && index<MAXTCIINDEX) index++;
|
||||||
break;
|
break;
|
||||||
case TCI_SRCCODEPAGE:
|
case TCI_SRCCODEPAGE:
|
||||||
while ((UINT) (lpSrc) != FONT_tci[index].ciACP && index < MAXTCIINDEX) index++;
|
while (PtrToUlong(lpSrc) != FONT_tci[index].ciACP && index < MAXTCIINDEX) index++;
|
||||||
break;
|
break;
|
||||||
case TCI_SRCCHARSET:
|
case TCI_SRCCHARSET:
|
||||||
while ((UINT) (lpSrc) != FONT_tci[index].ciCharset && index < MAXTCIINDEX) index++;
|
while (PtrToUlong(lpSrc) != FONT_tci[index].ciCharset && index < MAXTCIINDEX) index++;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
@ -485,7 +485,7 @@ static UINT get_default_charset( void )
|
|||||||
|
|
||||||
uACP = GetACP();
|
uACP = GetACP();
|
||||||
csi.ciCharset = ANSI_CHARSET;
|
csi.ciCharset = ANSI_CHARSET;
|
||||||
if ( ! TranslateCharsetInfo( (LPDWORD)uACP, &csi, TCI_SRCCODEPAGE ) )
|
if ( !TranslateCharsetInfo( ULongToPtr(uACP), &csi, TCI_SRCCODEPAGE ) )
|
||||||
{
|
{
|
||||||
FIXME( "unhandled codepage %u - use ANSI_CHARSET for default stock objects\n", uACP );
|
FIXME( "unhandled codepage %u - use ANSI_CHARSET for default stock objects\n", uACP );
|
||||||
return ANSI_CHARSET;
|
return ANSI_CHARSET;
|
||||||
@ -1157,7 +1157,7 @@ HGDIOBJ WINAPI SelectObject( HDC hdc, HGDIOBJ hObj )
|
|||||||
if (header->funcs && header->funcs->pSelectObject)
|
if (header->funcs && header->funcs->pSelectObject)
|
||||||
{
|
{
|
||||||
ret = header->funcs->pSelectObject( hObj, header, hdc );
|
ret = header->funcs->pSelectObject( hObj, header, hdc );
|
||||||
if (ret && ret != hObj && (INT)ret > COMPLEXREGION)
|
if (ret && ret != hObj && HandleToULong(ret) > COMPLEXREGION)
|
||||||
{
|
{
|
||||||
inc_ref_count( hObj );
|
inc_ref_count( hObj );
|
||||||
dec_ref_count( ret );
|
dec_ref_count( ret );
|
||||||
|
@ -87,7 +87,7 @@ MFDRV_ExtTextOut( PHYSDEV dev, INT x, INT y, UINT flags,
|
|||||||
int charset = GetTextCharset(physDev->hdc);
|
int charset = GetTextCharset(physDev->hdc);
|
||||||
UINT cp = CP_ACP;
|
UINT cp = CP_ACP;
|
||||||
|
|
||||||
if(TranslateCharsetInfo((DWORD*)charset, &csi, TCI_SRCCHARSET))
|
if(TranslateCharsetInfo(ULongToPtr(charset), &csi, TCI_SRCCHARSET))
|
||||||
cp = csi.ciACP;
|
cp = csi.ciACP;
|
||||||
else {
|
else {
|
||||||
switch(charset) {
|
switch(charset) {
|
||||||
|
@ -804,7 +804,7 @@ DWORD WINAPI DrvGetPrinterData16(LPSTR lpPrinter, LPSTR lpProfile,
|
|||||||
strcpy(RegStr_Printer, Printers);
|
strcpy(RegStr_Printer, Printers);
|
||||||
strcat(RegStr_Printer, lpPrinter);
|
strcat(RegStr_Printer, lpPrinter);
|
||||||
|
|
||||||
if (((DWORD)lpProfile == INT_PD_DEFAULT_DEVMODE) || (HIWORD(lpProfile) &&
|
if ((PtrToUlong(lpProfile) == INT_PD_DEFAULT_DEVMODE) || (HIWORD(lpProfile) &&
|
||||||
(!strcmp(lpProfile, DefaultDevMode)))) {
|
(!strcmp(lpProfile, DefaultDevMode)))) {
|
||||||
size = DrvGetPrinterDataInternal(RegStr_Printer, lpPrinterData, cbData,
|
size = DrvGetPrinterDataInternal(RegStr_Printer, lpPrinterData, cbData,
|
||||||
INT_PD_DEFAULT_DEVMODE);
|
INT_PD_DEFAULT_DEVMODE);
|
||||||
@ -816,7 +816,7 @@ DWORD WINAPI DrvGetPrinterData16(LPSTR lpPrinter, LPSTR lpProfile,
|
|||||||
else res = ERROR_INVALID_PRINTER_NAME;
|
else res = ERROR_INVALID_PRINTER_NAME;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
if (((DWORD)lpProfile == INT_PD_DEFAULT_MODEL) || (HIWORD(lpProfile) &&
|
if ((PtrToUlong(lpProfile) == INT_PD_DEFAULT_MODEL) || (HIWORD(lpProfile) &&
|
||||||
(!strcmp(lpProfile, PrinterModel)))) {
|
(!strcmp(lpProfile, PrinterModel)))) {
|
||||||
*lpNeeded = 32;
|
*lpNeeded = 32;
|
||||||
if (!lpPrinterData) goto failed;
|
if (!lpPrinterData) goto failed;
|
||||||
@ -890,7 +890,7 @@ DWORD WINAPI DrvSetPrinterData16(LPSTR lpPrinter, LPSTR lpProfile,
|
|||||||
TRACE("lpType %08x\n",lpType);
|
TRACE("lpType %08x\n",lpType);
|
||||||
|
|
||||||
if ((!lpPrinter) || (!lpProfile) ||
|
if ((!lpPrinter) || (!lpProfile) ||
|
||||||
((DWORD)lpProfile == INT_PD_DEFAULT_MODEL) || (HIWORD(lpProfile) &&
|
(PtrToUlong(lpProfile) == INT_PD_DEFAULT_MODEL) || (HIWORD(lpProfile) &&
|
||||||
(!strcmp(lpProfile, PrinterModel))))
|
(!strcmp(lpProfile, PrinterModel))))
|
||||||
return ERROR_INVALID_PARAMETER;
|
return ERROR_INVALID_PARAMETER;
|
||||||
|
|
||||||
@ -899,7 +899,7 @@ DWORD WINAPI DrvSetPrinterData16(LPSTR lpPrinter, LPSTR lpProfile,
|
|||||||
strcpy(RegStr_Printer, Printers);
|
strcpy(RegStr_Printer, Printers);
|
||||||
strcat(RegStr_Printer, lpPrinter);
|
strcat(RegStr_Printer, lpPrinter);
|
||||||
|
|
||||||
if (((DWORD)lpProfile == INT_PD_DEFAULT_DEVMODE) || (HIWORD(lpProfile) &&
|
if ((PtrToUlong(lpProfile) == INT_PD_DEFAULT_DEVMODE) || (HIWORD(lpProfile) &&
|
||||||
(!strcmp(lpProfile, DefaultDevMode)))) {
|
(!strcmp(lpProfile, DefaultDevMode)))) {
|
||||||
if ( RegOpenKeyA(HKEY_LOCAL_MACHINE, RegStr_Printer, &hkey)
|
if ( RegOpenKeyA(HKEY_LOCAL_MACHINE, RegStr_Printer, &hkey)
|
||||||
!= ERROR_SUCCESS ||
|
!= ERROR_SUCCESS ||
|
||||||
|
@ -551,7 +551,7 @@ static BOOL REGION_DeleteObject( HGDIOBJ handle, void *obj )
|
|||||||
*/
|
*/
|
||||||
static HGDIOBJ REGION_SelectObject( HGDIOBJ handle, void *obj, HDC hdc )
|
static HGDIOBJ REGION_SelectObject( HGDIOBJ handle, void *obj, HDC hdc )
|
||||||
{
|
{
|
||||||
return (HGDIOBJ)SelectClipRgn( hdc, handle );
|
return ULongToHandle(SelectClipRgn( hdc, handle ));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user