diff --git a/Lab_1/Lab_1.sln b/Lab_1/Lab_1.sln new file mode 100644 index 0000000..9b2ea89 --- /dev/null +++ b/Lab_1/Lab_1.sln @@ -0,0 +1,31 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30309.148 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Lab_1", "Lab_1\Lab_1.vcxproj", "{1D32933E-0C89-4FAA-8183-F729ABF26DDF}" +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 + {1D32933E-0C89-4FAA-8183-F729ABF26DDF}.Debug|x64.ActiveCfg = Debug|x64 + {1D32933E-0C89-4FAA-8183-F729ABF26DDF}.Debug|x64.Build.0 = Debug|x64 + {1D32933E-0C89-4FAA-8183-F729ABF26DDF}.Debug|x86.ActiveCfg = Debug|Win32 + {1D32933E-0C89-4FAA-8183-F729ABF26DDF}.Debug|x86.Build.0 = Debug|Win32 + {1D32933E-0C89-4FAA-8183-F729ABF26DDF}.Release|x64.ActiveCfg = Release|x64 + {1D32933E-0C89-4FAA-8183-F729ABF26DDF}.Release|x64.Build.0 = Release|x64 + {1D32933E-0C89-4FAA-8183-F729ABF26DDF}.Release|x86.ActiveCfg = Release|Win32 + {1D32933E-0C89-4FAA-8183-F729ABF26DDF}.Release|x86.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {F5EF02C5-75A8-4FCC-86CC-6E324B1EAE71} + EndGlobalSection +EndGlobal diff --git a/Lab_1/Lab_1/Lab_1.cpp b/Lab_1/Lab_1/Lab_1.cpp new file mode 100644 index 0000000..adf6108 --- /dev/null +++ b/Lab_1/Lab_1/Lab_1.cpp @@ -0,0 +1,67 @@ +#include +#include + +LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM); +TCHAR WinName[] = _T("Main window"); + +int APIENTRY _tWinMain(HINSTANCE This, HINSTANCE Prev, LPTSTR cmd, int mode) +{ + HWND hWnd; // Window descriptor. + MSG msg; // Structure for storing the message. + WNDCLASS wc; // Window class. + + wc.hInstance = This; + wc.lpszClassName = WinName; // Window name. + wc.lpfnWndProc = WndProc; // Callback window function. + wc.style = CS_HREDRAW | CS_VREDRAW; // Window style. + wc.hIcon = LoadIcon(NULL, IDI_APPLICATION); // Default window icon. + wc.hCursor = LoadCursor(NULL, IDC_ARROW); // Default mouse cursor. + wc.lpszMenuName = NULL; // Window has no menu. + wc.cbClsExtra = 0; // No extra class info. + wc.cbWndExtra = 0; // No extra window info. + + // Fill window with white color. + wc.hbrBackground = (HBRUSH)(COLOR_WINDOW + 1); + + // Class registration + if (!RegisterClass(&wc)) + return 0; + + hWnd = CreateWindow(WinName, // Window name. + _T("Window"), // Window title. + WS_OVERLAPPEDWINDOW, // Window style. + CW_USEDEFAULT, // X. + CW_USEDEFAULT, // Y. + CW_USEDEFAULT, // Window width. + CW_USEDEFAULT, // Window height. + HWND_DESKTOP, // Parent window descriptor. + NULL, // Window has no menu. + This, // Application descriptor. + NULL); // No extra info. + + ShowWindow(hWnd, mode); + + // Message processing cycle. + while (GetMessage(&msg, NULL, 0, 0)) { + TranslateMessage(&msg); + DispatchMessage(&msg); + } + + return 0; +} + +// The window function is called by the operating system and +// receives messages from the queue for this application. +LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) +{ + switch (message) + { + case WM_DESTROY: + PostQuitMessage(0); + break; + default: + return DefWindowProc(hWnd, message, wParam, lParam); + } + + return 0; +} \ No newline at end of file diff --git a/Lab_1/Lab_1/Lab_1.vcxproj b/Lab_1/Lab_1/Lab_1.vcxproj new file mode 100644 index 0000000..89692c7 --- /dev/null +++ b/Lab_1/Lab_1/Lab_1.vcxproj @@ -0,0 +1,147 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + 16.0 + Win32Proj + {1d32933e-0c89-4faa-8183-f729abf26ddf} + Lab1 + 10.0 + + + + Application + true + v142 + Unicode + + + Application + false + v142 + true + Unicode + + + Application + true + v142 + Unicode + + + Application + false + v142 + true + Unicode + + + + + + + + + + + + + + + + + + + + + true + + + false + + + true + + + false + + + + Level3 + true + WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) + true + + + Windows + true + + + + + Level3 + true + true + true + WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) + true + + + Windows + true + true + true + + + + + Level3 + true + _DEBUG;_WINDOWS;%(PreprocessorDefinitions) + true + + + Windows + true + + + + + Level3 + true + true + true + NDEBUG;_WINDOWS;%(PreprocessorDefinitions) + true + + + Windows + true + true + true + + + + + + + + + \ No newline at end of file diff --git a/Lab_1/Lab_1/Lab_1.vcxproj.filters b/Lab_1/Lab_1/Lab_1.vcxproj.filters new file mode 100644 index 0000000..2954ba3 --- /dev/null +++ b/Lab_1/Lab_1/Lab_1.vcxproj.filters @@ -0,0 +1,22 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;c++;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + Source Files + + + \ No newline at end of file