-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
35 lines (31 loc) · 730 Bytes
/
main.cpp
File metadata and controls
35 lines (31 loc) · 730 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#include"Window procedure.h"
#include<windows.h>
INT WINAPI WinMain(_In_ HINSTANCE hinstance,_In_opt_ HINSTANCE,_In_ LPSTR args,_In_ int nCmdShow) {
WNDCLASSW wc{};
wc.hbrBackground = (HBRUSH)COLOR_WINDOW;
wc.lpszClassName = L"Window Class";
wc.hCursor = LoadCursor(NULL, IDC_ARROW);
wc.lpfnWndProc = WindowProcedure;
wc.hInstance = hinstance;
if (!RegisterClassW(&wc)) {
return -1;
}
CreateWindowW(
L"Window Class",
L"GUI Calculator",
WS_OVERLAPPEDWINDOW | WS_VISIBLE,
CW_USEDEFAULT,
CW_USEDEFAULT,
CW_USEDEFAULT,
CW_USEDEFAULT,
NULL,
NULL,
NULL,
NULL);
MSG msg{};
while (GetMessageW(&msg, NULL, NULL, NULL)) {
TranslateMessage(&msg);
DispatchMessageW(&msg);
}
return EXIT_SUCCESS;
}