#include<Windows.h>
void GdiOut(HDC hdc);
int WINAPI WinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPSTR lpCmdLine,
int nCmdShow)
{
HDC hdc=GetDC(NULL);
GdiOut(hdc);
ReleaseDC(NULL,hdc);
}
void GdiOut(HDC hdc)
{
HPEN hpen;
HBRUSH hbrush;
BYTE bRed=;
BYTE bGreen=;
BYTE bBlue=;
COLORREF cPen=RGB(bRed,bGreen,bBlue);
COLORREF cBrush=RGB(,GetGValue(cPen),);
hpen=CreatePen(PS_SOLID,,cPen);
hbrush=CreateSolidBrush(cBrush);
SelectObject(hdc,hbrush);
LineTo(hdc,,);
SelectObject(hdc,hpen);
Rectangle(hdc,,,,);
DeleteObject(hpen);
DeleteObject(hbrush);
}