Working on lexer first
This commit is contained in:
27
os.cpp
Normal file
27
os.cpp
Normal file
@@ -0,0 +1,27 @@
|
||||
#define _CRT_SECURE_NO_WARNINGS
|
||||
#include <stdio.h>
|
||||
#include <windows.h>
|
||||
#include "types.h"
|
||||
|
||||
function S32 os_main();
|
||||
|
||||
LRESULT CALLBACK
|
||||
WindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam){
|
||||
return DefWindowProcW(hwnd, uMsg, wParam, lParam);;
|
||||
}
|
||||
|
||||
int
|
||||
WinMain(HINSTANCE hInstance, HINSTANCE a, LPSTR b, int nShowCmd){
|
||||
wchar_t *CLASS_NAME = L"Cool window class";
|
||||
wchar_t *WINDOW_NAME = L"Have a good day!";
|
||||
|
||||
WNDCLASSW wc = { };
|
||||
wc.lpfnWndProc = WindowProc;
|
||||
wc.hInstance = hInstance;
|
||||
wc.lpszClassName = CLASS_NAME;
|
||||
RegisterClassW(&wc);
|
||||
|
||||
HWND window_handle = CreateWindowExW(0, CLASS_NAME, WINDOW_NAME, WS_OVERLAPPEDWINDOW, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, 0, 0, hInstance, 0);
|
||||
ShowWindow(window_handle, nShowCmd);
|
||||
return os_main();
|
||||
}
|
||||
Reference in New Issue
Block a user