mirror of
git://source.winehq.org/git/wine.git
synced 2024-08-31 18:03:38 +00:00
notepad: Remember options selected in the print setup dialog.
This commit is contained in:
parent
b555e91e80
commit
8be66cb30e
|
@ -407,6 +407,8 @@ VOID DIALOG_FilePrint(VOID)
|
||||||
ZeroMemory(&printer, sizeof(printer));
|
ZeroMemory(&printer, sizeof(printer));
|
||||||
printer.lStructSize = sizeof(printer);
|
printer.lStructSize = sizeof(printer);
|
||||||
printer.hwndOwner = Globals.hMainWnd;
|
printer.hwndOwner = Globals.hMainWnd;
|
||||||
|
printer.hDevMode = Globals.hDevMode;
|
||||||
|
printer.hDevNames = Globals.hDevNames;
|
||||||
printer.hInstance = Globals.hInstance;
|
printer.hInstance = Globals.hInstance;
|
||||||
|
|
||||||
/* Set some default flags */
|
/* Set some default flags */
|
||||||
|
@ -422,6 +424,9 @@ VOID DIALOG_FilePrint(VOID)
|
||||||
|
|
||||||
if (!PrintDlg(&printer)) return;
|
if (!PrintDlg(&printer)) return;
|
||||||
|
|
||||||
|
Globals.hDevMode = printer.hDevMode;
|
||||||
|
Globals.hDevNames = printer.hDevNames;
|
||||||
|
|
||||||
assert(printer.hDC != 0);
|
assert(printer.hDC != 0);
|
||||||
|
|
||||||
/* initialize DOCINFO */
|
/* initialize DOCINFO */
|
||||||
|
@ -519,11 +524,16 @@ VOID DIALOG_FilePrinterSetup(VOID)
|
||||||
ZeroMemory(&printer, sizeof(printer));
|
ZeroMemory(&printer, sizeof(printer));
|
||||||
printer.lStructSize = sizeof(printer);
|
printer.lStructSize = sizeof(printer);
|
||||||
printer.hwndOwner = Globals.hMainWnd;
|
printer.hwndOwner = Globals.hMainWnd;
|
||||||
|
printer.hDevMode = Globals.hDevMode;
|
||||||
|
printer.hDevNames = Globals.hDevNames;
|
||||||
printer.hInstance = Globals.hInstance;
|
printer.hInstance = Globals.hInstance;
|
||||||
printer.Flags = PD_PRINTSETUP;
|
printer.Flags = PD_PRINTSETUP;
|
||||||
printer.nCopies = 1;
|
printer.nCopies = 1;
|
||||||
|
|
||||||
PrintDlg(&printer);
|
PrintDlg(&printer);
|
||||||
|
|
||||||
|
Globals.hDevMode = printer.hDevMode;
|
||||||
|
Globals.hDevNames = printer.hDevNames;
|
||||||
}
|
}
|
||||||
|
|
||||||
VOID DIALOG_FileExit(VOID)
|
VOID DIALOG_FileExit(VOID)
|
||||||
|
|
|
@ -141,6 +141,8 @@ static VOID NOTEPAD_InitData(VOID)
|
||||||
lstrcpy(p, all_files);
|
lstrcpy(p, all_files);
|
||||||
p += lstrlen(p) + 1;
|
p += lstrlen(p) + 1;
|
||||||
*p = '\0';
|
*p = '\0';
|
||||||
|
Globals.hDevMode = NULL;
|
||||||
|
Globals.hDevNames = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
|
|
|
@ -46,6 +46,8 @@ typedef struct
|
||||||
WCHAR szFooter[MAX_PATH];
|
WCHAR szFooter[MAX_PATH];
|
||||||
|
|
||||||
FINDREPLACE find;
|
FINDREPLACE find;
|
||||||
|
HGLOBAL hDevMode; /* printer mode */
|
||||||
|
HGLOBAL hDevNames; /* printer names */
|
||||||
} NOTEPAD_GLOBALS;
|
} NOTEPAD_GLOBALS;
|
||||||
|
|
||||||
extern NOTEPAD_GLOBALS Globals;
|
extern NOTEPAD_GLOBALS Globals;
|
||||||
|
|
Loading…
Reference in a new issue