DSTRICT: commdlg

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Here is one for commdlg, Please can someone check it before doing
anything with it, as im not at all sure about 16 <-> 32 Conversions and
there are a lot of them in here, and i may have got it wrong. 
	Changelog:
		Compile commdlg with DSTRICT Defined.

-- 

Matthew Davison


Index: dlls/commdlg/Makefile.in
===================================================================
RCS file: /home/wine/wine/dlls/commdlg/Makefile.in,v
retrieving revision 1.24
diff -u -r1.24 Makefile.in
--- dlls/commdlg/Makefile.in	18 Oct 2002 23:46:29 -0000	1.24
+++ dlls/commdlg/Makefile.in	26 Oct 2002 14:08:25 -0000
@@ -1,4 +1,3 @@
-EXTRADEFS = -DWINE_NO_STRICT
 TOPSRCDIR = @top_srcdir@
 TOPOBJDIR = ../..
 SRCDIR    = @srcdir@
Index: dlls/commdlg/cdlg32.c
===================================================================
RCS file: /home/wine/wine/dlls/commdlg/cdlg32.c,v
retrieving revision 1.24
diff -u -r1.24 cdlg32.c
--- dlls/commdlg/cdlg32.c	2 Oct 2002 02:36:20 -0000	1.24
+++ dlls/commdlg/cdlg32.c	26 Oct 2002 14:08:26 -0000
@@ -70,7 +70,7 @@
 
 BOOL WINAPI COMDLG32_DllEntryPoint(HINSTANCE hInstance, DWORD Reason, LPVOID Reserved)
 {
-	TRACE("(%08x, %08lx, %p)\n", hInstance, Reason, Reserved);
+	TRACE("(%p, %08lx, %p)\n", hInstance, Reason, Reserved);
 
 	switch(Reason)
 	{
Index: dlls/commdlg/colordlg.c
===================================================================
RCS file: /home/wine/wine/dlls/commdlg/colordlg.c,v
retrieving revision 1.35
diff -u -r1.35 colordlg.c
--- dlls/commdlg/colordlg.c	16 Sep 2002 22:47:05 -0000	1.35
+++ dlls/commdlg/colordlg.c	26 Oct 2002 14:08:29 -0000
@@ -478,7 +478,7 @@
    points[2].y = points[0].y - w;
    points[2].x = points[1].x = points[0].x + w;
 
-   FillRect(hDC, &lpp->old3angle, GetClassLongA( hwnd, GCL_HBRBACKGROUND));
+   FillRect((HDC)hDC, &lpp->old3angle, (HBRUSH)GetClassLongA( hwnd, GCL_HBRBACKGROUND));
    lpp->old3angle.left  = points[0].x;
    lpp->old3angle.right = points[1].x + 1;
    lpp->old3angle.top   = points[2].y - 1;
@@ -735,7 +735,7 @@
 
  hdc = GetDC(hwnd);
  GetClientRect(hwnd, &rect);
- FillRect(hdc, &rect, GetClassLongA(hwnd, GCL_HBRBACKGROUND));
+ FillRect((HDC)hdc, &rect, (HBRUSH)GetClassLongA(hwnd, GCL_HBRBACKGROUND));
  for ( j = 0; j < rows; j++ )
  {
   for ( i = 0; i < cols; i++ )
@@ -779,7 +779,7 @@
  hdc = GetDC(hwnd);
  if (hdc)
  {
-  FillRect(hdc, &rect, GetClassLongA(hwnd, GCL_HBRBACKGROUND) );
+  FillRect((HDC)hdc, &rect, (HBRUSH)GetClassLongA(hwnd, GCL_HBRBACKGROUND) );
   for (j = 0; j < rows; j++)
   {
    for (i = 0; i < cols; i++)
@@ -1474,14 +1474,14 @@
     else if (lpChCol->Flags & CC_ENABLETEMPLATE)
     {
 	HRSRC hResInfo;
-        if (!(hResInfo = FindResourceW(lpChCol->hInstance,
+        if (!(hResInfo = FindResourceW((HMODULE)lpChCol->hInstance,
                                         lpChCol->lpTemplateName,
                                         RT_DIALOGW)))
         {
             COMDLG32_SetCommDlgExtendedError(CDERR_FINDRESFAILURE);
             return FALSE;
         }
-        if (!(hDlgTmpl = LoadResource(lpChCol->hInstance, hResInfo)) ||
+        if (!(hDlgTmpl = LoadResource((HMODULE)lpChCol->hInstance, hResInfo)) ||
             !(template = LockResource(hDlgTmpl)))
         {
             COMDLG32_SetCommDlgExtendedError(CDERR_LOADRESFAILURE);
Index: dlls/commdlg/filedlg.c
===================================================================
RCS file: /home/wine/wine/dlls/commdlg/filedlg.c,v
retrieving revision 1.55
diff -u -r1.55 filedlg.c
--- dlls/commdlg/filedlg.c	13 Oct 2002 17:52:32 -0000	1.55
+++ dlls/commdlg/filedlg.c	26 Oct 2002 14:08:36 -0000
@@ -1045,7 +1045,7 @@
     lpdis->itemAction = lpdis16->itemAction;
     lpdis->itemState = lpdis16->itemState;
     lpdis->hwndItem = HWND_32(lpdis16->hwndItem);
-    lpdis->hDC = lpdis16->hDC;
+    lpdis->hDC = HDC_32(lpdis16->hDC);
     lpdis->rcItem.right = lpdis16->rcItem.right;
     lpdis->rcItem.left = lpdis16->rcItem.left;
     lpdis->rcItem.top = lpdis16->rcItem.top;
@@ -1148,7 +1148,7 @@
     memset(&ofnA, 0, sizeof(OPENFILENAMEA));
     ofnA.lStructSize = sizeof(OPENFILENAMEA);
     ofnA.hwndOwner = HWND_32(ofn16->hwndOwner);
-    ofnA.hInstance = ofn16->hInstance;
+    ofnA.hInstance = (HINSTANCE)(ULONG_PTR)ofn16->hInstance;
     if (ofn16->lpstrFilter)
         ofnA.lpstrFilter = MapSL(ofn16->lpstrFilter);
     if (ofn16->lpstrCustomFilter)
@@ -1299,7 +1299,7 @@
     lfs = FILEDLG_AllocPrivate((LPARAM) lpofn, LFS32A, dlgType);
     if (lfs)
     {
-        hInst = GetWindowLongA( lpofn->hwndOwner, GWL_HINSTANCE );
+        hInst = (HINSTANCE)(ULONG_PTR)GetWindowLongA( lpofn->hwndOwner, GWL_HINSTANCE );
         bRet = DialogBoxIndirectParamA( hInst, lfs->template, lpofn->hwndOwner,
              (DLGPROC) FileOpenDlgProc, (DWORD) lfs);
         FILEDLG_DestroyPrivate(lfs);
@@ -1329,7 +1329,7 @@
     lfs = FILEDLG_AllocPrivate((LPARAM) lpofn, LFS32W, dlgType);
     if (lfs)
     {
-        hInst = GetWindowLongA( lpofn->hwndOwner, GWL_HINSTANCE );
+        hInst = (HINSTANCE)(ULONG_PTR)GetWindowLongA( lpofn->hwndOwner, GWL_HINSTANCE );
         bRet = DialogBoxIndirectParamW( hInst, lfs->template, lpofn->hwndOwner,
              (DLGPROC) FileOpenDlgProc, (DWORD) lfs);
         FILEDLG_DestroyPrivate(lfs);
@@ -1519,9 +1519,9 @@
     lfs = FILEDLG_AllocPrivate((LPARAM) ofn, LFS16, OPEN_DIALOG);
     if (lfs)
     {
-        hInst = GetWindowLongA( HWND_32(lpofn->hwndOwner), GWL_HINSTANCE );
+        hInst = (HINSTANCE)(ULONG_PTR)GetWindowLongA( HWND_32(lpofn->hwndOwner), GWL_HINSTANCE );
         ptr = GetProcAddress16(GetModuleHandle16("COMMDLG"), (LPCSTR) 6);
-        bRet = DialogBoxIndirectParam16( hInst, lfs->hDlgTmpl16, lpofn->hwndOwner,
+        bRet = DialogBoxIndirectParam16( (HINSTANCE16)LOWORD(hInst), lfs->hDlgTmpl16, lpofn->hwndOwner,
              (DLGPROC16) ptr, (DWORD) lfs);
         FILEDLG_DestroyPrivate(lfs);
     }
@@ -1557,9 +1557,9 @@
     lfs = FILEDLG_AllocPrivate((LPARAM) ofn, LFS16, SAVE_DIALOG);
     if (lfs)
     {
-        hInst = GetWindowLongA( HWND_32(lpofn->hwndOwner), GWL_HINSTANCE );
+        hInst = (HINSTANCE)(ULONG_PTR)GetWindowLongA( HWND_32(lpofn->hwndOwner), GWL_HINSTANCE );
         ptr = GetProcAddress16(GetModuleHandle16("COMMDLG"), (LPCSTR) 7);
-        bRet = DialogBoxIndirectParam16( hInst, lfs->hDlgTmpl16, lpofn->hwndOwner,
+        bRet = DialogBoxIndirectParam16( (HINSTANCE16)LOWORD(hInst), lfs->hDlgTmpl16, lpofn->hwndOwner,
              (DLGPROC16) ptr, (DWORD) lfs);
         FILEDLG_DestroyPrivate(lfs);
     }
Index: dlls/commdlg/filedlg95.c
===================================================================
RCS file: /home/wine/wine/dlls/commdlg/filedlg95.c,v
retrieving revision 1.81
diff -u -r1.81 filedlg95.c
--- dlls/commdlg/filedlg95.c	17 Sep 2002 18:33:55 -0000	1.81
+++ dlls/commdlg/filedlg95.c	26 Oct 2002 14:08:41 -0000
@@ -769,7 +769,7 @@
 {
     FileOpenDlgInfos *fodInfos = (FileOpenDlgInfos *) GetPropA(hwndParentDlg,FileOpenDlgInfosStr);
 
-    TRACE("0x%04x 0x%04x\n",hwndParentDlg, uCode);
+    TRACE("%p 0x%04x\n",hwndParentDlg, uCode);
 
     if(!fodInfos) return 0;
 
@@ -1522,7 +1522,7 @@
   int nOpenAction;
   FileOpenDlgInfos *fodInfos = (FileOpenDlgInfos *) GetPropA(hwnd,FileOpenDlgInfosStr);
 
-  TRACE("hwnd=0x%04x\n", hwnd);
+  TRACE("hwnd=%p\n", hwnd);
 
   /* get the files from the edit control */
   nFileCount = FILEDLG95_FILENAME_GetFileNames(hwnd, &lpstrFileList, &sizeUsed);
@@ -1925,7 +1925,7 @@
   FileOpenDlgInfos *fodInfos = (FileOpenDlgInfos *) GetPropA(hwnd,FileOpenDlgInfosStr);
 
   IContextMenu * pcm;
-  TRACE("(0x%08x,%p)\n", hwnd, lpVerb);
+  TRACE("(%p,%p)\n", hwnd, lpVerb);
 
   if(SUCCEEDED(IShellView_GetItemObject(fodInfos->Shell.FOIShellView,
 					SVGIO_BACKGROUND,
Index: dlls/commdlg/finddlg32.c
===================================================================
RCS file: /home/wine/wine/dlls/commdlg/finddlg32.c,v
retrieving revision 1.18
diff -u -r1.18 finddlg32.c
--- dlls/commdlg/finddlg32.c	31 May 2002 23:25:45 -0000	1.18
+++ dlls/commdlg/finddlg32.c	26 Oct 2002 14:08:42 -0000
@@ -373,7 +373,7 @@
         DWORD error;
         LPDLGTEMPLATEW rcs;
 
-	TRACE("hInst=%08x, Flags=%08lx\n", pdata->fr.hInstance, pdata->fr.Flags);
+	TRACE("hInst=%p, Flags=%08lx\n", pdata->fr.hInstance, pdata->fr.Flags);
 
         if(!(pdata->fr.Flags & FR_ENABLETEMPLATEHANDLE))
         {
Index: dlls/commdlg/fontdlg.c
===================================================================
RCS file: /home/wine/wine/dlls/commdlg/fontdlg.c,v
retrieving revision 1.41
diff -u -r1.41 fontdlg.c
--- dlls/commdlg/fontdlg.c	16 Sep 2002 22:47:05 -0000	1.41
+++ dlls/commdlg/fontdlg.c	26 Oct 2002 14:08:44 -0000
@@ -71,14 +71,14 @@
 {
   chf32a->lStructSize=sizeof(CHOOSEFONTA);
   chf32a->hwndOwner=HWND_32(chf16->hwndOwner);
-  chf32a->hDC=chf16->hDC;
+  chf32a->hDC=HDC_32(chf16->hDC);
   chf32a->iPointSize=chf16->iPointSize;
   chf32a->Flags=chf16->Flags;
   chf32a->rgbColors=chf16->rgbColors;
   chf32a->lCustData=chf16->lCustData;
   chf32a->lpfnHook=NULL;
   chf32a->lpTemplateName=MapSL(chf16->lpTemplateName);
-  chf32a->hInstance=chf16->hInstance;
+  chf32a->hInstance=(HINSTANCE)(ULONG_PTR)chf16->hInstance;
   chf32a->lpszStyle=MapSL(chf16->lpszStyle);
   chf32a->nFontType=chf16->nFontType;
   chf32a->nSizeMax=chf16->nSizeMax;
@@ -717,11 +717,11 @@
     return FALSE;
   }
   if (!hBitmapTT)
-    hBitmapTT = LoadBitmapA(0, MAKEINTRESOURCEA(OBM_TRTYPE));
+    hBitmapTT = HBITMAP_16(LoadBitmapA(0, MAKEINTRESOURCEA(OBM_TRTYPE)));
 
   /* This font will be deleted by WM_COMMAND */
   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))
     ShowWindow(GetDlgItem(hDlg,pshHelp),SW_HIDE);
@@ -842,8 +842,8 @@
   BITMAP bm;
   LPMEASUREITEMSTRUCT lpmi=(LPMEASUREITEMSTRUCT)lParam;
   if (!hBitmapTT)
-    hBitmapTT = LoadBitmapA(0, MAKEINTRESOURCEA(OBM_TRTYPE));
-  GetObjectA( hBitmapTT, sizeof(bm), &bm );
+    hBitmapTT = HBITMAP_16(LoadBitmapA(0, MAKEINTRESOURCEA(OBM_TRTYPE)));
+  GetObjectA((HANDLE)(ULONG_PTR)hBitmapTT, sizeof(bm), &bm );
   lpmi->itemHeight=bm.bmHeight;
   /* FIXME: use MAX of bm.bmHeight and tm.tmHeight .*/
   return 0;
@@ -894,7 +894,7 @@
     case cmb1:	/* TRACE(commdlg,"WM_Drawitem cmb1\n"); */
 		SendMessageA(lpdi->hwndItem, CB_GETLBTEXT, lpdi->itemID,
 			       (LPARAM)buffer);
-		GetObjectA( hBitmapTT, sizeof(bm), &bm );
+		GetObjectA( (HANDLE)(ULONG_PTR)hBitmapTT, sizeof(bm), &bm );
 		TextOutA(lpdi->hDC, lpdi->rcItem.left + bm.bmWidth + 10,
                            lpdi->rcItem.top, buffer, strlen(buffer));
 #if 0
@@ -962,7 +962,7 @@
    if (GetDlgCtrlID(HWND_32(LOWORD(lParam)))==stc6)
    {
      SetTextColor((HDC)wParam, lpcf->rgbColors);
-     return GetStockObject(WHITE_BRUSH);
+     return (LRESULT)GetStockObject(WHITE_BRUSH);
    }
   return 0;
 }
@@ -1065,9 +1065,9 @@
 		    hFont=CreateFontIndirectA(lpxx);
 		    if (hFont)
 		    {
-		      HFONT oldFont=SendDlgItemMessageA(hDlg, stc6,
+		      HFONT oldFont=(HFONT)SendDlgItemMessageA(hDlg, stc6,
 		          WM_GETFONT, 0, 0);
-		      SendDlgItemMessageA(hDlg,stc6,WM_SETFONT,hFont,TRUE);
+		      SendDlgItemMessageA(hDlg,stc6,WM_SETFONT,(WPARAM)hFont,TRUE);
 		      DeleteObject(oldFont);
 		    }
                   }
@@ -1109,7 +1109,7 @@
 
 static LRESULT CFn_WMDestroy(HWND hwnd, WPARAM wParam, LPARAM lParam)
 {
-  DeleteObject(SendDlgItemMessageA(hwnd, stc6, WM_GETFONT, 0, 0));
+  DeleteObject((HANDLE)SendDlgItemMessageA(hwnd, stc6, WM_GETFONT, 0, 0));
   return TRUE;
 }
 
@@ -1177,7 +1177,7 @@
             dis.itemAction = dis16->itemAction;
             dis.itemState  = dis16->itemState;
             dis.hwndItem   = HWND_32(dis16->hwndItem);
-            dis.hDC        = dis16->hDC;
+            dis.hDC        = HDC_32(dis16->hDC);
             dis.itemData   = dis16->itemData;
             CONV_RECT16TO32( &dis16->rcItem, &dis.rcItem );
             res = CFn_WMDrawItem(hDlg, wParam, (LPARAM)&dis);
@@ -1185,7 +1185,7 @@
         break;
     case WM_CTLCOLOR:
         if (HIWORD(lParam) == CTLCOLOR_STATIC)
-            res=CFn_WMCtlColorStatic(hDlg, (HDC)wParam, LOWORD(lParam), lpcf32a);
+            res=CFn_WMCtlColorStatic(hDlg, wParam, LOWORD(lParam), lpcf32a);
         break;
     case WM_COMMAND:
         res=CFn_WMCommand(hDlg, MAKEWPARAM( wParam, HIWORD(lParam) ), LOWORD(lParam), lpcf32a);
Index: dlls/commdlg/printdlg.c
===================================================================
RCS file: /home/wine/wine/dlls/commdlg/printdlg.c,v
retrieving revision 1.56
diff -u -r1.56 printdlg.c
--- dlls/commdlg/printdlg.c	21 Oct 2002 18:22:31 -0000	1.56
+++ dlls/commdlg/printdlg.c	26 Oct 2002 14:08:49 -0000
@@ -2014,7 +2014,7 @@
 	    return FALSE;
     } else {
         PrintStructures = (PRINT_PTRA*) lParam;
-	SetPropA(hDlg,"__WINE_PRINTDLGDATA",lParam);
+	SetPropA( (HWND)hDlg,"__WINE_PRINTDLGDATA",(HANDLE)lParam);
 	res = PRINTDLG_WMInitDialog(hDlg, wParam, PrintStructures);
 
 	if(PrintStructures->dlg.lpPrintDlg->Flags & PD_ENABLEPRINTHOOK)
@@ -2301,15 +2301,15 @@
     DEVMODEA *pdm = GlobalLock16(lppd->hDevMode);
 
     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->wOutputOffset,
-			      pdm );
+			      pdm ));
     } 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->wOutputOffset,
-			      pdm );
+			      pdm ));
     }
     GlobalUnlock16(lppd->hDevNames);
     GlobalUnlock16(lppd->hDevMode);
@@ -2343,7 +2343,7 @@
 {
     BOOL      bRet = FALSE;
     LPVOID   ptr;
-    HINSTANCE hInst = GetWindowLongA( lppd->hwndOwner, GWL_HINSTANCE );
+    HINSTANCE hInst = (HINSTANCE)GetWindowLongA( lppd->hwndOwner, GWL_HINSTANCE );
 
     if(TRACE_ON(commdlg)) {
         char flagstr[1000] = "";
@@ -2352,8 +2352,8 @@
 	    if(lppd->Flags & pflag->flag)
 	        strcat(flagstr, pflag->name);
 	}
-	TRACE("(%p): hwndOwner = %08x, hDevMode = %08x, hDevNames = %08x\n"
-	      "pp. %d-%d, min p %d, max p %d, copies %d, hinst %08x\n"
+	TRACE("(%p): hwndOwner = %p, hDevMode = %p, hDevNames = %p\n"
+	      "pp. %d-%d, min p %d, max p %d, copies %d, hinst %p\n"
 	      "flags %08lx (%s)\n",
 	      lppd, lppd->hwndOwner, lppd->hDevMode, lppd->hDevNames,
 	      lppd->nFromPage, lppd->nToPage, lppd->nMinPage, lppd->nMaxPage,
@@ -2499,7 +2499,7 @@
 {
     BOOL      bRet = FALSE;
     LPVOID   ptr;
-    HINSTANCE hInst = GetWindowLongA( lppd->hwndOwner, GWL_HINSTANCE );
+    HINSTANCE hInst = (HINSTANCE)GetWindowLongA( lppd->hwndOwner, GWL_HINSTANCE );
 
     if(TRACE_ON(commdlg)) {
         char flagstr[1000] = "";
@@ -2508,8 +2508,8 @@
 	    if(lppd->Flags & pflag->flag)
 	        strcat(flagstr, pflag->name);
 	}
-	TRACE("(%p): hwndOwner = %08x, hDevMode = %08x, hDevNames = %08x\n"
-	      "pp. %d-%d, min p %d, max p %d, copies %d, hinst %08x\n"
+	TRACE("(%p): hwndOwner = %p, hDevMode = %p, hDevNames = %p\n"
+	      "pp. %d-%d, min p %d, max p %d, copies %d, hinst %p\n"
 	      "flags %08lx (%s)\n",
 	      lppd, lppd->hwndOwner, lppd->hDevMode, lppd->hDevNames,
 	      lppd->nFromPage, lppd->nToPage, lppd->nMinPage, lppd->nMaxPage,
@@ -2666,7 +2666,7 @@
 ) {
     BOOL      bRet = FALSE;
     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)) {
         char flagstr[1000] = "";
@@ -2738,7 +2738,7 @@
     /* load Dialog resources,
      * depending on Flags indicates Print32 or Print32_setup dialog
      */
-	hDlgTmpl = PRINTDLG_GetDlgTemplate16(lppd);
+	hDlgTmpl = (HGLOBAL)(ULONG_PTR)PRINTDLG_GetDlgTemplate16(lppd);
 	if (!hDlgTmpl) {
 	    COMDLG32_SetCommDlgExtendedError(CDERR_LOADRESFAILURE);
 	    return FALSE;
@@ -2751,9 +2751,10 @@
 #define MVAL(x)	PrintStructures->dlg.lpPrintDlg->x = MapSL(lppd->x);
 	CVAL(Flags);
 	PrintStructures->dlg.lpPrintDlg->hwndOwner = HWND_32(lppd->hwndOwner);
-	CVAL(hDC);
+	PrintStructures->dlg.lpPrintDlg->hDC = HDC_32(lppd->hDC);
 	CVAL(nFromPage);CVAL(nToPage);CVAL(nMinPage);CVAL(nMaxPage);
-	CVAL(nCopies);CVAL(hInstance);CVAL(lCustData);
+	CVAL(nCopies);CVAL(lCustData);
+	PrintStructures->dlg.lpPrintDlg->hInstance = (HINSTANCE)(ULONG_PTR)lppd->hInstance;
 	MVAL(lpPrintTemplateName);MVAL(lpSetupTemplateName);
 	/* Don't copy rest, it is 16 bit specific */
 #undef MVAL
@@ -2765,7 +2766,7 @@
 	 * -1 is failure, 0 is broken hwnd, everything else is ok.
 	 */
 	bRet =	(0<DialogBoxIndirectParam16(
-		 hInst, hDlgTmpl, lppd->hwndOwner,
+		 (HINSTANCE16)LOWORD(hInst), HWND_16(hDlgTmpl), lppd->hwndOwner,
 		 (DLGPROC16)GetProcAddress16(GetModuleHandle16("COMMDLG"),(LPCSTR)21),
 		 (LPARAM)PrintStructures
 		)
@@ -2812,7 +2813,7 @@
 	    GlobalUnlock16(lppd->hDevMode);
 	}
 	if (!(lppd->Flags & (PD_ENABLESETUPTEMPLATEHANDLE | PD_ENABLESETUPTEMPLATE)))
-            GlobalFree16(hDlgTmpl); /* created from the 32 bits resource */
+            GlobalFree16((HGLOBAL16)LOWORD(hDlgTmpl)); /* created from the 32 bits resource */
 	HeapFree(GetProcessHeap(), 0, PrintStructures->lpDevMode);
 	HeapFree(GetProcessHeap(), 0, PrintStructures->lpPrinterInfo);
 	HeapFree(GetProcessHeap(), 0, PrintStructures->lpDriverInfo);
@@ -3172,7 +3173,7 @@
     if (uMsg==WM_INITDIALOG) {
 	res = TRUE;
         pda = (PageSetupDataA*)lParam;
-	SetPropA(hDlg,"__WINE_PAGESETUPDLGDATA",lParam);
+	SetPropA(hDlg,"__WINE_PAGESETUPDLGDATA",(HANDLE)lParam);
 	if (pda->dlga->Flags & PSD_ENABLEPAGESETUPHOOK) {
 	    res = pda->dlga->lpfnPageSetupHook(hDlg,uMsg,wParam,lParam);
 	    if (!res) {
@@ -3254,7 +3255,7 @@
     if (uMsg==WM_INITDIALOG) {
 	res = TRUE;
         pda = (PageSetupDataW*)lParam;
-	SetPropA(hDlg,"__WINE_PAGESETUPDLGDATA",lParam);
+	SetPropA(hDlg,"__WINE_PAGESETUPDLGDATA",(HANDLE)lParam);
 	if (pda->dlga->Flags & PSD_ENABLEPAGESETUPHOOK) {
 	    res = pda->dlga->lpfnPageSetupHook(hDlg,uMsg,wParam,lParam);
 	    if (!res) {
@@ -3346,8 +3347,8 @@
 	        strcat(flagstr, "|");
 	    }
 	}
-	TRACE("(%p): hwndOwner = %08x, hDevMode = %08x, hDevNames = %08x\n"
-	      "hinst %08x, flags %08lx (%s)\n",
+	TRACE("(%p): hwndOwner = %p, hDevMode = %p, hDevNames = %p\n"
+	      "hinst %p, flags %08lx (%s)\n",
 	      setupdlg, setupdlg->hwndOwner, setupdlg->hDevMode,
 	      setupdlg->hDevNames,
 	      setupdlg->hInstance, setupdlg->Flags, flagstr);
@@ -3412,8 +3413,8 @@
 	        strcat(flagstr, "|");
 	    }
 	}
-	TRACE("(%p): hwndOwner = %08x, hDevMode = %08x, hDevNames = %08x\n"
-	      "hinst %08x, flags %08lx (%s)\n",
+	TRACE("(%p): hwndOwner = %p, hDevMode = %p, hDevNames = %p\n"
+	      "hinst %p, flags %08lx (%s)\n",
 	      setupdlg, setupdlg->hwndOwner, setupdlg->hDevMode,
 	      setupdlg->hDevNames,
 	      setupdlg->hInstance, setupdlg->Flags, flagstr);
@@ -3482,7 +3483,7 @@
 	    return FALSE;
     } else {
         PrintStructures = (PRINT_PTRA*) lParam;
-	SetPropA(hDlg,"__WINE_PRINTDLGDATA",lParam);
+	SetPropA(hDlg,"__WINE_PRINTDLGDATA",(HANDLE)lParam);
 	res = PRINTDLG_WMInitDialog16(hDlg, wParam, PrintStructures);
 
 	if(PrintStructures->dlg.lpPrintDlg16->Flags & PD_ENABLEPRINTHOOK) {

[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux