From 2004d2b2f687846ca0120462c8f50e3012368dc0 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Mon, 14 Apr 2008 12:05:57 +0200 Subject: [PATCH] wordpad: Don't pass an invalid DC to CreateCompatibleDC. --- programs/wordpad/print.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/programs/wordpad/print.c b/programs/wordpad/print.c index aa9ac71225c..c0cd182d17e 100644 --- a/programs/wordpad/print.c +++ b/programs/wordpad/print.c @@ -500,7 +500,7 @@ static void add_ruler_units(HDC hdcRuler, RECT* drawRect, BOOL NewMetrics, long DeleteObject(hBitmap); } - hdc = CreateCompatibleDC(hdc); + hdc = CreateCompatibleDC(0); CmPixels = twips_to_pixels(TWIPS_PER_CM, GetDeviceCaps(hdc, LOGPIXELSX)); QuarterCmPixels = (int)((float)CmPixels / 4.0);