Commit ad52ae67 authored by Dylan Smith's avatar Dylan Smith Committed by Alexandre Julliard

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.
parent fc473e0f
...@@ -245,7 +245,7 @@ static int get_num_pages(HWND hEditorWnd, FORMATRANGE fr) ...@@ -245,7 +245,7 @@ static int get_num_pages(HWND hEditorWnd, FORMATRANGE fr)
{ {
int bottom = fr.rc.bottom; int bottom = fr.rc.bottom;
page++; page++;
fr.chrg.cpMin = SendMessageW(hEditorWnd, EM_FORMATRANGE, TRUE, fr.chrg.cpMin = SendMessageW(hEditorWnd, EM_FORMATRANGE, FALSE,
(LPARAM)&fr); (LPARAM)&fr);
fr.rc.bottom = bottom; fr.rc.bottom = bottom;
} }
...@@ -263,7 +263,7 @@ static void char_from_pagenum(HWND hEditorWnd, FORMATRANGE *fr, int page) ...@@ -263,7 +263,7 @@ static void char_from_pagenum(HWND hEditorWnd, FORMATRANGE *fr, int page)
for(i = 1; i < page; i++) for(i = 1; i < page; i++)
{ {
int bottom = fr->rc.bottom; 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; fr->rc.bottom = bottom;
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment