Commit eb53c025 authored by Matthew Davison's avatar Matthew Davison Committed by Alexandre Julliard

Fixed some handle conversions for -DSTRICT.

parent 2339b83e
...@@ -478,7 +478,7 @@ static void CC_PaintTriangle( HWND hDlg, int y) ...@@ -478,7 +478,7 @@ static void CC_PaintTriangle( HWND hDlg, int y)
points[2].y = points[0].y - w; points[2].y = points[0].y - w;
points[2].x = points[1].x = points[0].x + w; points[2].x = points[1].x = points[0].x + w;
FillRect(hDC, &lpp->old3angle, GetClassLongA( hwnd, GCL_HBRBACKGROUND)); FillRect(hDC, &lpp->old3angle, (HBRUSH)GetClassLongA( hwnd, GCL_HBRBACKGROUND));
lpp->old3angle.left = points[0].x; lpp->old3angle.left = points[0].x;
lpp->old3angle.right = points[1].x + 1; lpp->old3angle.right = points[1].x + 1;
lpp->old3angle.top = points[2].y - 1; lpp->old3angle.top = points[2].y - 1;
...@@ -735,7 +735,7 @@ static void CC_PaintPredefColorArray( HWND hDlg, int rows, int cols) ...@@ -735,7 +735,7 @@ static void CC_PaintPredefColorArray( HWND hDlg, int rows, int cols)
hdc = GetDC(hwnd); hdc = GetDC(hwnd);
GetClientRect(hwnd, &rect); GetClientRect(hwnd, &rect);
FillRect(hdc, &rect, GetClassLongA(hwnd, GCL_HBRBACKGROUND)); FillRect(hdc, &rect, (HBRUSH)GetClassLongA(hwnd, GCL_HBRBACKGROUND));
for ( j = 0; j < rows; j++ ) for ( j = 0; j < rows; j++ )
{ {
for ( i = 0; i < cols; i++ ) for ( i = 0; i < cols; i++ )
...@@ -779,7 +779,7 @@ static void CC_PaintUserColorArray( HWND hDlg, int rows, int cols, COLORREF* lpc ...@@ -779,7 +779,7 @@ static void CC_PaintUserColorArray( HWND hDlg, int rows, int cols, COLORREF* lpc
hdc = GetDC(hwnd); hdc = GetDC(hwnd);
if (hdc) if (hdc)
{ {
FillRect(hdc, &rect, GetClassLongA(hwnd, GCL_HBRBACKGROUND) ); FillRect(hdc, &rect, (HBRUSH)GetClassLongA(hwnd, GCL_HBRBACKGROUND) );
for (j = 0; j < rows; j++) for (j = 0; j < rows; j++)
{ {
for (i = 0; i < cols; i++) for (i = 0; i < cols; i++)
......
...@@ -1045,7 +1045,7 @@ void FILEDLG_MapDrawItemStruct(LPDRAWITEMSTRUCT16 lpdis16, LPDRAWITEMSTRUCT lpdi ...@@ -1045,7 +1045,7 @@ void FILEDLG_MapDrawItemStruct(LPDRAWITEMSTRUCT16 lpdis16, LPDRAWITEMSTRUCT lpdi
lpdis->itemAction = lpdis16->itemAction; lpdis->itemAction = lpdis16->itemAction;
lpdis->itemState = lpdis16->itemState; lpdis->itemState = lpdis16->itemState;
lpdis->hwndItem = HWND_32(lpdis16->hwndItem); lpdis->hwndItem = HWND_32(lpdis16->hwndItem);
lpdis->hDC = lpdis16->hDC; lpdis->hDC = HDC_32(lpdis16->hDC);
lpdis->rcItem.right = lpdis16->rcItem.right; lpdis->rcItem.right = lpdis16->rcItem.right;
lpdis->rcItem.left = lpdis16->rcItem.left; lpdis->rcItem.left = lpdis16->rcItem.left;
lpdis->rcItem.top = lpdis16->rcItem.top; lpdis->rcItem.top = lpdis16->rcItem.top;
......
...@@ -721,7 +721,7 @@ static LRESULT CFn_WMInitDialog(HWND hDlg, WPARAM wParam, LPARAM lParam, ...@@ -721,7 +721,7 @@ static LRESULT CFn_WMInitDialog(HWND hDlg, WPARAM wParam, LPARAM lParam,
/* This font will be deleted by WM_COMMAND */ /* This font will be deleted by WM_COMMAND */
SendDlgItemMessageA(hDlg,stc6,WM_SETFONT, SendDlgItemMessageA(hDlg,stc6,WM_SETFONT,
CreateFontA(0, 0, 1, 1, 400, 0, 0, 0, 0, 0, 0, 0, 0, NULL),FALSE); (WPARAM)CreateFontA(0, 0, 1, 1, 400, 0, 0, 0, 0, 0, 0, 0, 0, NULL),FALSE);
if (!(lpcf->Flags & CF_SHOWHELP) || !IsWindow(lpcf->hwndOwner)) if (!(lpcf->Flags & CF_SHOWHELP) || !IsWindow(lpcf->hwndOwner))
ShowWindow(GetDlgItem(hDlg,pshHelp),SW_HIDE); ShowWindow(GetDlgItem(hDlg,pshHelp),SW_HIDE);
...@@ -962,7 +962,7 @@ static LRESULT CFn_WMCtlColorStatic(HWND hDlg, WPARAM wParam, LPARAM lParam, ...@@ -962,7 +962,7 @@ static LRESULT CFn_WMCtlColorStatic(HWND hDlg, WPARAM wParam, LPARAM lParam,
if (GetDlgCtrlID(HWND_32(LOWORD(lParam)))==stc6) if (GetDlgCtrlID(HWND_32(LOWORD(lParam)))==stc6)
{ {
SetTextColor((HDC)wParam, lpcf->rgbColors); SetTextColor((HDC)wParam, lpcf->rgbColors);
return GetStockObject(WHITE_BRUSH); return (LRESULT)GetStockObject(WHITE_BRUSH);
} }
return 0; return 0;
} }
...@@ -1065,9 +1065,9 @@ static LRESULT CFn_WMCommand(HWND hDlg, WPARAM wParam, LPARAM lParam, ...@@ -1065,9 +1065,9 @@ static LRESULT CFn_WMCommand(HWND hDlg, WPARAM wParam, LPARAM lParam,
hFont=CreateFontIndirectA(lpxx); hFont=CreateFontIndirectA(lpxx);
if (hFont) if (hFont)
{ {
HFONT oldFont=SendDlgItemMessageA(hDlg, stc6, HFONT oldFont=(HFONT)SendDlgItemMessageA(hDlg, stc6,
WM_GETFONT, 0, 0); WM_GETFONT, 0, 0);
SendDlgItemMessageA(hDlg,stc6,WM_SETFONT,hFont,TRUE); SendDlgItemMessageA(hDlg,stc6,WM_SETFONT,(WPARAM)hFont,TRUE);
DeleteObject(oldFont); DeleteObject(oldFont);
} }
} }
...@@ -1109,7 +1109,7 @@ static LRESULT CFn_WMCommand(HWND hDlg, WPARAM wParam, LPARAM lParam, ...@@ -1109,7 +1109,7 @@ static LRESULT CFn_WMCommand(HWND hDlg, WPARAM wParam, LPARAM lParam,
static LRESULT CFn_WMDestroy(HWND hwnd, WPARAM wParam, LPARAM lParam) static LRESULT CFn_WMDestroy(HWND hwnd, WPARAM wParam, LPARAM lParam)
{ {
DeleteObject(SendDlgItemMessageA(hwnd, stc6, WM_GETFONT, 0, 0)); DeleteObject((HFONT)SendDlgItemMessageA(hwnd, stc6, WM_GETFONT, 0, 0));
return TRUE; return TRUE;
} }
...@@ -1177,7 +1177,7 @@ BOOL16 CALLBACK FormatCharDlgProc16(HWND16 hDlg16, UINT16 message, ...@@ -1177,7 +1177,7 @@ BOOL16 CALLBACK FormatCharDlgProc16(HWND16 hDlg16, UINT16 message,
dis.itemAction = dis16->itemAction; dis.itemAction = dis16->itemAction;
dis.itemState = dis16->itemState; dis.itemState = dis16->itemState;
dis.hwndItem = HWND_32(dis16->hwndItem); dis.hwndItem = HWND_32(dis16->hwndItem);
dis.hDC = dis16->hDC; dis.hDC = HDC_32(dis16->hDC);
dis.itemData = dis16->itemData; dis.itemData = dis16->itemData;
CONV_RECT16TO32( &dis16->rcItem, &dis.rcItem ); CONV_RECT16TO32( &dis16->rcItem, &dis.rcItem );
res = CFn_WMDrawItem(hDlg, wParam, (LPARAM)&dis); res = CFn_WMDrawItem(hDlg, wParam, (LPARAM)&dis);
...@@ -1185,7 +1185,7 @@ BOOL16 CALLBACK FormatCharDlgProc16(HWND16 hDlg16, UINT16 message, ...@@ -1185,7 +1185,7 @@ BOOL16 CALLBACK FormatCharDlgProc16(HWND16 hDlg16, UINT16 message,
break; break;
case WM_CTLCOLOR: case WM_CTLCOLOR:
if (HIWORD(lParam) == CTLCOLOR_STATIC) if (HIWORD(lParam) == CTLCOLOR_STATIC)
res=CFn_WMCtlColorStatic(hDlg, (HDC)wParam, LOWORD(lParam), lpcf32a); res=CFn_WMCtlColorStatic(hDlg, wParam, LOWORD(lParam), lpcf32a);
break; break;
case WM_COMMAND: case WM_COMMAND:
res=CFn_WMCommand(hDlg, MAKEWPARAM( wParam, HIWORD(lParam) ), LOWORD(lParam), lpcf32a); res=CFn_WMCommand(hDlg, MAKEWPARAM( wParam, HIWORD(lParam) ), LOWORD(lParam), lpcf32a);
......
...@@ -2301,15 +2301,15 @@ static BOOL PRINTDLG_CreateDC16(LPPRINTDLG16 lppd) ...@@ -2301,15 +2301,15 @@ static BOOL PRINTDLG_CreateDC16(LPPRINTDLG16 lppd)
DEVMODEA *pdm = GlobalLock16(lppd->hDevMode); DEVMODEA *pdm = GlobalLock16(lppd->hDevMode);
if(lppd->Flags & PD_RETURNDC) { if(lppd->Flags & PD_RETURNDC) {
lppd->hDC = CreateDCA((char*)pdn + pdn->wDriverOffset, lppd->hDC = HDC_16(CreateDCA((char*)pdn + pdn->wDriverOffset,
(char*)pdn + pdn->wDeviceOffset, (char*)pdn + pdn->wDeviceOffset,
(char*)pdn + pdn->wOutputOffset, (char*)pdn + pdn->wOutputOffset,
pdm ); pdm ));
} else if(lppd->Flags & PD_RETURNIC) { } else if(lppd->Flags & PD_RETURNIC) {
lppd->hDC = CreateICA((char*)pdn + pdn->wDriverOffset, lppd->hDC = HDC_16(CreateICA((char*)pdn + pdn->wDriverOffset,
(char*)pdn + pdn->wDeviceOffset, (char*)pdn + pdn->wDeviceOffset,
(char*)pdn + pdn->wOutputOffset, (char*)pdn + pdn->wOutputOffset,
pdm ); pdm ));
} }
GlobalUnlock16(lppd->hDevNames); GlobalUnlock16(lppd->hDevNames);
GlobalUnlock16(lppd->hDevMode); GlobalUnlock16(lppd->hDevMode);
...@@ -2343,7 +2343,7 @@ BOOL WINAPI PrintDlgA( ...@@ -2343,7 +2343,7 @@ BOOL WINAPI PrintDlgA(
{ {
BOOL bRet = FALSE; BOOL bRet = FALSE;
LPVOID ptr; LPVOID ptr;
HINSTANCE hInst = GetWindowLongA( lppd->hwndOwner, GWL_HINSTANCE ); HINSTANCE hInst = (HINSTANCE)GetWindowLongA( lppd->hwndOwner, GWL_HINSTANCE );
if(TRACE_ON(commdlg)) { if(TRACE_ON(commdlg)) {
char flagstr[1000] = ""; char flagstr[1000] = "";
...@@ -2499,7 +2499,7 @@ BOOL WINAPI PrintDlgW( ...@@ -2499,7 +2499,7 @@ BOOL WINAPI PrintDlgW(
{ {
BOOL bRet = FALSE; BOOL bRet = FALSE;
LPVOID ptr; LPVOID ptr;
HINSTANCE hInst = GetWindowLongA( lppd->hwndOwner, GWL_HINSTANCE ); HINSTANCE hInst = (HINSTANCE)GetWindowLongA( lppd->hwndOwner, GWL_HINSTANCE );
if(TRACE_ON(commdlg)) { if(TRACE_ON(commdlg)) {
char flagstr[1000] = ""; char flagstr[1000] = "";
...@@ -2666,7 +2666,7 @@ BOOL16 WINAPI PrintDlg16( ...@@ -2666,7 +2666,7 @@ BOOL16 WINAPI PrintDlg16(
) { ) {
BOOL bRet = FALSE; BOOL bRet = FALSE;
LPVOID ptr; LPVOID ptr;
HINSTANCE hInst = GetWindowLongA( HWND_32(lppd->hwndOwner), GWL_HINSTANCE ); HINSTANCE hInst = (HINSTANCE)GetWindowLongA( HWND_32(lppd->hwndOwner), GWL_HINSTANCE );
if(TRACE_ON(commdlg)) { if(TRACE_ON(commdlg)) {
char flagstr[1000] = ""; char flagstr[1000] = "";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment