📄 comdlg32_ros.diff
字号:
Index: printdlg.c
===================================================================
--- printdlg.c (revision 23123)
+++ printdlg.c (working copy)
@@ -347,7 +347,7 @@
lpdm->dmCollate =
(IsDlgButtonChecked(hDlg, chx2) == BST_CHECKED);
if (lpdm->dmFields & DM_COPIES)
- lpdm->dmCopies = GetDlgItemInt(hDlg, edt3, NULL, FALSE);
+ lpdm->u.s.dmCopies = GetDlgItemInt(hDlg, edt3, NULL, FALSE);
} else {
if (IsDlgButtonChecked(hDlg, chx2) == BST_CHECKED)
lppd->Flags |= PD_COLLATE;
@@ -425,7 +425,7 @@
lpdm->dmCollate =
(IsDlgButtonChecked(hDlg, chx2) == BST_CHECKED);
if (lpdm->dmFields & DM_COPIES)
- lpdm->dmCopies = GetDlgItemInt(hDlg, edt3, NULL, FALSE);
+ lpdm->u.s.dmCopies = GetDlgItemInt(hDlg, edt3, NULL, FALSE);
} else {
if (IsDlgButtonChecked(hDlg, chx2) == BST_CHECKED)
lppd->Flags |= PD_COLLATE;
@@ -590,9 +590,9 @@
Sel, 0);
if (dm) {
if (nIDComboBox == cmb2)
- dm->u1.s1.dmPaperSize = oldWord;
+ dm->u.s.dmPaperSize = oldWord;
else
- dm->dmDefaultSource = oldWord;
+ dm->u.s.dmDefaultSource = oldWord;
}
}
else {
@@ -602,9 +602,9 @@
*/
if (dm) {
if (nIDComboBox == cmb2)
- oldWord = dm->u1.s1.dmPaperSize;
+ oldWord = dm->u.s.dmPaperSize;
else
- oldWord = dm->dmDefaultSource;
+ oldWord = dm->u.s.dmDefaultSource;
}
}
@@ -700,9 +700,9 @@
Sel, 0);
if (dm) {
if (nIDComboBox == cmb2)
- dm->u1.s1.dmPaperSize = oldWord;
+ dm->u.s.dmPaperSize = oldWord;
else
- dm->dmDefaultSource = oldWord;
+ dm->u.s.dmDefaultSource = oldWord;
}
}
else {
@@ -712,9 +712,9 @@
*/
if (dm) {
if (nIDComboBox == cmb2)
- oldWord = dm->u1.s1.dmPaperSize;
+ oldWord = dm->u.s.dmPaperSize;
else
- oldWord = dm->dmDefaultSource;
+ oldWord = dm->u.s.dmDefaultSource;
}
}
@@ -964,7 +964,7 @@
if (lppd->hDevMode == 0)
copies = lppd->nCopies;
else
- copies = lpdm->dmCopies;
+ copies = lpdm->u.s.dmCopies;
if(copies == 0) copies = 1;
else if(copies < 0) copies = MAX_COPIES;
SetDlgItemInt(hDlg, edt3, copies, FALSE);
@@ -986,7 +986,7 @@
ShowWindow(GetDlgItem(hDlg, chx1), SW_HIDE);
} else { /* PD_PRINTSETUP */
- BOOL bPortrait = (lpdm->u1.s1.dmOrientation == DMORIENT_PORTRAIT);
+ BOOL bPortrait = (lpdm->u.s.dmOrientation == DMORIENT_PORTRAIT);
PRINTDLG_SetUpPaperComboBoxA(hDlg, cmb2,
PrintStructures->lpPrinterInfo->pPrinterName,
@@ -1113,7 +1113,7 @@
if (lppd->hDevMode == 0)
copies = lppd->nCopies;
else
- copies = lpdm->dmCopies;
+ copies = lpdm->u.s.dmCopies;
if(copies == 0) copies = 1;
else if(copies < 0) copies = MAX_COPIES;
SetDlgItemInt(hDlg, edt3, copies, FALSE);
@@ -1135,7 +1135,7 @@
ShowWindow(GetDlgItem(hDlg, chx1), SW_HIDE);
} else { /* PD_PRINTSETUP */
- BOOL bPortrait = (lpdm->u1.s1.dmOrientation == DMORIENT_PORTRAIT);
+ BOOL bPortrait = (lpdm->u.s.dmOrientation == DMORIENT_PORTRAIT);
PRINTDLG_SetUpPaperComboBoxW(hDlg, cmb2,
PrintStructures->lpPrinterInfo->pPrinterName,
@@ -1509,7 +1509,7 @@
case rad1: /* Paperorientation */
if (lppd->Flags & PD_PRINTSETUP)
{
- lpdm->u1.s1.dmOrientation = DMORIENT_PORTRAIT;
+ lpdm->u.s.dmOrientation = DMORIENT_PORTRAIT;
SendDlgItemMessageA(hDlg, ico1, STM_SETIMAGE, (WPARAM) IMAGE_ICON,
(LPARAM)(PrintStructures->hPortraitIcon));
}
@@ -1518,7 +1518,7 @@
case rad2: /* Paperorientation */
if (lppd->Flags & PD_PRINTSETUP)
{
- lpdm->u1.s1.dmOrientation = DMORIENT_LANDSCAPE;
+ lpdm->u.s.dmOrientation = DMORIENT_LANDSCAPE;
SendDlgItemMessageA(hDlg, ico1, STM_SETIMAGE, (WPARAM) IMAGE_ICON,
(LPARAM)(PrintStructures->hLandscapeIcon));
}
@@ -1542,7 +1542,7 @@
{
DWORD Sel = SendDlgItemMessageA(hDlg, cmb2, CB_GETCURSEL, 0, 0);
if(Sel != CB_ERR)
- lpdm->u1.s1.dmPaperSize = SendDlgItemMessageA(hDlg, cmb2,
+ lpdm->u.s.dmPaperSize = SendDlgItemMessageA(hDlg, cmb2,
CB_GETITEMDATA,
Sel, 0);
}
@@ -1552,7 +1552,7 @@
{
DWORD Sel = SendDlgItemMessageA(hDlg, cmb3, CB_GETCURSEL, 0, 0);
if(Sel != CB_ERR)
- lpdm->dmDefaultSource = SendDlgItemMessageA(hDlg, cmb3,
+ lpdm->u.s.dmDefaultSource = SendDlgItemMessageA(hDlg, cmb3,
CB_GETITEMDATA, Sel,
0);
}
@@ -1563,8 +1563,8 @@
case rad1: /* orientation */
case rad2:
if (IsDlgButtonChecked(hDlg, rad1) == BST_CHECKED) {
- if(lpdm->u1.s1.dmOrientation != DMORIENT_PORTRAIT) {
- lpdm->u1.s1.dmOrientation = DMORIENT_PORTRAIT;
+ if(lpdm->u.s.dmOrientation != DMORIENT_PORTRAIT) {
+ lpdm->u.s.dmOrientation = DMORIENT_PORTRAIT;
SendDlgItemMessageA(hDlg, stc10, STM_SETIMAGE,
(WPARAM)IMAGE_ICON,
(LPARAM)PrintStructures->hPortraitIcon);
@@ -1573,8 +1573,8 @@
(LPARAM)PrintStructures->hPortraitIcon);
}
} else {
- if(lpdm->u1.s1.dmOrientation != DMORIENT_LANDSCAPE) {
- lpdm->u1.s1.dmOrientation = DMORIENT_LANDSCAPE;
+ if(lpdm->u.s.dmOrientation != DMORIENT_LANDSCAPE) {
+ lpdm->u.s.dmOrientation = DMORIENT_LANDSCAPE;
SendDlgItemMessageA(hDlg, stc10, STM_SETIMAGE,
(WPARAM)IMAGE_ICON,
(LPARAM)PrintStructures->hLandscapeIcon);
@@ -1673,7 +1673,7 @@
case rad1: /* Paperorientation */
if (lppd->Flags & PD_PRINTSETUP)
{
- lpdm->u1.s1.dmOrientation = DMORIENT_PORTRAIT;
+ lpdm->u.s.dmOrientation = DMORIENT_PORTRAIT;
SendDlgItemMessageW(hDlg, ico1, STM_SETIMAGE, (WPARAM) IMAGE_ICON,
(LPARAM)(PrintStructures->hPortraitIcon));
}
@@ -1682,7 +1682,7 @@
case rad2: /* Paperorientation */
if (lppd->Flags & PD_PRINTSETUP)
{
- lpdm->u1.s1.dmOrientation = DMORIENT_LANDSCAPE;
+ lpdm->u.s.dmOrientation = DMORIENT_LANDSCAPE;
SendDlgItemMessageW(hDlg, ico1, STM_SETIMAGE, (WPARAM) IMAGE_ICON,
(LPARAM)(PrintStructures->hLandscapeIcon));
}
@@ -1706,7 +1706,7 @@
{
DWORD Sel = SendDlgItemMessageW(hDlg, cmb2, CB_GETCURSEL, 0, 0);
if(Sel != CB_ERR)
- lpdm->u1.s1.dmPaperSize = SendDlgItemMessageW(hDlg, cmb2,
+ lpdm->u.s.dmPaperSize = SendDlgItemMessageW(hDlg, cmb2,
CB_GETITEMDATA,
Sel, 0);
}
@@ -1716,7 +1716,7 @@
{
DWORD Sel = SendDlgItemMessageW(hDlg, cmb3, CB_GETCURSEL, 0, 0);
if(Sel != CB_ERR)
- lpdm->dmDefaultSource = SendDlgItemMessageW(hDlg, cmb3,
+ lpdm->u.s.dmDefaultSource = SendDlgItemMessageW(hDlg, cmb3,
CB_GETITEMDATA, Sel,
0);
}
@@ -1727,8 +1727,8 @@
case rad1: /* orientation */
case rad2:
if (IsDlgButtonChecked(hDlg, rad1) == BST_CHECKED) {
- if(lpdm->u1.s1.dmOrientation != DMORIENT_PORTRAIT) {
- lpdm->u1.s1.dmOrientation = DMORIENT_PORTRAIT;
+ if(lpdm->u.s.dmOrientation != DMORIENT_PORTRAIT) {
+ lpdm->u.s.dmOrientation = DMORIENT_PORTRAIT;
SendDlgItemMessageW(hDlg, stc10, STM_SETIMAGE,
(WPARAM)IMAGE_ICON,
(LPARAM)PrintStructures->hPortraitIcon);
@@ -1737,8 +1737,8 @@
(LPARAM)PrintStructures->hPortraitIcon);
}
} else {
- if(lpdm->u1.s1.dmOrientation != DMORIENT_LANDSCAPE) {
- lpdm->u1.s1.dmOrientation = DMORIENT_LANDSCAPE;
+ if(lpdm->u.s.dmOrientation != DMORIENT_LANDSCAPE) {
+ lpdm->u.s.dmOrientation = DMORIENT_LANDSCAPE;
SendDlgItemMessageW(hDlg, stc10, STM_SETIMAGE,
(WPARAM)IMAGE_ICON,
(LPARAM)PrintStructures->hLandscapeIcon);
@@ -2499,15 +2499,15 @@
/* Save paper orientation into device context */
if(pda->curdlg.ptPaperSize.x > pda->curdlg.ptPaperSize.y)
- dm->u1.s1.dmOrientation = DMORIENT_LANDSCAPE;
+ dm->u.s.dmOrientation = DMORIENT_LANDSCAPE;
else
- dm->u1.s1.dmOrientation = DMORIENT_PORTRAIT;
+ dm->u.s.dmOrientation = DMORIENT_PORTRAIT;
/* Save paper size into the device context */
paperword = SendDlgItemMessageA(hDlg,cmb2,CB_GETITEMDATA,
SendDlgItemMessageA(hDlg, cmb2, CB_GETCURSEL, 0, 0), 0);
if (paperword != CB_ERR)
- dm->u1.s1.dmPaperSize = paperword;
+ dm->u.s.dmPaperSize = paperword;
else
FIXME("could not get dialog text for papersize cmbbox?\n");
@@ -2515,7 +2515,7 @@
paperword = SendDlgItemMessageA(hDlg,cmb1,CB_GETITEMDATA,
SendDlgItemMessageA(hDlg, cmb1, CB_GETCURSEL, 0, 0), 0);
if (paperword != CB_ERR)
- dm->dmDefaultSource = paperword;
+ dm->u.s.dmDefaultSource = paperword;
else
FIXME("could not get dialog text for papersize cmbbox?\n");
@@ -2809,7 +2809,7 @@
case cmb3:
if(msg == CBN_SELCHANGE){
DEVMODEA *dm = GlobalLock(pda->pdlg.hDevMode);
- dm->dmDefaultSource = SendDlgItemMessageA(hDlg, cmb3,CB_GETITEMDATA,
+ dm->u.s.dmDefaultSource = SendDlgItemMessageA(hDlg, cmb3,CB_GETITEMDATA,
SendDlgItemMessageA(hDlg, cmb3, CB_GETCURSEL, 0, 0), 0);
GlobalUnlock(pda->pdlg.hDevMode);
}
@@ -2832,10 +2832,10 @@
DM_IN_BUFFER | DM_OUT_BUFFER | DM_IN_PROMPT);
ClosePrinter(hPrinter);
/* Changing paper */
- PRINTDLG_PaperSizeA(&(pda->pdlg), dm->u1.s1.dmPaperSize, &(pda->curdlg.ptPaperSize));
+ PRINTDLG_PaperSizeA(&(pda->pdlg), dm->u.s.dmPaperSize, &(pda->curdlg.ptPaperSize));
pda->curdlg.ptPaperSize.x = _c_10mm2size(pda->dlga, pda->curdlg.ptPaperSize.x);
pda->curdlg.ptPaperSize.y = _c_10mm2size(pda->dlga, pda->curdlg.ptPaperSize.y);
- if (dm->u1.s1.dmOrientation == DMORIENT_LANDSCAPE){
+ if (dm->u.s.dmOrientation == DMORIENT_LANDSCAPE){
DWORD tmp = pda->curdlg.ptPaperSize.x;
pda->curdlg.ptPaperSize.x = pda->curdlg.ptPaperSize.y;
pda->curdlg.ptPaperSize.y = tmp;
@@ -2849,7 +2849,7 @@
count = SendDlgItemMessageA(hDlg, cmb2, CB_GETCOUNT, 0, 0);
if(count != CB_ERR){
for(i=0; i<count; ++i){
- if(SendDlgItemMessageA(hDlg, cmb2, CB_GETITEMDATA, i, 0) == dm->u1.s1.dmPaperSize) {
+ if(SendDlgItemMessageA(hDlg, cmb2, CB_GETITEMDATA, i, 0) == dm->u.s.dmPaperSize) {
SendDlgItemMessageA(hDlg, cmb2, CB_SETCURSEL, i, 0);
break;
}
@@ -3153,7 +3153,7 @@
}
/* Set orientation radiobutton properly */
dm = GlobalLock(pda->dlga->hDevMode);
- if (dm->u1.s1.dmOrientation == DMORIENT_LANDSCAPE)
+ if (dm->u.s.dmOrientation == DMORIENT_LANDSCAPE)
CheckRadioButton(hDlg, rad1, rad2, rad2);
else /* this is default if papersize is not set */
CheckRadioButton(hDlg, rad1, rad2, rad1);
@@ -3198,8 +3198,8 @@
PRINTDLG_PS_ChangePrinterA(hDlg, pda);
dm = GlobalLock(pda->pdlg.hDevMode);
if(dm){
- dm->dmDefaultSource = 15; /*FIXME: Automatic select. Does it always 15 at start? */
- PRINTDLG_PaperSizeA(&(pda->pdlg), dm->u1.s1.dmPaperSize, &pda->curdlg.ptPaperSize);
+ dm->u.s.dmDefaultSource = 15; /*FIXME: Automatic select. Does it always 15 at start? */
+ PRINTDLG_PaperSizeA(&(pda->pdlg), dm->u.s.dmPaperSize, &pda->curdlg.ptPaperSize);
GlobalUnlock(pda->pdlg.hDevMode);
pda->curdlg.ptPaperSize.x = _c_10mm2size(pda->dlga, pda->curdlg.ptPaperSize.x);
pda->curdlg.ptPaperSize.y = _c_10mm2size(pda->dlga, pda->curdlg.ptPaperSize.y);
@@ -3401,7 +3401,7 @@
DEVMODEA *dm;
dm = GlobalLock(pdlg.hDevMode);
- PRINTDLG_PaperSizeA(&pdlg, dm->u1.s1.dmPaperSize, &setupdlg->ptPaperSize);
+ PRINTDLG_PaperSizeA(&pdlg, dm->u.s.dmPaperSize, &setupdlg->ptPaperSize);
GlobalUnlock(pdlg.hDevMode);
setupdlg->ptPaperSize.x=_c_10mm2size(setupdlg,setupdlg->ptPaperSize.x);
setupdlg->ptPaperSize.y=_c_10mm2size(setupdlg,setupdlg->ptPaperSize.y);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -