mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 01:55:19 +00:00
Make gditest draw a background.
Mostly PR to show we can do graphics... svn path=/trunk/; revision=2112
This commit is contained in:
parent
2f5809598e
commit
920ae420ee
1 changed files with 26 additions and 0 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue