From dc525e8c40f23383252af7d77125ca64f42e8bd7 Mon Sep 17 00:00:00 2001 From: Michael Stefaniuc Date: Mon, 6 Jun 2016 11:16:40 +0200 Subject: [PATCH] wordpad: Use OffsetRect() instead of open coding it. Signed-off-by: Michael Stefaniuc Signed-off-by: Alexandre Julliard --- programs/wordpad/print.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/programs/wordpad/print.c b/programs/wordpad/print.c index 9021989df66..b3ee579d4d7 100644 --- a/programs/wordpad/print.c +++ b/programs/wordpad/print.c @@ -723,10 +723,7 @@ static void draw_margin_lines(HDC hdc, int x, int y, float ratio) page_margin.bottom = (int)((float)twips_to_pixels(page_margin.bottom, dpi.cy) * ratio); page_margin.right = (int)((float)twips_to_pixels(page_margin.right, dpi.cx) * ratio); - page_margin.left += x; - page_margin.top += y; - page_margin.bottom += y; - page_margin.right += x; + OffsetRect(&page_margin, x, y); hPen = CreatePen(PS_DOT, 1, RGB(0,0,0)); oldPen = SelectObject(hdc, hPen);