1
Abra el editor de código.
2
Escriba " # include # include # include int main (void ) { int x, y ; COLORREF amarillo = RGB ( 255,255,0 ) . COLORREF azul claro = RGB ( 173,216,230 ) " Agregue el código , " SetConsoleTitle ( " ConGraphics "); HWND hWnd = FindWindow (NULL, " ConGraphics " ) ; HDC hDC = GetDC ( hWnd ) ; //dibuja una curva sinusoidal amarilla para ( x = 0 ; x < 700 ; x + +) { //center en y = 200 píxeles y = ( int) (sin ( x/100.0 ) * 100 + 200 ) . SetPixel ( hDC , x, y , amarillo) " acabado escribiendo " //dibujar la línea central por (x = 0 ; x < 700 ; x + +) { SetPixel ( hDC , x, 200 , azul claro ) ; } ReleaseDC ( hWnd , HDC ) ; DeleteDC ( hDC ) ; getchar ( ) . //espera return 0 "
3
4