From 0841e88b119253e6e4da7b3e7c02ded8d9591216 Mon Sep 17 00:00:00 2001 From: Shulga Konstantin Date: Tue, 15 Sep 2020 21:21:20 +0300 Subject: [PATCH] fix: change tabs to spaces --- Lab_1/Lab_1/Lab_1.cpp | 88 +++++++++++++++++++++---------------------- 1 file changed, 44 insertions(+), 44 deletions(-) diff --git a/Lab_1/Lab_1/Lab_1.cpp b/Lab_1/Lab_1/Lab_1.cpp index 847d531..0431bbb 100644 --- a/Lab_1/Lab_1/Lab_1.cpp +++ b/Lab_1/Lab_1/Lab_1.cpp @@ -8,69 +8,69 @@ LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM); int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR cmdLine, int cmdShowMode) { - UNREFERENCED_PARAMETER(hPrevInstance); - UNREFERENCED_PARAMETER(cmdLine); + UNREFERENCED_PARAMETER(hPrevInstance); + UNREFERENCED_PARAMETER(cmdLine); - MSG msg; + MSG msg; - RegisterWindowClass(hInstance); + RegisterWindowClass(hInstance); - if (!InitWindowInstance(hInstance, cmdShowMode)) - return FALSE; + if (!InitWindowInstance(hInstance, cmdShowMode)) + return FALSE; - while (GetMessage(&msg, NULL, 0, 0)) - { - TranslateMessage(&msg); - DispatchMessage(&msg); - } + while (GetMessage(&msg, NULL, 0, 0)) + { + TranslateMessage(&msg); + DispatchMessage(&msg); + } - return (int)msg.wParam; + return (int)msg.wParam; } ATOM RegisterWindowClass(HINSTANCE hInstance) { - WNDCLASSEX windowClassEx; - - windowClassEx.cbSize = sizeof(WNDCLASSEX); - windowClassEx.style = CS_HREDRAW | CS_VREDRAW; - windowClassEx.lpfnWndProc = WndProc; - windowClassEx.cbClsExtra = 0; - windowClassEx.cbWndExtra = 0; - windowClassEx.hInstance = hInstance; - windowClassEx.hIcon = LoadIcon(0, IDI_WINLOGO);; - windowClassEx.hCursor = LoadCursor(0, IDC_ARROW); - windowClassEx.hbrBackground = (HBRUSH)(COLOR_WINDOW + 1); - windowClassEx.lpszMenuName = 0; - windowClassEx.lpszClassName = WINDOW_NAME; - windowClassEx.hIconSm = 0; - - return RegisterClassEx(&windowClassEx); + WNDCLASSEX windowClassEx; + + windowClassEx.cbSize = sizeof(WNDCLASSEX); + windowClassEx.style = CS_HREDRAW | CS_VREDRAW; + windowClassEx.lpfnWndProc = WndProc; + windowClassEx.cbClsExtra = 0; + windowClassEx.cbWndExtra = 0; + windowClassEx.hInstance = hInstance; + windowClassEx.hIcon = LoadIcon(0, IDI_WINLOGO);; + windowClassEx.hCursor = LoadCursor(0, IDC_ARROW); + windowClassEx.hbrBackground = (HBRUSH)(COLOR_WINDOW + 1); + windowClassEx.lpszMenuName = 0; + windowClassEx.lpszClassName = WINDOW_NAME; + windowClassEx.hIconSm = 0; + + return RegisterClassEx(&windowClassEx); } BOOL InitWindowInstance(HINSTANCE hInstance, int cmdShowMode) { - HWND hWnd; + HWND hWnd; - hWnd = CreateWindow(WINDOW_NAME, WINDOW_NAME, WS_OVERLAPPEDWINDOW, CW_USEDEFAULT, - CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, NULL, NULL, hInstance, NULL); + hWnd = CreateWindow(WINDOW_NAME, WINDOW_NAME, WS_OVERLAPPEDWINDOW, CW_USEDEFAULT, + CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, NULL, NULL, hInstance, NULL); - if (!hWnd) - return FALSE; + if (!hWnd) + return FALSE; - ShowWindow(hWnd, cmdShowMode); - UpdateWindow(hWnd); + ShowWindow(hWnd, cmdShowMode); + UpdateWindow(hWnd); - return TRUE; + return TRUE; } LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) { - switch (message) - { - case WM_DESTROY: - PostQuitMessage(0); - return 0; - default: - return DefWindowProc(hWnd, message, wParam, lParam); - } + switch (message) + { + case WM_DESTROY: + PostQuitMessage(0); + return 0; + default: + return DefWindowProc(hWnd, message, wParam, lParam); + } }