wordpad: Fixed quick print so that it doesn't print blank pages.

This commit is contained in:
Dylan Smith 2010-02-10 02:38:40 -05:00 committed by Alexandre Julliard
parent 6a6c8e3ee2
commit 7aba35c608
3 changed files with 4 additions and 3 deletions

View File

@ -403,11 +403,12 @@ void get_default_printer_opts(void)
devNames = pd.hDevNames; devNames = pd.hDevNames;
} }
void print_quick(LPWSTR wszFileName) void print_quick(HWND hMainWnd, LPWSTR wszFileName)
{ {
PRINTDLGW pd; PRINTDLGW pd;
ZeroMemory(&pd, sizeof(pd)); ZeroMemory(&pd, sizeof(pd));
pd.hwndOwner = hMainWnd;
pd.hDC = make_dc(); pd.hDC = make_dc();
print(&pd, wszFileName); print(&pd, wszFileName);

View File

@ -2098,7 +2098,7 @@ static LRESULT OnCommand( HWND hWnd, WPARAM wParam, LPARAM lParam)
break; break;
case ID_PRINT_QUICK: case ID_PRINT_QUICK:
print_quick(wszFileName); print_quick(hMainWnd, wszFileName);
target_device(hMainWnd, wordWrap[reg_formatindex(fileFormat)]); target_device(hMainWnd, wordWrap[reg_formatindex(fileFormat)]);
break; break;

View File

@ -217,7 +217,7 @@ LPWSTR file_basename(LPWSTR);
void dialog_printsetup(HWND); void dialog_printsetup(HWND);
void dialog_print(HWND, LPWSTR); void dialog_print(HWND, LPWSTR);
void target_device(HWND, DWORD); void target_device(HWND, DWORD);
void print_quick(LPWSTR); void print_quick(HWND, LPWSTR);
LRESULT preview_command(HWND, WPARAM); LRESULT preview_command(HWND, WPARAM);
void init_preview(HWND, LPWSTR); void init_preview(HWND, LPWSTR);
void close_preview(HWND); void close_preview(HWND);