From: Emanuele Aliberti Date: Sat, 28 Jul 2001 10:05:36 +0000 (+0000) Subject: Make gditest draw a background. X-Git-Tag: ReactOS-0.0.18~15 X-Git-Url: https://git.reactos.org/?p=reactos.git;a=commitdiff_plain;h=920ae420eeb6f17e3de7886961acc8bdcb920937 Make gditest draw a background. Mostly PR to show we can do graphics... svn path=/trunk/; revision=2112 --- diff --git a/reactos/apps/tests/gditest/gditest.c b/reactos/apps/tests/gditest/gditest.c index fb2fbec4a29..fb97e14c57d 100644 --- a/reactos/apps/tests/gditest/gditest.c +++ b/reactos/apps/tests/gditest/gditest.c @@ -6,6 +6,29 @@ extern BOOL STDCALL GdiDllInitialize(HANDLE hInstance, DWORD Event, LPVOID Reserved); +void __stdcall Background (HDC Desktop) +{ + HPEN Pen; + int x, y; + + Pen = CreatePen(PS_SOLID, 1, RGB(64, 64, 128)); + + SelectObject (Desktop, Pen); + + MoveToEx (Desktop, 0, 0, NULL); + LineTo (Desktop, 640, 480); + for (y = 480, x = 0; x < 640; x+=2) + { + MoveToEx (Desktop, 0, 0, NULL); + LineTo (Desktop, x, y); + } + for (y = 0, x = 640; y < 480; y+=2) + { + MoveToEx (Desktop, 0, 0, NULL); + LineTo (Desktop, x, y); + } +} + int main (void) { HDC Desktop, MyDC, DC24; @@ -24,6 +47,9 @@ int main (void) if (Desktop == NULL) return 1; + // Background + Background (Desktop); + // Create a blue pen and select it into the DC BluePen = CreatePen(PS_SOLID, 8, RGB(0, 0, 0xff)); SelectObject(Desktop, BluePen);