Advertisement
lofojak

5sPP1Task3

Oct 9th, 2024
178
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.49 KB | Source Code | 0 0
  1. #include <stdio.h>
  2. #include <windows.h>
  3. #include <iostream>
  4.  
  5. using namespace std;
  6.  
  7. int main()
  8. {
  9.     HWND hwnd = GetConsoleWindow();
  10.     HDC dc = GetDC(hwnd);
  11.  
  12.     SelectObject(dc, GetStockObject(DC_BRUSH));
  13.  
  14.     SetDCBrushColor(dc, RGB(255, 255, 255));
  15.     Rectangle(dc, 0, 0, 200, 100);
  16.  
  17.     SetDCBrushColor(dc, RGB(0, 0, 255));
  18.     Rectangle(dc, 0, 100, 200, 200);
  19.  
  20.     SetDCBrushColor(dc, RGB(255, 0, 0));
  21.     Rectangle(dc, 0, 200, 200, 300);
  22.  
  23.     cout << "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n";
  24.  
  25.     return 0;
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement