int main ( void)
{
int x , y ,
COLORREF gul = RGB ( 255,255,0 ) ; .
COLORREF lyseblå = RGB ( 173216230 ) "
3
Legg inn koden , " SetConsoleTitle ( " ConGraphics ");
hWND hWnd = FindWindow ( NULL , " ConGraphics " ) ;
HDC HDC = GetDC ( hWnd ) ;
//tegne en gul sinus kurve
for ( x = 0 ; x < 700 ; x + + )
{
//senter ved y = 200 piksler
y = ( int ) (sin ( x/100.0 ) * 100 + 200 ); .
SetPixel ( HDC , x , y , gul ) "
4
Avslutt med å skrive, " //trekke midtlinjen
for ( x = 0 ; x < 700 ; x + + )
{
SetPixel ( HDC , x , 200 , lysblå ) ;
}
ReleaseDC ( hWnd , HDC ) ;
DeleteDC ( HDC ) ;
getchar (); . //vente
return 0 "