Commit 38ffcc3c authored by Huw D M Davies's avatar Huw D M Davies Committed by Alexandre Julliard

Map PrintDlg16 to PrintDlgA.

parent 72e70922
......@@ -16,7 +16,7 @@ type win16
16 pascal16 FormatCharDlgProc(word word word long) FormatCharDlgProc16
18 pascal16 FontStyleEnumProc(ptr ptr word long) FontStyleEnumProc16
19 pascal16 FontFamilyEnumProc(ptr ptr word long) FontFamilyEnumProc16
20 pascal16 PrintDlg(segptr) PrintDlg16
20 pascal16 PrintDlg(ptr) PrintDlg16
21 pascal PrintDlgProc(word word word long) PrintDlgProc16
22 pascal PrintSetupDlgProc(word word word long) PrintSetupDlgProc16
#23 pascal EDITINTEGERONLY exported, shared data
......
......@@ -55,48 +55,48 @@ static BOOL PRINTDLG_ValidateAndDuplicateSettings(HWND hDlg,
/***********************************************************************
* PrintDlg16 (COMMDLG.20)
*/
BOOL16 WINAPI PrintDlg16( SEGPTR printdlg )
BOOL16 WINAPI PrintDlg16( LPPRINTDLG16 lpPrint )
{
HANDLE16 hInst;
BOOL16 bRet = FALSE;
LPCVOID template;
HWND hwndDialog;
HANDLE hResInfo, hDlgTmpl;
LPSTR rscname;
LPPRINTDLG16 lpPrint = (LPPRINTDLG16)PTR_SEG_TO_LIN(printdlg);
TRACE("(%p) -- Flags=%08lX\n", lpPrint, lpPrint->Flags );
if (lpPrint->Flags & PD_RETURNDEFAULT)
/* FIXME: should fill lpPrint->hDevMode and lpPrint->hDevNames here */
return TRUE;
if (lpPrint->Flags & PD_PRINTSETUP)
rscname = "PRINT_SETUP";
else
rscname = "PRINT";
if (!(hResInfo = FindResourceA(COMMDLG_hInstance32, rscname, RT_DIALOGA)))
{
COMDLG32_SetCommDlgExtendedError(CDERR_FINDRESFAILURE);
return FALSE;
PRINTDLGA Print32;
BOOL16 ret;
memset(&Print32, 0, sizeof(Print32));
Print32.lStructSize = sizeof(Print32);
Print32.hwndOwner = lpPrint->hwndOwner;
Print32.hDevMode = lpPrint->hDevMode;
Print32.hDevNames = lpPrint->hDevNames;
Print32.Flags = lpPrint->Flags;
Print32.nFromPage = lpPrint->nFromPage;
Print32.nToPage = lpPrint->nToPage;
Print32.nMinPage = lpPrint->nMinPage;
Print32.nMaxPage = lpPrint->nMaxPage;
Print32.nCopies = lpPrint->nCopies;
Print32.hInstance = lpPrint->hInstance;
Print32.lCustData = lpPrint->lCustData;
if(lpPrint->lpfnPrintHook) {
FIXME("Need to allocate thunk\n");
/* Print32.lpfnPrintHook = lpPrint->lpfnPrintHook;*/
}
if (!(hDlgTmpl = LoadResource(COMMDLG_hInstance32, hResInfo )) ||
!(template = LockResource( hDlgTmpl )))
{
COMDLG32_SetCommDlgExtendedError(CDERR_LOADRESFAILURE);
return FALSE;
if(lpPrint->lpfnSetupHook) {
FIXME("Need to allocate thunk\n");
/* Print32.lpfnSetupHook = lpPrint->lpfnSetupHook;*/
}
hInst = GetWindowLongA( lpPrint->hwndOwner, GWL_HINSTANCE );
hwndDialog = DIALOG_CreateIndirect( hInst, template, TRUE,
lpPrint->hwndOwner,
(DLGPROC16)((lpPrint->Flags & PD_PRINTSETUP) ?
/* FIXME: PrintSetupDlgProc */ PrintDlgProcA :
PrintDlgProcA ),
printdlg, WIN_PROC_32A );
if (hwndDialog) bRet = DIALOG_DoDialogBox( hwndDialog, lpPrint->hwndOwner);
return bRet;
Print32.lpPrintTemplateName = PTR_SEG_TO_LIN(lpPrint->lpPrintTemplateName);
Print32.lpSetupTemplateName = PTR_SEG_TO_LIN(lpPrint->lpSetupTemplateName);
Print32.hPrintTemplate = lpPrint->hPrintTemplate;
Print32.hSetupTemplate = lpPrint->hSetupTemplate;
ret = PrintDlgA(&Print32);
lpPrint->hDevMode = Print32.hDevMode;
lpPrint->hDevNames = Print32.hDevNames;
lpPrint->hDC = Print32.hDC;
lpPrint->Flags = Print32.Flags;
lpPrint->nFromPage = Print32.nFromPage;
lpPrint->nToPage = Print32.nToPage;
lpPrint->nCopies = Print32.nCopies;
return ret;
}
......
......@@ -616,7 +616,7 @@ BOOL WINAPI GetSaveFileNameW(LPOPENFILENAMEW ofn);
BOOL WINAPI PageSetupDlgA( LPPAGESETUPDLGA );
BOOL WINAPI PageSetupDlgW( LPPAGESETUPDLGW );
#define PageSetupDlg WINELIB_NAME_AW(PageSetupDlg)
BOOL16 WINAPI PrintDlg16( SEGPTR print);
BOOL16 WINAPI PrintDlg16( LPPRINTDLG16 print);
BOOL WINAPI PrintDlgA( LPPRINTDLGA printdlg);
BOOL WINAPI PrintDlgW( LPPRINTDLGW printdlg);
#define PrintDlg WINELIB_NAME_AW(PrintDlg)
......
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