From 8ff72212a7ea7b1ce130e57246bd1f79fddc0692 Mon Sep 17 00:00:00 2001 From: "v.ignatkin" Date: Sun, 17 Nov 2024 20:21:57 +0400 Subject: [PATCH] =?UTF-8?q?=D0=A2=D0=B5=D1=81=D1=82=201?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- WindowsProject1/WindowsProject1.cpp | 36 +++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/WindowsProject1/WindowsProject1.cpp b/WindowsProject1/WindowsProject1.cpp index cc5a0f2..c6d8dce 100644 --- a/WindowsProject1/WindowsProject1.cpp +++ b/WindowsProject1/WindowsProject1.cpp @@ -147,6 +147,42 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) PAINTSTRUCT ps; HDC hdc = BeginPaint(hWnd, &ps); // TODO: Добавьте сюда любой код прорисовки, использующий HDC... + + + + //// ЗАДАНИЕ 1 + // основание домика + MoveToEx(hdc, 100, 300, NULL); + LineTo(hdc, 300, 300); + LineTo(hdc, 300, 200); + LineTo(hdc, 100, 200); + LineTo(hdc, 100, 300); + + //крыша домика + MoveToEx(hdc, 100, 200, NULL); + LineTo(hdc, 200, 100); + LineTo(hdc, 300, 200); + + // окно домика + MoveToEx(hdc, 150, 250, NULL); + LineTo(hdc, 200, 250); + LineTo(hdc, 200, 290); + LineTo(hdc, 150, 290); + LineTo(hdc, 150, 250); + + MoveToEx(hdc, 170, 250, NULL); + LineTo(hdc, 170, 290); + MoveToEx(hdc, 150, 270, NULL); + LineTo(hdc, 200, 270); + + + + MoveToEx(hdc, 1000, 300, NULL); + LineTo(hdc, 1200, 300); + LineTo(hdc, 1200, 200); + LineTo(hdc, 1000, 200); + LineTo(hdc, 1000, 300); + EndPaint(hWnd, &ps); } break;