Skip to content

Commit

Permalink
fix: change tabs to spaces
Browse files Browse the repository at this point in the history
  • Loading branch information
MrKonstantinSh committed Sep 15, 2020
1 parent 7260cde commit 0841e88
Showing 1 changed file with 44 additions and 44 deletions.
88 changes: 44 additions & 44 deletions Lab_1/Lab_1/Lab_1.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

0 comments on commit 0841e88

Please sign in to comment.