From ad52ae67a561aceae50f9fed7a7b099cf7893ef8 Mon Sep 17 00:00:00 2001 From: Dylan Smith Date: Wed, 27 Jan 2010 02:25:21 -0500 Subject: [PATCH] wordpad: Don't render the text when getting the number of pages. EM_FORMATRANGE will render the text if wParam is non-zero, and there is no reason to actually render the text when just getting the number of pages. --- programs/wordpad/print.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/programs/wordpad/print.c b/programs/wordpad/print.c index b920a4f3a69..a6bdf4081c0 100644 --- a/programs/wordpad/print.c +++ b/programs/wordpad/print.c @@ -245,7 +245,7 @@ static int get_num_pages(HWND hEditorWnd, FORMATRANGE fr) { int bottom = fr.rc.bottom; page++; - fr.chrg.cpMin = SendMessageW(hEditorWnd, EM_FORMATRANGE, TRUE, + fr.chrg.cpMin = SendMessageW(hEditorWnd, EM_FORMATRANGE, FALSE, (LPARAM)&fr); fr.rc.bottom = bottom; } @@ -263,7 +263,7 @@ static void char_from_pagenum(HWND hEditorWnd, FORMATRANGE *fr, int page) for(i = 1; i < page; i++) { int bottom = fr->rc.bottom; - fr->chrg.cpMin = SendMessageW(hEditorWnd, EM_FORMATRANGE, TRUE, (LPARAM)fr); + fr->chrg.cpMin = SendMessageW(hEditorWnd, EM_FORMATRANGE, FALSE, (LPARAM)fr); fr->rc.bottom = bottom; } }