notepad: Remember options selected in the print setup dialog.
diff --git a/programs/notepad/dialog.c b/programs/notepad/dialog.c
index f5e74e2..28d1b6d 100644
--- a/programs/notepad/dialog.c
+++ b/programs/notepad/dialog.c
@@ -407,6 +407,8 @@
     ZeroMemory(&printer, sizeof(printer));
     printer.lStructSize           = sizeof(printer);
     printer.hwndOwner             = Globals.hMainWnd;
+    printer.hDevMode              = Globals.hDevMode;
+    printer.hDevNames             = Globals.hDevNames;
     printer.hInstance             = Globals.hInstance;
     
     /* Set some default flags */
@@ -422,6 +424,9 @@
 
     if (!PrintDlg(&printer)) return;
 
+    Globals.hDevMode = printer.hDevMode;
+    Globals.hDevNames = printer.hDevNames;
+
     assert(printer.hDC != 0);
 
     /* initialize DOCINFO */
@@ -519,11 +524,16 @@
     ZeroMemory(&printer, sizeof(printer));
     printer.lStructSize         = sizeof(printer);
     printer.hwndOwner           = Globals.hMainWnd;
+    printer.hDevMode            = Globals.hDevMode;
+    printer.hDevNames           = Globals.hDevNames;
     printer.hInstance           = Globals.hInstance;
     printer.Flags               = PD_PRINTSETUP;
     printer.nCopies             = 1;
 
     PrintDlg(&printer);
+
+    Globals.hDevMode = printer.hDevMode;
+    Globals.hDevNames = printer.hDevNames;
 }
 
 VOID DIALOG_FileExit(VOID)
diff --git a/programs/notepad/main.c b/programs/notepad/main.c
index 403fd96..4d7e39c 100644
--- a/programs/notepad/main.c
+++ b/programs/notepad/main.c
@@ -141,6 +141,8 @@
     lstrcpy(p, all_files);
     p += lstrlen(p) + 1;
     *p = '\0';
+    Globals.hDevMode = NULL;
+    Globals.hDevNames = NULL;
 }
 
 /***********************************************************************
diff --git a/programs/notepad/main.h b/programs/notepad/main.h
index 06517d0..3a40c09 100644
--- a/programs/notepad/main.h
+++ b/programs/notepad/main.h
@@ -46,6 +46,8 @@
   WCHAR   szFooter[MAX_PATH];
 
   FINDREPLACE find;
+  HGLOBAL hDevMode; /* printer mode */
+  HGLOBAL hDevNames; /* printer names */
 } NOTEPAD_GLOBALS;
 
 extern NOTEPAD_GLOBALS Globals;