comdlg32: Rename some identifiers to reflect their width.
This commit is contained in:
parent
79333bd1c0
commit
649d8b5298
|
@ -2338,7 +2338,7 @@ typedef struct {
|
||||||
} PageSetupDataA;
|
} PageSetupDataA;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
LPPAGESETUPDLGW dlga;
|
LPPAGESETUPDLGW dlgw;
|
||||||
PRINTDLGW pdlg;
|
PRINTDLGW pdlg;
|
||||||
PAGESETUPDLGW curdlg; /* Current dialog state */
|
PAGESETUPDLGW curdlg; /* Current dialog state */
|
||||||
} PageSetupDataW;
|
} PageSetupDataW;
|
||||||
|
@ -2421,16 +2421,16 @@ _c_size2strA(PageSetupDataA *pda,DWORD size,LPSTR strout) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
static void
|
static void
|
||||||
_c_size2strW(PageSetupDataW *pda,DWORD size,LPWSTR strout) {
|
_c_size2strW(PageSetupDataW *pdw,DWORD size,LPWSTR strout) {
|
||||||
static const char mm_fmt[] = "%.2f mm";
|
static const char mm_fmt[] = "%.2f mm";
|
||||||
static const char in_fmt[] = "%.2f in";
|
static const char in_fmt[] = "%.2f in";
|
||||||
char buf[20];
|
char buf[20];
|
||||||
if (pda->dlga->Flags & PSD_INHUNDREDTHSOFMILLIMETERS) {
|
if (pdw->dlgw->Flags & PSD_INHUNDREDTHSOFMILLIMETERS) {
|
||||||
sprintf(buf, mm_fmt, (size * 1.0) / 100.0);
|
sprintf(buf, mm_fmt, (size * 1.0) / 100.0);
|
||||||
} else if (pda->dlga->Flags & PSD_INTHOUSANDTHSOFINCHES) {
|
} else if (pdw->dlgw->Flags & PSD_INTHOUSANDTHSOFINCHES) {
|
||||||
sprintf(buf, in_fmt, (size * 1.0) / 1000.0);
|
sprintf(buf, in_fmt, (size * 1.0) / 1000.0);
|
||||||
} else {
|
} else {
|
||||||
pda->dlga->Flags |= PSD_INHUNDREDTHSOFMILLIMETERS;
|
pdw->dlgw->Flags |= PSD_INHUNDREDTHSOFMILLIMETERS;
|
||||||
sprintf(buf, mm_fmt, (size * 1.0) / 100.0);
|
sprintf(buf, mm_fmt, (size * 1.0) / 100.0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2543,15 +2543,15 @@ PRINTDLG_PS_UpdateDlgStructA(HWND hDlg, PageSetupDataA *pda) {
|
||||||
}
|
}
|
||||||
|
|
||||||
static BOOL
|
static BOOL
|
||||||
PRINTDLG_PS_UpdateDlgStructW(HWND hDlg, PageSetupDataW *pda) {
|
PRINTDLG_PS_UpdateDlgStructW(HWND hDlg, PageSetupDataW *pdw) {
|
||||||
DEVNAMES *dn;
|
DEVNAMES *dn;
|
||||||
DEVMODEW *dm;
|
DEVMODEW *dm;
|
||||||
LPWSTR devname,portname;
|
LPWSTR devname,portname;
|
||||||
WCHAR papername[64];
|
WCHAR papername[64];
|
||||||
WCHAR buf[200];
|
WCHAR buf[200];
|
||||||
|
|
||||||
dn = GlobalLock(pda->pdlg.hDevNames);
|
dn = GlobalLock(pdw->pdlg.hDevNames);
|
||||||
dm = GlobalLock(pda->pdlg.hDevMode);
|
dm = GlobalLock(pdw->pdlg.hDevMode);
|
||||||
devname = ((WCHAR*)dn)+dn->wDeviceOffset;
|
devname = ((WCHAR*)dn)+dn->wDeviceOffset;
|
||||||
portname = ((WCHAR*)dn)+dn->wOutputOffset;
|
portname = ((WCHAR*)dn)+dn->wOutputOffset;
|
||||||
|
|
||||||
|
@ -2561,34 +2561,34 @@ PRINTDLG_PS_UpdateDlgStructW(HWND hDlg, PageSetupDataW *pda) {
|
||||||
PRINTDLG_SetUpPaperComboBoxW(hDlg,cmb3,devname,portname,dm);
|
PRINTDLG_SetUpPaperComboBoxW(hDlg,cmb3,devname,portname,dm);
|
||||||
|
|
||||||
if (GetDlgItemTextW(hDlg,cmb2,papername,sizeof(papername))>0) {
|
if (GetDlgItemTextW(hDlg,cmb2,papername,sizeof(papername))>0) {
|
||||||
PRINTDLG_PaperSizeW(&(pda->pdlg),papername,&(pda->dlga->ptPaperSize));
|
PRINTDLG_PaperSizeW(&(pdw->pdlg),papername,&(pdw->dlgw->ptPaperSize));
|
||||||
pda->dlga->ptPaperSize.x = _c_10mm2size((LPPAGESETUPDLGA)pda->dlga,pda->dlga->ptPaperSize.x);
|
pdw->dlgw->ptPaperSize.x = _c_10mm2size((LPPAGESETUPDLGA)pdw->dlgw,pdw->dlgw->ptPaperSize.x);
|
||||||
pda->dlga->ptPaperSize.y = _c_10mm2size((LPPAGESETUPDLGA)pda->dlga,pda->dlga->ptPaperSize.y);
|
pdw->dlgw->ptPaperSize.y = _c_10mm2size((LPPAGESETUPDLGA)pdw->dlgw,pdw->dlgw->ptPaperSize.y);
|
||||||
} else
|
} else
|
||||||
FIXME("could not get dialog text for papersize cmbbox?\n");
|
FIXME("could not get dialog text for papersize cmbbox?\n");
|
||||||
#define GETVAL(id,val) if (GetDlgItemTextW(hDlg,id,buf,sizeof(buf)/sizeof(buf[0]))>0) { val = _c_str2sizeW(pda->dlga,buf); } else { FIXME("could not get dlgitemtextw for %x\n",id); }
|
#define GETVAL(id,val) if (GetDlgItemTextW(hDlg,id,buf,sizeof(buf)/sizeof(buf[0]))>0) { val = _c_str2sizeW(pdw->dlgw,buf); } else { FIXME("could not get dlgitemtextw for %x\n",id); }
|
||||||
GETVAL(edt4,pda->dlga->rtMargin.left);
|
GETVAL(edt4,pdw->dlgw->rtMargin.left);
|
||||||
GETVAL(edt5,pda->dlga->rtMargin.top);
|
GETVAL(edt5,pdw->dlgw->rtMargin.top);
|
||||||
GETVAL(edt6,pda->dlga->rtMargin.right);
|
GETVAL(edt6,pdw->dlgw->rtMargin.right);
|
||||||
GETVAL(edt7,pda->dlga->rtMargin.bottom);
|
GETVAL(edt7,pdw->dlgw->rtMargin.bottom);
|
||||||
#undef GETVAL
|
#undef GETVAL
|
||||||
|
|
||||||
/* If we are in landscape, swap x and y of page size */
|
/* If we are in landscape, swap x and y of page size */
|
||||||
if (IsDlgButtonChecked(hDlg, rad2)) {
|
if (IsDlgButtonChecked(hDlg, rad2)) {
|
||||||
DWORD tmp;
|
DWORD tmp;
|
||||||
tmp = pda->dlga->ptPaperSize.x;
|
tmp = pdw->dlgw->ptPaperSize.x;
|
||||||
pda->dlga->ptPaperSize.x = pda->dlga->ptPaperSize.y;
|
pdw->dlgw->ptPaperSize.x = pdw->dlgw->ptPaperSize.y;
|
||||||
pda->dlga->ptPaperSize.y = tmp;
|
pdw->dlgw->ptPaperSize.y = tmp;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Save orientation */
|
/* Save orientation */
|
||||||
if (pda->dlga->ptPaperSize.x > pda->dlga->ptPaperSize.y)
|
if (pdw->dlgw->ptPaperSize.x > pdw->dlgw->ptPaperSize.y)
|
||||||
dm->u1.s1.dmOrientation = DMORIENT_LANDSCAPE;
|
dm->u1.s1.dmOrientation = DMORIENT_LANDSCAPE;
|
||||||
else
|
else
|
||||||
dm->u1.s1.dmOrientation = DMORIENT_PORTRAIT;
|
dm->u1.s1.dmOrientation = DMORIENT_PORTRAIT;
|
||||||
|
|
||||||
GlobalUnlock(pda->pdlg.hDevNames);
|
GlobalUnlock(pdw->pdlg.hDevNames);
|
||||||
GlobalUnlock(pda->pdlg.hDevMode);
|
GlobalUnlock(pdw->pdlg.hDevMode);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2684,34 +2684,34 @@ PRINTDLG_PS_ChangePrinterA(HWND hDlg, PageSetupDataA *pda) {
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void PRINTDLG_PS_SetOrientationW(HWND hDlg, PageSetupDataW* pda)
|
static void PRINTDLG_PS_SetOrientationW(HWND hDlg, PageSetupDataW* pdw)
|
||||||
{
|
{
|
||||||
WCHAR PaperName[64];
|
WCHAR PaperName[64];
|
||||||
|
|
||||||
GetDlgItemTextW(hDlg, cmb2, PaperName, sizeof(PaperName)/sizeof(WCHAR));
|
GetDlgItemTextW(hDlg, cmb2, PaperName, sizeof(PaperName)/sizeof(WCHAR));
|
||||||
PRINTDLG_PaperSizeW(&pda->pdlg, PaperName, &pda->curdlg.ptPaperSize);
|
PRINTDLG_PaperSizeW(&pdw->pdlg, PaperName, &pdw->curdlg.ptPaperSize);
|
||||||
pda->curdlg.ptPaperSize.x = _c_10mm2size((LPPAGESETUPDLGA)pda->dlga, pda->curdlg.ptPaperSize.x);
|
pdw->curdlg.ptPaperSize.x = _c_10mm2size((LPPAGESETUPDLGA)pdw->dlgw, pdw->curdlg.ptPaperSize.x);
|
||||||
pda->curdlg.ptPaperSize.y = _c_10mm2size((LPPAGESETUPDLGA)pda->dlga, pda->curdlg.ptPaperSize.y);
|
pdw->curdlg.ptPaperSize.y = _c_10mm2size((LPPAGESETUPDLGA)pdw->dlgw, pdw->curdlg.ptPaperSize.y);
|
||||||
|
|
||||||
if(IsDlgButtonChecked(hDlg, rad2))
|
if(IsDlgButtonChecked(hDlg, rad2))
|
||||||
{
|
{
|
||||||
DWORD tmp = pda->curdlg.ptPaperSize.x;
|
DWORD tmp = pdw->curdlg.ptPaperSize.x;
|
||||||
pda->curdlg.ptPaperSize.x = pda->curdlg.ptPaperSize.y;
|
pdw->curdlg.ptPaperSize.x = pdw->curdlg.ptPaperSize.y;
|
||||||
pda->curdlg.ptPaperSize.y = tmp;
|
pdw->curdlg.ptPaperSize.y = tmp;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void PRINTDLG_PS_UpdatePrintDlgW(PageSetupDataW* pda, HWND hDlg)
|
static void PRINTDLG_PS_UpdatePrintDlgW(PageSetupDataW* pdw, HWND hDlg)
|
||||||
{
|
{
|
||||||
DEVMODEW* dm;
|
DEVMODEW* dm;
|
||||||
DWORD sel;
|
DWORD sel;
|
||||||
|
|
||||||
dm = GlobalLock(pda->pdlg.hDevMode);
|
dm = GlobalLock(pdw->pdlg.hDevMode);
|
||||||
|
|
||||||
if(!dm)
|
if(!dm)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if(pda->curdlg.ptPaperSize.y > pda->curdlg.ptPaperSize.x)
|
if(pdw->curdlg.ptPaperSize.y > pdw->curdlg.ptPaperSize.x)
|
||||||
dm->u1.s1.dmOrientation = DMORIENT_PORTRAIT;
|
dm->u1.s1.dmOrientation = DMORIENT_PORTRAIT;
|
||||||
else
|
else
|
||||||
dm->u1.s1.dmOrientation = DMORIENT_LANDSCAPE;
|
dm->u1.s1.dmOrientation = DMORIENT_LANDSCAPE;
|
||||||
|
@ -2721,17 +2721,17 @@ static void PRINTDLG_PS_UpdatePrintDlgW(PageSetupDataW* pda, HWND hDlg)
|
||||||
if(sel != CB_ERR)
|
if(sel != CB_ERR)
|
||||||
dm->u1.s1.dmPaperSize = SendDlgItemMessageW(hDlg, cmb2, CB_GETITEMDATA, sel, 0);
|
dm->u1.s1.dmPaperSize = SendDlgItemMessageW(hDlg, cmb2, CB_GETITEMDATA, sel, 0);
|
||||||
|
|
||||||
GlobalUnlock(pda->pdlg.hDevMode);
|
GlobalUnlock(pdw->pdlg.hDevMode);
|
||||||
}
|
}
|
||||||
|
|
||||||
static BOOL
|
static BOOL
|
||||||
PRINTDLG_PS_ChangePrinterW(HWND hDlg, PageSetupDataW *pda) {
|
PRINTDLG_PS_ChangePrinterW(HWND hDlg, PageSetupDataW *pdw) {
|
||||||
DEVNAMES *dn;
|
DEVNAMES *dn;
|
||||||
DEVMODEW *dm;
|
DEVMODEW *dm;
|
||||||
LPWSTR devname,portname;
|
LPWSTR devname,portname;
|
||||||
|
|
||||||
dn = GlobalLock(pda->pdlg.hDevNames);
|
dn = GlobalLock(pdw->pdlg.hDevNames);
|
||||||
dm = GlobalLock(pda->pdlg.hDevMode);
|
dm = GlobalLock(pdw->pdlg.hDevMode);
|
||||||
devname = ((WCHAR*)dn)+dn->wDeviceOffset;
|
devname = ((WCHAR*)dn)+dn->wDeviceOffset;
|
||||||
portname = ((WCHAR*)dn)+dn->wOutputOffset;
|
portname = ((WCHAR*)dn)+dn->wOutputOffset;
|
||||||
PRINTDLG_SetUpPaperComboBoxW(hDlg,cmb2,devname,portname,dm);
|
PRINTDLG_SetUpPaperComboBoxW(hDlg,cmb2,devname,portname,dm);
|
||||||
|
@ -2743,10 +2743,10 @@ PRINTDLG_PS_ChangePrinterW(HWND hDlg, PageSetupDataW *pda) {
|
||||||
else /* this is default if papersize is not set */
|
else /* this is default if papersize is not set */
|
||||||
CheckRadioButton(hDlg, rad1, rad2, rad1);
|
CheckRadioButton(hDlg, rad1, rad2, rad1);
|
||||||
|
|
||||||
GlobalUnlock(pda->pdlg.hDevNames);
|
GlobalUnlock(pdw->pdlg.hDevNames);
|
||||||
GlobalUnlock(pda->pdlg.hDevMode);
|
GlobalUnlock(pdw->pdlg.hDevMode);
|
||||||
|
|
||||||
PRINTDLG_PS_SetOrientationW(hDlg, pda);
|
PRINTDLG_PS_SetOrientationW(hDlg, pdw);
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
@ -2966,13 +2966,13 @@ PRINTDLG_PS_WMCommandA(
|
||||||
|
|
||||||
static BOOL
|
static BOOL
|
||||||
PRINTDLG_PS_WMCommandW(
|
PRINTDLG_PS_WMCommandW(
|
||||||
HWND hDlg, WPARAM wParam, LPARAM lParam, PageSetupDataW *pda
|
HWND hDlg, WPARAM wParam, LPARAM lParam, PageSetupDataW *pdw
|
||||||
) {
|
) {
|
||||||
TRACE("loword (lparam) %d, wparam 0x%lx, lparam %08lx\n",
|
TRACE("loword (lparam) %d, wparam 0x%lx, lparam %08lx\n",
|
||||||
LOWORD(lParam),wParam,lParam);
|
LOWORD(lParam),wParam,lParam);
|
||||||
switch (LOWORD(wParam)) {
|
switch (LOWORD(wParam)) {
|
||||||
case IDOK:
|
case IDOK:
|
||||||
if (!PRINTDLG_PS_UpdateDlgStructW(hDlg, pda))
|
if (!PRINTDLG_PS_UpdateDlgStructW(hDlg, pdw))
|
||||||
return(FALSE);
|
return(FALSE);
|
||||||
EndDialog(hDlg, TRUE);
|
EndDialog(hDlg, TRUE);
|
||||||
return TRUE ;
|
return TRUE ;
|
||||||
|
@ -2983,15 +2983,15 @@ PRINTDLG_PS_WMCommandW(
|
||||||
|
|
||||||
case rad1:
|
case rad1:
|
||||||
case rad2:
|
case rad2:
|
||||||
if((LOWORD(wParam) == rad1 && pda->curdlg.ptPaperSize.x > pda->curdlg.ptPaperSize.y) ||
|
if((LOWORD(wParam) == rad1 && pdw->curdlg.ptPaperSize.x > pdw->curdlg.ptPaperSize.y) ||
|
||||||
(LOWORD(wParam) == rad2 && pda->curdlg.ptPaperSize.y > pda->curdlg.ptPaperSize.x))
|
(LOWORD(wParam) == rad2 && pdw->curdlg.ptPaperSize.y > pdw->curdlg.ptPaperSize.x))
|
||||||
{
|
{
|
||||||
WCHAR tmpText[25];
|
WCHAR tmpText[25];
|
||||||
WCHAR tmpText2[25];
|
WCHAR tmpText2[25];
|
||||||
DWORD tmp = pda->curdlg.ptPaperSize.y;
|
DWORD tmp = pdw->curdlg.ptPaperSize.y;
|
||||||
|
|
||||||
pda->curdlg.ptPaperSize.y = pda->curdlg.ptPaperSize.x;
|
pdw->curdlg.ptPaperSize.y = pdw->curdlg.ptPaperSize.x;
|
||||||
pda->curdlg.ptPaperSize.x = tmp;
|
pdw->curdlg.ptPaperSize.x = tmp;
|
||||||
|
|
||||||
GetDlgItemTextW(hDlg, edt4, tmpText, sizeof(tmpText)/sizeof(WCHAR));
|
GetDlgItemTextW(hDlg, edt4, tmpText, sizeof(tmpText)/sizeof(WCHAR));
|
||||||
GetDlgItemTextW(hDlg, edt5, tmpText2, sizeof(tmpText2)/sizeof(WCHAR));
|
GetDlgItemTextW(hDlg, edt5, tmpText2, sizeof(tmpText2)/sizeof(WCHAR));
|
||||||
|
@ -3006,11 +3006,11 @@ PRINTDLG_PS_WMCommandW(
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case psh3: {
|
case psh3: {
|
||||||
pda->pdlg.Flags = 0;
|
pdw->pdlg.Flags = 0;
|
||||||
pda->pdlg.hwndOwner = hDlg;
|
pdw->pdlg.hwndOwner = hDlg;
|
||||||
PRINTDLG_PS_UpdatePrintDlgW(pda, hDlg);
|
PRINTDLG_PS_UpdatePrintDlgW(pdw, hDlg);
|
||||||
if (PrintDlgW(&(pda->pdlg)))
|
if (PrintDlgW(&(pdw->pdlg)))
|
||||||
PRINTDLG_PS_ChangePrinterW(hDlg,pda);
|
PRINTDLG_PS_ChangePrinterW(hDlg,pdw);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3352,82 +3352,82 @@ PageDlgProcW(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||||
static const WCHAR __WINE_PAGESETUPDLGDATA[] =
|
static const WCHAR __WINE_PAGESETUPDLGDATA[] =
|
||||||
{ '_', '_', 'W', 'I', 'N', 'E', '_', 'P', 'A', 'G', 'E',
|
{ '_', '_', 'W', 'I', 'N', 'E', '_', 'P', 'A', 'G', 'E',
|
||||||
'S', 'E', 'T', 'U', 'P', 'D', 'L', 'G', 'D', 'A', 'T', 'A', 0 };
|
'S', 'E', 'T', 'U', 'P', 'D', 'L', 'G', 'D', 'A', 'T', 'A', 0 };
|
||||||
PageSetupDataW *pda;
|
PageSetupDataW *pdw;
|
||||||
BOOL res = FALSE;
|
BOOL res = FALSE;
|
||||||
|
|
||||||
if (uMsg==WM_INITDIALOG) {
|
if (uMsg==WM_INITDIALOG) {
|
||||||
res = TRUE;
|
res = TRUE;
|
||||||
pda = (PageSetupDataW*)lParam;
|
pdw = (PageSetupDataW*)lParam;
|
||||||
pda->curdlg = *pda->dlga;
|
pdw->curdlg = *pdw->dlgw;
|
||||||
SetPropW(hDlg, __WINE_PAGESETUPDLGDATA, pda);
|
SetPropW(hDlg, __WINE_PAGESETUPDLGDATA, pdw);
|
||||||
if (pda->dlga->Flags & PSD_ENABLEPAGESETUPHOOK) {
|
if (pdw->dlgw->Flags & PSD_ENABLEPAGESETUPHOOK) {
|
||||||
res = pda->dlga->lpfnPageSetupHook(hDlg,uMsg,wParam,(LPARAM)pda->dlga);
|
res = pdw->dlgw->lpfnPageSetupHook(hDlg,uMsg,wParam,(LPARAM)pdw->dlgw);
|
||||||
if (!res) {
|
if (!res) {
|
||||||
FIXME("Setup page hook failed?\n");
|
FIXME("Setup page hook failed?\n");
|
||||||
res = TRUE;
|
res = TRUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pda->dlga->Flags & PSD_ENABLEPAGEPAINTHOOK) {
|
if (pdw->dlgw->Flags & PSD_ENABLEPAGEPAINTHOOK) {
|
||||||
FIXME("PagePaintHook not yet implemented!\n");
|
FIXME("PagePaintHook not yet implemented!\n");
|
||||||
}
|
}
|
||||||
if (pda->dlga->Flags & PSD_DISABLEPRINTER)
|
if (pdw->dlgw->Flags & PSD_DISABLEPRINTER)
|
||||||
EnableWindow(GetDlgItem(hDlg, psh3), FALSE);
|
EnableWindow(GetDlgItem(hDlg, psh3), FALSE);
|
||||||
if (pda->dlga->Flags & PSD_DISABLEMARGINS) {
|
if (pdw->dlgw->Flags & PSD_DISABLEMARGINS) {
|
||||||
EnableWindow(GetDlgItem(hDlg, edt4), FALSE);
|
EnableWindow(GetDlgItem(hDlg, edt4), FALSE);
|
||||||
EnableWindow(GetDlgItem(hDlg, edt5), FALSE);
|
EnableWindow(GetDlgItem(hDlg, edt5), FALSE);
|
||||||
EnableWindow(GetDlgItem(hDlg, edt6), FALSE);
|
EnableWindow(GetDlgItem(hDlg, edt6), FALSE);
|
||||||
EnableWindow(GetDlgItem(hDlg, edt7), FALSE);
|
EnableWindow(GetDlgItem(hDlg, edt7), FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
PRINTDLG_PS_ChangePrinterW(hDlg,pda);
|
PRINTDLG_PS_ChangePrinterW(hDlg,pdw);
|
||||||
|
|
||||||
if (pda->dlga->Flags & PSD_DISABLEORIENTATION) {
|
if (pdw->dlgw->Flags & PSD_DISABLEORIENTATION) {
|
||||||
EnableWindow(GetDlgItem(hDlg,rad1),FALSE);
|
EnableWindow(GetDlgItem(hDlg,rad1),FALSE);
|
||||||
EnableWindow(GetDlgItem(hDlg,rad2),FALSE);
|
EnableWindow(GetDlgItem(hDlg,rad2),FALSE);
|
||||||
}
|
}
|
||||||
/* We fill them out enabled or not */
|
/* We fill them out enabled or not */
|
||||||
if (pda->dlga->Flags & PSD_MARGINS) {
|
if (pdw->dlgw->Flags & PSD_MARGINS) {
|
||||||
WCHAR str[100];
|
WCHAR str[100];
|
||||||
_c_size2strW(pda,pda->dlga->rtMargin.left,str);
|
_c_size2strW(pdw,pdw->dlgw->rtMargin.left,str);
|
||||||
SetDlgItemTextW(hDlg,edt4,str);
|
SetDlgItemTextW(hDlg,edt4,str);
|
||||||
_c_size2strW(pda,pda->dlga->rtMargin.top,str);
|
_c_size2strW(pdw,pdw->dlgw->rtMargin.top,str);
|
||||||
SetDlgItemTextW(hDlg,edt5,str);
|
SetDlgItemTextW(hDlg,edt5,str);
|
||||||
_c_size2strW(pda,pda->dlga->rtMargin.right,str);
|
_c_size2strW(pdw,pdw->dlgw->rtMargin.right,str);
|
||||||
SetDlgItemTextW(hDlg,edt6,str);
|
SetDlgItemTextW(hDlg,edt6,str);
|
||||||
_c_size2strW(pda,pda->dlga->rtMargin.bottom,str);
|
_c_size2strW(pdw,pdw->dlgw->rtMargin.bottom,str);
|
||||||
SetDlgItemTextW(hDlg,edt7,str);
|
SetDlgItemTextW(hDlg,edt7,str);
|
||||||
} else {
|
} else {
|
||||||
/* default is 1 inch */
|
/* default is 1 inch */
|
||||||
DWORD size = _c_inch2size((LPPAGESETUPDLGA)pda->dlga,1000);
|
DWORD size = _c_inch2size((LPPAGESETUPDLGA)pdw->dlgw,1000);
|
||||||
WCHAR str[20];
|
WCHAR str[20];
|
||||||
_c_size2strW(pda,size,str);
|
_c_size2strW(pdw,size,str);
|
||||||
SetDlgItemTextW(hDlg,edt4,str);
|
SetDlgItemTextW(hDlg,edt4,str);
|
||||||
SetDlgItemTextW(hDlg,edt5,str);
|
SetDlgItemTextW(hDlg,edt5,str);
|
||||||
SetDlgItemTextW(hDlg,edt6,str);
|
SetDlgItemTextW(hDlg,edt6,str);
|
||||||
SetDlgItemTextW(hDlg,edt7,str);
|
SetDlgItemTextW(hDlg,edt7,str);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pda->dlga->Flags & PSD_DISABLEPAPER) {
|
if (pdw->dlgw->Flags & PSD_DISABLEPAPER) {
|
||||||
EnableWindow(GetDlgItem(hDlg,cmb2),FALSE);
|
EnableWindow(GetDlgItem(hDlg,cmb2),FALSE);
|
||||||
EnableWindow(GetDlgItem(hDlg,cmb3),FALSE);
|
EnableWindow(GetDlgItem(hDlg,cmb3),FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
} else {
|
} else {
|
||||||
pda = (PageSetupDataW*)GetPropW(hDlg, __WINE_PAGESETUPDLGDATA);
|
pdw = (PageSetupDataW*)GetPropW(hDlg, __WINE_PAGESETUPDLGDATA);
|
||||||
if (!pda) {
|
if (!pdw) {
|
||||||
WARN("__WINE_PAGESETUPDLGDATA prop not set?\n");
|
WARN("__WINE_PAGESETUPDLGDATA prop not set?\n");
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
if (pda->dlga->Flags & PSD_ENABLEPAGESETUPHOOK) {
|
if (pdw->dlgw->Flags & PSD_ENABLEPAGESETUPHOOK) {
|
||||||
res = pda->dlga->lpfnPageSetupHook(hDlg,uMsg,wParam,lParam);
|
res = pdw->dlgw->lpfnPageSetupHook(hDlg,uMsg,wParam,lParam);
|
||||||
if (res) return res;
|
if (res) return res;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
switch (uMsg) {
|
switch (uMsg) {
|
||||||
case WM_COMMAND:
|
case WM_COMMAND:
|
||||||
return PRINTDLG_PS_WMCommandW(hDlg, wParam, lParam, pda);
|
return PRINTDLG_PS_WMCommandW(hDlg, wParam, lParam, pdw);
|
||||||
}
|
}
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
@ -3630,7 +3630,7 @@ BOOL WINAPI PageSetupDlgW(LPPAGESETUPDLGW setupdlg) {
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
pdw = HeapAlloc(GetProcessHeap(),0,sizeof(*pdw));
|
pdw = HeapAlloc(GetProcessHeap(),0,sizeof(*pdw));
|
||||||
pdw->dlga = setupdlg;
|
pdw->dlgw = setupdlg;
|
||||||
pdw->pdlg = pdlg;
|
pdw->pdlg = pdlg;
|
||||||
|
|
||||||
bRet = (0<DialogBoxIndirectParamW(
|
bRet = (0<DialogBoxIndirectParamW(
|
||||||
|
|
Loading…
Reference in New Issue