- strmini.h: Include windef.h so CDECL gets defined for msvc version of DEFINE_GUIDEX...
[reactos.git] / reactos / base / applications / paint / drawing.c
index 2bae28b..bb8d24a 100644 (file)
@@ -81,12 +81,13 @@ void Poly(HDC hdc, POINT *lpPoints, int nCount, int fg, int bg, int thickness, i
 
 void Bezier(HDC hdc, POINT p1, POINT p2, POINT p3, POINT p4, int color, int thickness)
 {
+    HPEN oldPen;
     POINT fourPoints[4];
     fourPoints[0] = p1;
     fourPoints[1] = p2;
     fourPoints[2] = p3;
     fourPoints[3] = p4;
-    HPEN oldPen = SelectObject(hdc, CreatePen(PS_SOLID, thickness, color));
+    oldPen = SelectObject(hdc, CreatePen(PS_SOLID, thickness, color));
     PolyBezier(hdc, fourPoints, 4);
     DeleteObject(SelectObject(hdc, oldPen));
 }