добавил
This commit is contained in:
parent
287b312956
commit
1df8c822a3
41
Lab05.OAIP.ProkonovKirill/Lab05.OAIP.ProkonovKirill.sln
Normal file
41
Lab05.OAIP.ProkonovKirill/Lab05.OAIP.ProkonovKirill.sln
Normal file
@ -0,0 +1,41 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 16
|
||||
VisualStudioVersion = 16.0.33529.622
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Lab05.OAIP.ProkonovKirill", "Lab05.OAIP.ProkonovKirill\Lab05.OAIP.ProkonovKirill.vcxproj", "{B0357AC7-FE03-4428-8A6B-042A36D6FCBF}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Lab06.OAIP.ProkonovKirill", "Lab06.OAIP.ProkonovKirill\Lab06.OAIP.ProkonovKirill.vcxproj", "{073C19EA-BCD4-4D50-98A5-D11E6B452607}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|x64 = Debug|x64
|
||||
Debug|x86 = Debug|x86
|
||||
Release|x64 = Release|x64
|
||||
Release|x86 = Release|x86
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{B0357AC7-FE03-4428-8A6B-042A36D6FCBF}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{B0357AC7-FE03-4428-8A6B-042A36D6FCBF}.Debug|x64.Build.0 = Debug|x64
|
||||
{B0357AC7-FE03-4428-8A6B-042A36D6FCBF}.Debug|x86.ActiveCfg = Debug|Win32
|
||||
{B0357AC7-FE03-4428-8A6B-042A36D6FCBF}.Debug|x86.Build.0 = Debug|Win32
|
||||
{B0357AC7-FE03-4428-8A6B-042A36D6FCBF}.Release|x64.ActiveCfg = Release|x64
|
||||
{B0357AC7-FE03-4428-8A6B-042A36D6FCBF}.Release|x64.Build.0 = Release|x64
|
||||
{B0357AC7-FE03-4428-8A6B-042A36D6FCBF}.Release|x86.ActiveCfg = Release|Win32
|
||||
{B0357AC7-FE03-4428-8A6B-042A36D6FCBF}.Release|x86.Build.0 = Release|Win32
|
||||
{073C19EA-BCD4-4D50-98A5-D11E6B452607}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{073C19EA-BCD4-4D50-98A5-D11E6B452607}.Debug|x64.Build.0 = Debug|x64
|
||||
{073C19EA-BCD4-4D50-98A5-D11E6B452607}.Debug|x86.ActiveCfg = Debug|Win32
|
||||
{073C19EA-BCD4-4D50-98A5-D11E6B452607}.Debug|x86.Build.0 = Debug|Win32
|
||||
{073C19EA-BCD4-4D50-98A5-D11E6B452607}.Release|x64.ActiveCfg = Release|x64
|
||||
{073C19EA-BCD4-4D50-98A5-D11E6B452607}.Release|x64.Build.0 = Release|x64
|
||||
{073C19EA-BCD4-4D50-98A5-D11E6B452607}.Release|x86.ActiveCfg = Release|Win32
|
||||
{073C19EA-BCD4-4D50-98A5-D11E6B452607}.Release|x86.Build.0 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {776EC82A-419E-4F52-9D0E-C06E4E227946}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
@ -0,0 +1,346 @@
|
||||
// Lab05.OAIP.ProkonovKirill.cpp : Определяет точку входа для приложения.
|
||||
//
|
||||
|
||||
#include "framework.h"
|
||||
#include "Lab05.OAIP.ProkonovKirill.h"
|
||||
|
||||
#define MAX_LOADSTRING 100
|
||||
|
||||
// Глобальные переменные:
|
||||
HINSTANCE hInst; // текущий экземпляр
|
||||
WCHAR szTitle[MAX_LOADSTRING]; // Текст строки заголовка
|
||||
WCHAR szWindowClass[MAX_LOADSTRING]; // имя класса главного окна
|
||||
|
||||
// Отправить объявления функций, включенных в этот модуль кода:
|
||||
ATOM MyRegisterClass(HINSTANCE hInstance);
|
||||
BOOL InitInstance(HINSTANCE, int);
|
||||
LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM);
|
||||
INT_PTR CALLBACK About(HWND, UINT, WPARAM, LPARAM);
|
||||
|
||||
int APIENTRY wWinMain(_In_ HINSTANCE hInstance,
|
||||
_In_opt_ HINSTANCE hPrevInstance,
|
||||
_In_ LPWSTR lpCmdLine,
|
||||
_In_ int nCmdShow)
|
||||
{
|
||||
UNREFERENCED_PARAMETER(hPrevInstance);
|
||||
UNREFERENCED_PARAMETER(lpCmdLine);
|
||||
|
||||
// TODO: Разместите код здесь.
|
||||
|
||||
// Инициализация глобальных строк
|
||||
LoadStringW(hInstance, IDS_APP_TITLE, szTitle, MAX_LOADSTRING);
|
||||
LoadStringW(hInstance, IDC_LAB05OAIPPROKONOVKIRILL, szWindowClass, MAX_LOADSTRING);
|
||||
MyRegisterClass(hInstance);
|
||||
|
||||
// Выполнить инициализацию приложения:
|
||||
if (!InitInstance (hInstance, nCmdShow))
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
HACCEL hAccelTable = LoadAccelerators(hInstance, MAKEINTRESOURCE(IDC_LAB05OAIPPROKONOVKIRILL));
|
||||
|
||||
MSG msg;
|
||||
|
||||
// Цикл основного сообщения:
|
||||
while (GetMessage(&msg, nullptr, 0, 0))
|
||||
{
|
||||
if (!TranslateAccelerator(msg.hwnd, hAccelTable, &msg))
|
||||
{
|
||||
TranslateMessage(&msg);
|
||||
DispatchMessage(&msg);
|
||||
}
|
||||
}
|
||||
|
||||
return (int) msg.wParam;
|
||||
}
|
||||
|
||||
|
||||
|
||||
//
|
||||
// ФУНКЦИЯ: MyRegisterClass()
|
||||
//
|
||||
// ЦЕЛЬ: Регистрирует класс окна.
|
||||
//
|
||||
ATOM MyRegisterClass(HINSTANCE hInstance)
|
||||
{
|
||||
WNDCLASSEXW wcex;
|
||||
|
||||
wcex.cbSize = sizeof(WNDCLASSEX);
|
||||
|
||||
wcex.style = CS_HREDRAW | CS_VREDRAW;
|
||||
wcex.lpfnWndProc = WndProc;
|
||||
wcex.cbClsExtra = 0;
|
||||
wcex.cbWndExtra = 0;
|
||||
wcex.hInstance = hInstance;
|
||||
wcex.hIcon = LoadIcon(hInstance, MAKEINTRESOURCE(IDI_LAB05OAIPPROKONOVKIRILL));
|
||||
wcex.hCursor = LoadCursor(nullptr, IDC_ARROW);
|
||||
wcex.hbrBackground = (HBRUSH)(COLOR_WINDOW+1);
|
||||
wcex.lpszMenuName = MAKEINTRESOURCEW(IDC_LAB05OAIPPROKONOVKIRILL);
|
||||
wcex.lpszClassName = szWindowClass;
|
||||
wcex.hIconSm = LoadIcon(wcex.hInstance, MAKEINTRESOURCE(IDI_SMALL));
|
||||
|
||||
return RegisterClassExW(&wcex);
|
||||
}
|
||||
|
||||
//
|
||||
// ФУНКЦИЯ: InitInstance(HINSTANCE, int)
|
||||
//
|
||||
// ЦЕЛЬ: Сохраняет маркер экземпляра и создает главное окно
|
||||
//
|
||||
// КОММЕНТАРИИ:
|
||||
//
|
||||
// В этой функции маркер экземпляра сохраняется в глобальной переменной, а также
|
||||
// создается и выводится главное окно программы.
|
||||
//
|
||||
BOOL InitInstance(HINSTANCE hInstance, int nCmdShow)
|
||||
{
|
||||
hInst = hInstance; // Сохранить маркер экземпляра в глобальной переменной
|
||||
|
||||
HWND hWnd = CreateWindowW(szWindowClass, szTitle, WS_OVERLAPPEDWINDOW,
|
||||
CW_USEDEFAULT, 0, CW_USEDEFAULT, 0, nullptr, nullptr, hInstance, nullptr);
|
||||
|
||||
if (!hWnd)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
ShowWindow(hWnd, nCmdShow);
|
||||
UpdateWindow(hWnd);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
//
|
||||
// ФУНКЦИЯ: WndProc(HWND, UINT, WPARAM, LPARAM)
|
||||
//
|
||||
// ЦЕЛЬ: Обрабатывает сообщения в главном окне.
|
||||
//
|
||||
// WM_COMMAND - обработать меню приложения
|
||||
// WM_PAINT - Отрисовка главного окна
|
||||
// WM_DESTROY - отправить сообщение о выходе и вернуться
|
||||
//
|
||||
//
|
||||
LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
switch (message)
|
||||
{
|
||||
case WM_COMMAND:
|
||||
{
|
||||
int wmId = LOWORD(wParam);
|
||||
// Разобрать выбор в меню:
|
||||
switch (wmId)
|
||||
{
|
||||
case IDM_ABOUT:
|
||||
DialogBox(hInst, MAKEINTRESOURCE(IDD_ABOUTBOX), hWnd, About);
|
||||
break;
|
||||
case IDM_EXIT:
|
||||
DestroyWindow(hWnd);
|
||||
break;
|
||||
default:
|
||||
return DefWindowProc(hWnd, message, wParam, lParam);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case WM_PAINT:
|
||||
{
|
||||
PAINTSTRUCT ps;
|
||||
HDC hdc = BeginPaint(hWnd, &ps);
|
||||
|
||||
// Крыша
|
||||
HPEN hPen, hPen2, hPen3, hPen4, hPen5, hPen6, hPen7, hPen8;
|
||||
hPen = CreatePen(PS_SOLID, 3, RGB(150, 75, 0));
|
||||
hPen2 = CreatePen(PS_SOLID, 2, RGB(0, 0, 0));
|
||||
hPen3 = CreatePen(PS_SOLID, 3, RGB(66, 170, 255));
|
||||
hPen4 = CreatePen(PS_SOLID, 3, RGB(255, 0, 0));
|
||||
hPen5 = CreatePen(PS_SOLID, 2, RGB(0, 128, 0));
|
||||
hPen6 = CreatePen(PS_SOLID, 4, RGB(150, 75, 0));
|
||||
hPen7 = CreatePen(PS_SOLID, 4, RGB(0, 128, 0));
|
||||
hPen8 = CreatePen(PS_SOLID, 4, RGB(0, 128, 0));
|
||||
SelectObject(hdc, hPen);
|
||||
MoveToEx(hdc, 150, 350, NULL);
|
||||
LineTo(hdc, 275, 250);
|
||||
LineTo(hdc, 400, 350);
|
||||
DeleteObject(hPen);
|
||||
// Дом
|
||||
SelectObject(hdc, hPen2);
|
||||
LineTo(hdc, 400, 525);
|
||||
LineTo(hdc, 150, 525);
|
||||
LineTo(hdc, 150, 350);
|
||||
LineTo(hdc, 400, 350);
|
||||
// Окно
|
||||
SelectObject(hdc, hPen3);
|
||||
MoveToEx(hdc, 225, 400, NULL);
|
||||
LineTo(hdc, 225, 475);
|
||||
LineTo(hdc, 325, 475);
|
||||
LineTo(hdc, 325, 400);
|
||||
LineTo(hdc, 225, 400);
|
||||
// Рама
|
||||
MoveToEx(hdc, 275, 400, NULL);
|
||||
LineTo(hdc, 275, 475);
|
||||
MoveToEx(hdc, 275, 425, NULL);
|
||||
LineTo(hdc, 325, 425);
|
||||
|
||||
|
||||
//Ёлка
|
||||
SelectObject(hdc, hPen5);
|
||||
MoveToEx(hdc, 100, 250, NULL);
|
||||
LineTo(hdc, 50, 300);
|
||||
LineTo(hdc, 150, 300);
|
||||
LineTo(hdc, 100, 250);
|
||||
MoveToEx(hdc, 100, 300, NULL);
|
||||
LineTo(hdc, 50, 350);
|
||||
LineTo(hdc, 150, 350);
|
||||
LineTo(hdc, 100, 300);
|
||||
MoveToEx(hdc, 100, 350, NULL);
|
||||
LineTo(hdc, 50, 400);
|
||||
LineTo(hdc, 150, 400);
|
||||
LineTo(hdc, 100, 350);
|
||||
MoveToEx(hdc, 100, 400, NULL);
|
||||
LineTo(hdc, 50, 450);
|
||||
LineTo(hdc, 150, 450);
|
||||
LineTo(hdc, 100, 400);
|
||||
SelectObject(hdc, hPen5);
|
||||
MoveToEx(hdc, 90, 450, NULL);
|
||||
LineTo(hdc, 90, 475);
|
||||
LineTo(hdc, 105, 475);
|
||||
LineTo(hdc, 105, 450);
|
||||
SelectObject(hdc, hPen6);
|
||||
MoveToEx(hdc, 90, 450, NULL);
|
||||
LineTo(hdc, 90, 475);
|
||||
LineTo(hdc, 105, 475);
|
||||
LineTo(hdc, 105, 450);
|
||||
MoveToEx(hdc, 50, 475, NULL);
|
||||
LineTo(hdc, 150, 475);
|
||||
|
||||
//Машина
|
||||
MoveToEx(hdc, 800, 525, NULL);
|
||||
LineTo(hdc, 1000, 525);
|
||||
LineTo(hdc, 950, 600);
|
||||
/*RECT vehicle = {700, 600, 1100, 700};*/
|
||||
HBRUSH hBrushGray = CreateSolidBrush(RGB(110, 110, 110));
|
||||
SelectObject(hdc, hBrushGray);
|
||||
Rectangle(hdc, 700, 600, 1100, 700);
|
||||
SelectObject(hdc, hPen3);
|
||||
LineTo(hdc, 950, 700);
|
||||
MoveToEx(hdc, 800, 525, NULL);
|
||||
SelectObject(hdc, hPen3);
|
||||
LineTo(hdc, 750, 600);
|
||||
SelectObject(hdc, hPen6);
|
||||
HBRUSH hBrushWheels;
|
||||
hBrushWheels = CreateSolidBrush(RGB(0, 0, 0));
|
||||
SelectObject(hdc, hBrushWheels);
|
||||
SelectObject(hdc, hPen6);
|
||||
Ellipse(hdc, 985, 650, 1085, 750);
|
||||
Ellipse(hdc, 750, 650, 850, 750);
|
||||
//FillRect(hdc, &vehicle, hBrush, hPen6);
|
||||
|
||||
//Солнце
|
||||
/*RECT r;
|
||||
r.left = 1200;
|
||||
r.top = 80;
|
||||
r.right = 1300;
|
||||
r.right = 1300;
|
||||
FillRect(hdc, &r, (HBRUSH)CreateSolidBrush(RGB(255, 255, 0)));*/
|
||||
|
||||
RECT Sunlight = { 1200, 80, 1300, 180 };
|
||||
FillRect(hdc, &Sunlight, (HBRUSH)CreateSolidBrush(RGB(255, 255, 0)));
|
||||
|
||||
HBRUSH hBrushBrown = CreateSolidBrush(RGB(100, 80, 0));
|
||||
|
||||
//Мост.
|
||||
MoveToEx(hdc, 955, 100, NULL);
|
||||
LineTo(hdc, 550, 100);
|
||||
LineTo(hdc, 580, 0);
|
||||
LineTo(hdc, 600, 100);
|
||||
LineTo(hdc, 620, 0);
|
||||
LineTo(hdc, 640, 100);
|
||||
LineTo(hdc, 660, 0);
|
||||
LineTo(hdc, 680, 100);
|
||||
LineTo(hdc, 700, 0);
|
||||
LineTo(hdc, 720, 100);
|
||||
LineTo(hdc, 740, 0);
|
||||
LineTo(hdc, 760, 100);
|
||||
LineTo(hdc, 780, 0);
|
||||
LineTo(hdc, 800, 100);
|
||||
LineTo(hdc, 820, 0);
|
||||
LineTo(hdc, 840, 100);
|
||||
LineTo(hdc, 860, 0);
|
||||
LineTo(hdc, 880, 100);
|
||||
LineTo(hdc, 900, 0);
|
||||
LineTo(hdc, 920, 100);
|
||||
LineTo(hdc, 940, 0);
|
||||
LineTo(hdc, 955, 100);
|
||||
|
||||
// Опоры моста
|
||||
MoveToEx(hdc, 955, 100, NULL);
|
||||
LineTo(hdc, 955, 200);
|
||||
LineTo(hdc, 935, 200);
|
||||
LineTo(hdc, 935, 100);
|
||||
MoveToEx(hdc, 550, 100, NULL);
|
||||
LineTo(hdc, 550, 200);
|
||||
LineTo(hdc, 570, 200);
|
||||
LineTo(hdc, 570, 100);
|
||||
MoveToEx(hdc, 580, 0, NULL);
|
||||
LineTo(hdc, 940, 0);
|
||||
|
||||
|
||||
|
||||
//Медведь
|
||||
SelectObject(hdc, hBrushBrown);
|
||||
SelectObject(hdc, hPen6);
|
||||
Ellipse(hdc, 63, 125, 90, 150);
|
||||
Ellipse(hdc, 15, 125, 40, 150);
|
||||
SelectObject(hdc, hPen);
|
||||
Ellipse(hdc, 20, 140, 80, 200);
|
||||
SelectObject(hdc, hPen);
|
||||
Ellipse(hdc, 30, 180, 70, 195);
|
||||
SelectObject(hdc, hPen);
|
||||
Ellipse(hdc, 30, 158, 45, 170);
|
||||
Ellipse(hdc, 55, 158, 65, 170);
|
||||
SelectObject(hdc, hPen);
|
||||
Ellipse(hdc, 30, 200, 70, 263);
|
||||
SelectObject(hdc, hPen);
|
||||
MoveToEx(hdc, 50, 165, NULL);
|
||||
LineTo(hdc, 50, 175);
|
||||
MoveToEx(hdc, 0, 220, NULL);
|
||||
LineTo(hdc, 30, 230);
|
||||
MoveToEx(hdc, 70, 230, NULL);
|
||||
LineTo(hdc, 100, 220);
|
||||
MoveToEx(hdc, 40, 175, NULL);
|
||||
LineTo(hdc, 60, 175);
|
||||
|
||||
|
||||
|
||||
// TODO: Добавьте сюда любой код прорисовки, использующий HDC...
|
||||
EndPaint(hWnd, &ps);
|
||||
}
|
||||
break;
|
||||
case WM_DESTROY:
|
||||
PostQuitMessage(0);
|
||||
break;
|
||||
default:
|
||||
return DefWindowProc(hWnd, message, wParam, lParam);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Обработчик сообщений для окна "О программе".
|
||||
INT_PTR CALLBACK About(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
UNREFERENCED_PARAMETER(lParam);
|
||||
switch (message)
|
||||
{
|
||||
case WM_INITDIALOG:
|
||||
return (INT_PTR)TRUE;
|
||||
|
||||
case WM_COMMAND:
|
||||
if (LOWORD(wParam) == IDOK || LOWORD(wParam) == IDCANCEL)
|
||||
{
|
||||
EndDialog(hDlg, LOWORD(wParam));
|
||||
return (INT_PTR)TRUE;
|
||||
}
|
||||
break;
|
||||
}
|
||||
return (INT_PTR)FALSE;
|
||||
}
|
@ -0,0 +1,3 @@
|
||||
#pragma once
|
||||
|
||||
#include "resource.h"
|
Binary file not shown.
After Width: | Height: | Size: 45 KiB |
Binary file not shown.
@ -0,0 +1,160 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<VCProjectVersion>16.0</VCProjectVersion>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<ProjectGuid>{b0357ac7-fe03-4428-8a6b-042a36d6fcbf}</ProjectGuid>
|
||||
<RootNamespace>Lab05OAIPProkonovKirill</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="Shared">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="framework.h" />
|
||||
<ClInclude Include="Lab05.OAIP.ProkonovKirill.h" />
|
||||
<ClInclude Include="Resource.h" />
|
||||
<ClInclude Include="targetver.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="Lab05.OAIP.ProkonovKirill.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="Lab05.OAIP.ProkonovKirill.rc" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Image Include="Lab05.OAIP.ProkonovKirill.ico" />
|
||||
<Image Include="small.ico" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
@ -0,0 +1,49 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="Исходные файлы">
|
||||
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
||||
<Extensions>cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Файлы заголовков">
|
||||
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
||||
<Extensions>h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Файлы ресурсов">
|
||||
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
||||
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="framework.h">
|
||||
<Filter>Файлы заголовков</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="targetver.h">
|
||||
<Filter>Файлы заголовков</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Resource.h">
|
||||
<Filter>Файлы заголовков</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Lab05.OAIP.ProkonovKirill.h">
|
||||
<Filter>Файлы заголовков</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="Lab05.OAIP.ProkonovKirill.cpp">
|
||||
<Filter>Исходные файлы</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="Lab05.OAIP.ProkonovKirill.rc">
|
||||
<Filter>Файлы ресурсов</Filter>
|
||||
</ResourceCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Image Include="small.ico">
|
||||
<Filter>Файлы ресурсов</Filter>
|
||||
</Image>
|
||||
<Image Include="Lab05.OAIP.ProkonovKirill.ico">
|
||||
<Filter>Файлы ресурсов</Filter>
|
||||
</Image>
|
||||
</ItemGroup>
|
||||
</Project>
|
@ -0,0 +1,30 @@
|
||||
//{{NO_DEPENDENCIES}}
|
||||
// Включаемый файл, созданный в Microsoft Visual C++.
|
||||
// Используется Lab05.OAIP.ProkonovKirill.rc
|
||||
|
||||
#define IDS_APP_TITLE 103
|
||||
|
||||
#define IDR_MAINFRAME 128
|
||||
#define IDD_LAB05OAIPPROKONOVKIRILL_DIALOG 102
|
||||
#define IDD_ABOUTBOX 103
|
||||
#define IDM_ABOUT 104
|
||||
#define IDM_EXIT 105
|
||||
#define IDI_LAB05OAIPPROKONOVKIRILL 107
|
||||
#define IDI_SMALL 108
|
||||
#define IDC_LAB05OAIPPROKONOVKIRILL 109
|
||||
#define IDC_MYICON 2
|
||||
#ifndef IDC_STATIC
|
||||
#define IDC_STATIC -1
|
||||
#endif
|
||||
// Следующие стандартные значения для новых объектов
|
||||
//
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||
|
||||
#define _APS_NO_MFC 130
|
||||
#define _APS_NEXT_RESOURCE_VALUE 129
|
||||
#define _APS_NEXT_COMMAND_VALUE 32771
|
||||
#define _APS_NEXT_CONTROL_VALUE 1000
|
||||
#define _APS_NEXT_SYMED_VALUE 110
|
||||
#endif
|
||||
#endif
|
@ -0,0 +1,15 @@
|
||||
// header.h: включаемый файл для стандартных системных включаемых файлов
|
||||
// или включаемые файлы для конкретного проекта
|
||||
//
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "targetver.h"
|
||||
#define WIN32_LEAN_AND_MEAN // Исключите редко используемые компоненты из заголовков Windows
|
||||
// Файлы заголовков Windows
|
||||
#include <windows.h>
|
||||
// Файлы заголовков среды выполнения C
|
||||
#include <stdlib.h>
|
||||
#include <malloc.h>
|
||||
#include <memory.h>
|
||||
#include <tchar.h>
|
BIN
Lab05.OAIP.ProkonovKirill/Lab05.OAIP.ProkonovKirill/small.ico
Normal file
BIN
Lab05.OAIP.ProkonovKirill/Lab05.OAIP.ProkonovKirill/small.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 45 KiB |
@ -0,0 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
// // При включении SDKDDKVer.h будет задана самая новая из доступных платформ Windows.
|
||||
// Если вы планируете сборку приложения для предыдущей версии платформы Windows, включите WinSDKVer.h и
|
||||
// задайте желаемую платформу в макросе _WIN32_WINNT, прежде чем включать SDKDDKVer.h.
|
||||
#include <SDKDDKVer.h>
|
@ -0,0 +1,270 @@
|
||||
// Lab06.OAIP.ProkonovKirill.cpp : Определяет точку входа для приложения.
|
||||
//
|
||||
|
||||
#include "framework.h"
|
||||
#include "Lab06.OAIP.ProkonovKirill.h"
|
||||
|
||||
#define MAX_LOADSTRING 100
|
||||
|
||||
// Глобальные переменные:
|
||||
HINSTANCE hInst; // текущий экземпляр
|
||||
WCHAR szTitle[MAX_LOADSTRING]; // Текст строки заголовка
|
||||
WCHAR szWindowClass[MAX_LOADSTRING]; // имя класса главного окна
|
||||
|
||||
// Отправить объявления функций, включенных в этот модуль кода:
|
||||
ATOM MyRegisterClass(HINSTANCE hInstance);
|
||||
BOOL InitInstance(HINSTANCE, int);
|
||||
LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM);
|
||||
INT_PTR CALLBACK About(HWND, UINT, WPARAM, LPARAM);
|
||||
|
||||
int APIENTRY wWinMain(_In_ HINSTANCE hInstance,
|
||||
_In_opt_ HINSTANCE hPrevInstance,
|
||||
_In_ LPWSTR lpCmdLine,
|
||||
_In_ int nCmdShow)
|
||||
{
|
||||
UNREFERENCED_PARAMETER(hPrevInstance);
|
||||
UNREFERENCED_PARAMETER(lpCmdLine);
|
||||
|
||||
// TODO: Разместите код здесь.
|
||||
|
||||
// Инициализация глобальных строк
|
||||
LoadStringW(hInstance, IDS_APP_TITLE, szTitle, MAX_LOADSTRING);
|
||||
LoadStringW(hInstance, IDC_LAB06OAIPPROKONOVKIRILL, szWindowClass, MAX_LOADSTRING);
|
||||
MyRegisterClass(hInstance);
|
||||
|
||||
// Выполнить инициализацию приложения:
|
||||
if (!InitInstance (hInstance, nCmdShow))
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
HACCEL hAccelTable = LoadAccelerators(hInstance, MAKEINTRESOURCE(IDC_LAB06OAIPPROKONOVKIRILL));
|
||||
|
||||
MSG msg;
|
||||
|
||||
// Цикл основного сообщения:
|
||||
while (GetMessage(&msg, nullptr, 0, 0))
|
||||
{
|
||||
if (!TranslateAccelerator(msg.hwnd, hAccelTable, &msg))
|
||||
{
|
||||
TranslateMessage(&msg);
|
||||
DispatchMessage(&msg);
|
||||
}
|
||||
}
|
||||
|
||||
return (int) msg.wParam;
|
||||
}
|
||||
|
||||
|
||||
|
||||
//
|
||||
// ФУНКЦИЯ: MyRegisterClass()
|
||||
//
|
||||
// ЦЕЛЬ: Регистрирует класс окна.
|
||||
//
|
||||
ATOM MyRegisterClass(HINSTANCE hInstance)
|
||||
{
|
||||
WNDCLASSEXW wcex;
|
||||
|
||||
wcex.cbSize = sizeof(WNDCLASSEX);
|
||||
|
||||
wcex.style = CS_HREDRAW | CS_VREDRAW;
|
||||
wcex.lpfnWndProc = WndProc;
|
||||
wcex.cbClsExtra = 0;
|
||||
wcex.cbWndExtra = 0;
|
||||
wcex.hInstance = hInstance;
|
||||
wcex.hIcon = LoadIcon(hInstance, MAKEINTRESOURCE(IDI_LAB06OAIPPROKONOVKIRILL));
|
||||
wcex.hCursor = LoadCursor(nullptr, IDC_ARROW);
|
||||
wcex.hbrBackground = (HBRUSH)(COLOR_WINDOW+1);
|
||||
wcex.lpszMenuName = MAKEINTRESOURCEW(IDC_LAB06OAIPPROKONOVKIRILL);
|
||||
wcex.lpszClassName = szWindowClass;
|
||||
wcex.hIconSm = LoadIcon(wcex.hInstance, MAKEINTRESOURCE(IDI_SMALL));
|
||||
|
||||
return RegisterClassExW(&wcex);
|
||||
}
|
||||
|
||||
//
|
||||
// ФУНКЦИЯ: InitInstance(HINSTANCE, int)
|
||||
//
|
||||
// ЦЕЛЬ: Сохраняет маркер экземпляра и создает главное окно
|
||||
//
|
||||
// КОММЕНТАРИИ:
|
||||
//
|
||||
// В этой функции маркер экземпляра сохраняется в глобальной переменной, а также
|
||||
// создается и выводится главное окно программы.
|
||||
//
|
||||
BOOL InitInstance(HINSTANCE hInstance, int nCmdShow)
|
||||
{
|
||||
hInst = hInstance; // Сохранить маркер экземпляра в глобальной переменной
|
||||
|
||||
HWND hWnd = CreateWindowW(szWindowClass, szTitle, WS_OVERLAPPEDWINDOW,
|
||||
CW_USEDEFAULT, 0, CW_USEDEFAULT, 0, nullptr, nullptr, hInstance, nullptr);
|
||||
|
||||
if (!hWnd)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
ShowWindow(hWnd, nCmdShow);
|
||||
UpdateWindow(hWnd);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
//
|
||||
// ФУНКЦИЯ: WndProc(HWND, UINT, WPARAM, LPARAM)
|
||||
//
|
||||
// ЦЕЛЬ: Обрабатывает сообщения в главном окне.
|
||||
//
|
||||
// WM_COMMAND - обработать меню приложения
|
||||
// WM_PAINT - Отрисовка главного окна
|
||||
// WM_DESTROY - отправить сообщение о выходе и вернуться
|
||||
//
|
||||
//
|
||||
LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
switch (message)
|
||||
{
|
||||
case WM_COMMAND:
|
||||
{
|
||||
int wmId = LOWORD(wParam);
|
||||
// Разобрать выбор в меню:
|
||||
switch (wmId)
|
||||
{
|
||||
case IDM_ABOUT:
|
||||
DialogBox(hInst, MAKEINTRESOURCE(IDD_ABOUTBOX), hWnd, About);
|
||||
break;
|
||||
case IDM_EXIT:
|
||||
DestroyWindow(hWnd);
|
||||
break;
|
||||
default:
|
||||
return DefWindowProc(hWnd, message, wParam, lParam);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case WM_PAINT:
|
||||
{
|
||||
PAINTSTRUCT ps;
|
||||
HDC hdc = BeginPaint(hWnd, &ps);
|
||||
// TODO: Добавьте сюда любой код прорисовки, использующий HDC...
|
||||
|
||||
HPEN hPen, hPen2, hPen3, hPen4, hPen5, hPen6, hPen7, hPen8;
|
||||
hPen = CreatePen(PS_SOLID, 3, RGB(150, 75, 0));
|
||||
hPen2 = CreatePen(PS_SOLID, 2, RGB(0, 0, 0));
|
||||
hPen3 = CreatePen(PS_SOLID, 3, RGB(66, 170, 255));
|
||||
hPen4 = CreatePen(PS_SOLID, 3, RGB(255, 0, 0));
|
||||
hPen5 = CreatePen(PS_SOLID, 2, RGB(0, 128, 0));
|
||||
hPen6 = CreatePen(PS_SOLID, 4, RGB(150, 75, 0));
|
||||
hPen7 = CreatePen(PS_SOLID, 4, RGB(0, 128, 0));
|
||||
hPen8 = CreatePen(PS_SOLID, 4, RGB(0, 128, 0));
|
||||
SelectObject(hdc, hPen);
|
||||
MoveToEx(hdc, 150, 350, NULL);
|
||||
LineTo(hdc, 275, 250);
|
||||
LineTo(hdc, 400, 350);
|
||||
DeleteObject(hPen);
|
||||
// Дом
|
||||
SelectObject(hdc, hPen2);
|
||||
LineTo(hdc, 400, 525);
|
||||
LineTo(hdc, 150, 525);
|
||||
LineTo(hdc, 150, 350);
|
||||
LineTo(hdc, 400, 350);
|
||||
// Окно
|
||||
SelectObject(hdc, hPen3);
|
||||
MoveToEx(hdc, 225, 400, NULL);
|
||||
LineTo(hdc, 225, 475);
|
||||
LineTo(hdc, 325, 475);
|
||||
LineTo(hdc, 325, 400);
|
||||
LineTo(hdc, 225, 400);
|
||||
// Рама
|
||||
MoveToEx(hdc, 275, 400, NULL);
|
||||
LineTo(hdc, 275, 475);
|
||||
MoveToEx(hdc, 275, 425, NULL);
|
||||
LineTo(hdc, 325, 425);
|
||||
|
||||
|
||||
//Забор
|
||||
int x1 = 405, y1 = 480;
|
||||
int x2 = 405, y2 = 500;
|
||||
do {
|
||||
HPEN
|
||||
hPen = CreatePen(PS_SOLID, 4, RGB(14, 59, 14));
|
||||
SelectObject(hdc, hPen);
|
||||
MoveToEx(hdc, x1, y1, NULL);
|
||||
LineTo(hdc, x2, y2);
|
||||
x1 = x1 + 15;
|
||||
x2 = x2 + 15;
|
||||
} while (x1 <= 900);
|
||||
|
||||
//большой забор
|
||||
int x5 = 450, y5 = 375;
|
||||
int x6 = 450, y6 = 475;
|
||||
int i = 0;
|
||||
do {
|
||||
HPEN
|
||||
hPen = CreatePen(PS_SOLID, 4, RGB(14, 59, 14));
|
||||
SelectObject(hdc, hPen);
|
||||
MoveToEx(hdc, x5, y5, NULL);
|
||||
LineTo(hdc, x6, y6);
|
||||
x5 = x5 + 25;
|
||||
x6 = x6 + 25;
|
||||
i++;
|
||||
} while (i < 16);
|
||||
|
||||
//Растение1
|
||||
int Flower_x1 = 600, Flower_y1 = 400;
|
||||
int Flower_x2 = 700, Flower_y2 = 475;
|
||||
do
|
||||
{
|
||||
HPEN
|
||||
hPen8 = CreatePen(PS_SOLID, 4, RGB(0, 128, 0));
|
||||
SelectObject(hdc, hPen8);
|
||||
MoveToEx(hdc, Flower_x1, Flower_y1, NULL);
|
||||
LineTo(hdc, Flower_x2, Flower_y2);
|
||||
Flower_x1 += 25;
|
||||
} while (Flower_x1 <= 800);
|
||||
|
||||
//Растение2
|
||||
int Flower2_x1 = 0, Flower2_y1 = 250;
|
||||
int Flower2_x2 = 100, Flower2_y2 = 250;
|
||||
do
|
||||
{
|
||||
HPEN
|
||||
hPen8 = CreatePen(PS_SOLID, 4, RGB(0, 128, 0));
|
||||
SelectObject(hdc, hPen8);
|
||||
MoveToEx(hdc, Flower2_x1, Flower2_y1, NULL);
|
||||
LineTo(hdc, Flower2_x2, Flower2_y2);
|
||||
Flower2_x1 += 25;
|
||||
Flower2_y1 -= 50;
|
||||
} while (Flower2_x1 <= 100);
|
||||
|
||||
//EndPaint(hWnd, &ps);
|
||||
}
|
||||
break;
|
||||
case WM_DESTROY:
|
||||
PostQuitMessage(0);
|
||||
break;
|
||||
default:
|
||||
return DefWindowProc(hWnd, message, wParam, lParam);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Обработчик сообщений для окна "О программе".
|
||||
INT_PTR CALLBACK About(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
UNREFERENCED_PARAMETER(lParam);
|
||||
switch (message)
|
||||
{
|
||||
case WM_INITDIALOG:
|
||||
return (INT_PTR)TRUE;
|
||||
|
||||
case WM_COMMAND:
|
||||
if (LOWORD(wParam) == IDOK || LOWORD(wParam) == IDCANCEL)
|
||||
{
|
||||
EndDialog(hDlg, LOWORD(wParam));
|
||||
return (INT_PTR)TRUE;
|
||||
}
|
||||
break;
|
||||
}
|
||||
return (INT_PTR)FALSE;
|
||||
}
|
@ -0,0 +1,3 @@
|
||||
#pragma once
|
||||
|
||||
#include "resource.h"
|
Binary file not shown.
After Width: | Height: | Size: 45 KiB |
Binary file not shown.
@ -0,0 +1,160 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<VCProjectVersion>16.0</VCProjectVersion>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<ProjectGuid>{073c19ea-bcd4-4d50-98a5-d11e6b452607}</ProjectGuid>
|
||||
<RootNamespace>Lab06OAIPProkonovKirill</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="Shared">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="framework.h" />
|
||||
<ClInclude Include="Lab06.OAIP.ProkonovKirill.h" />
|
||||
<ClInclude Include="Resource.h" />
|
||||
<ClInclude Include="targetver.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="Lab06.OAIP.ProkonovKirill.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="Lab06.OAIP.ProkonovKirill.rc" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Image Include="Lab06.OAIP.ProkonovKirill.ico" />
|
||||
<Image Include="small.ico" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
@ -0,0 +1,49 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="Исходные файлы">
|
||||
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
||||
<Extensions>cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Файлы заголовков">
|
||||
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
||||
<Extensions>h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Файлы ресурсов">
|
||||
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
||||
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="framework.h">
|
||||
<Filter>Файлы заголовков</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="targetver.h">
|
||||
<Filter>Файлы заголовков</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Resource.h">
|
||||
<Filter>Файлы заголовков</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Lab06.OAIP.ProkonovKirill.h">
|
||||
<Filter>Файлы заголовков</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="Lab06.OAIP.ProkonovKirill.cpp">
|
||||
<Filter>Исходные файлы</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="Lab06.OAIP.ProkonovKirill.rc">
|
||||
<Filter>Файлы ресурсов</Filter>
|
||||
</ResourceCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Image Include="small.ico">
|
||||
<Filter>Файлы ресурсов</Filter>
|
||||
</Image>
|
||||
<Image Include="Lab06.OAIP.ProkonovKirill.ico">
|
||||
<Filter>Файлы ресурсов</Filter>
|
||||
</Image>
|
||||
</ItemGroup>
|
||||
</Project>
|
@ -0,0 +1,30 @@
|
||||
//{{NO_DEPENDENCIES}}
|
||||
// Включаемый файл, созданный в Microsoft Visual C++.
|
||||
// Используется Lab06.OAIP.ProkonovKirill.rc
|
||||
|
||||
#define IDS_APP_TITLE 103
|
||||
|
||||
#define IDR_MAINFRAME 128
|
||||
#define IDD_LAB06OAIPPROKONOVKIRILL_DIALOG 102
|
||||
#define IDD_ABOUTBOX 103
|
||||
#define IDM_ABOUT 104
|
||||
#define IDM_EXIT 105
|
||||
#define IDI_LAB06OAIPPROKONOVKIRILL 107
|
||||
#define IDI_SMALL 108
|
||||
#define IDC_LAB06OAIPPROKONOVKIRILL 109
|
||||
#define IDC_MYICON 2
|
||||
#ifndef IDC_STATIC
|
||||
#define IDC_STATIC -1
|
||||
#endif
|
||||
// Следующие стандартные значения для новых объектов
|
||||
//
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||
|
||||
#define _APS_NO_MFC 130
|
||||
#define _APS_NEXT_RESOURCE_VALUE 129
|
||||
#define _APS_NEXT_COMMAND_VALUE 32771
|
||||
#define _APS_NEXT_CONTROL_VALUE 1000
|
||||
#define _APS_NEXT_SYMED_VALUE 110
|
||||
#endif
|
||||
#endif
|
@ -0,0 +1,15 @@
|
||||
// header.h: включаемый файл для стандартных системных включаемых файлов
|
||||
// или включаемые файлы для конкретного проекта
|
||||
//
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "targetver.h"
|
||||
#define WIN32_LEAN_AND_MEAN // Исключите редко используемые компоненты из заголовков Windows
|
||||
// Файлы заголовков Windows
|
||||
#include <windows.h>
|
||||
// Файлы заголовков среды выполнения C
|
||||
#include <stdlib.h>
|
||||
#include <malloc.h>
|
||||
#include <memory.h>
|
||||
#include <tchar.h>
|
BIN
Lab05.OAIP.ProkonovKirill/Lab06.OAIP.ProkonovKirill/small.ico
Normal file
BIN
Lab05.OAIP.ProkonovKirill/Lab06.OAIP.ProkonovKirill/small.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 45 KiB |
@ -0,0 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
// // При включении SDKDDKVer.h будет задана самая новая из доступных платформ Windows.
|
||||
// Если вы планируете сборку приложения для предыдущей версии платформы Windows, включите WinSDKVer.h и
|
||||
// задайте желаемую платформу в макросе _WIN32_WINNT, прежде чем включать SDKDDKVer.h.
|
||||
#include <SDKDDKVer.h>
|
Loading…
Reference in New Issue
Block a user