This commit is contained in:
Krzosa Karol
2023-03-28 21:43:28 +02:00
parent 5495f96b3b
commit 622a5bd487
9 changed files with 35 additions and 42 deletions

View File

@@ -1,5 +1,5 @@
#import "KERNEL32.core"
#link "gdi32.lib"
#link "gdi32"
RBGQUAD :: struct;; rgbBlue: BYTE; rgbGreen: BYTE; rgbRed: BYTE; rgbReserved: BYTE
BITMAPINFOHEADER :: struct;; biSize: DWORD; biWidth: LONG; biHeight: LONG; biPlanes: WORD; biBitCount: WORD; biCompression: DWORD; biSizeImage: DWORD; biXPelsPerMeter: LONG; biYPelsPerMeter: LONG; biClrUsed: DWORD; biClrImportant: DWORD
BITMAPINFO :: struct;; bmiHeader: BITMAPINFOHEADER; bmiColors: [1]RBGQUAD

View File

@@ -1,4 +1,4 @@
#link "kernel32.lib"
#link "kernel32"
DWORD :: U32
LPCSTR :: *char

View File

@@ -1,5 +1,5 @@
#import "KERNEL32.core"
#link "user32.lib"
#link "user32"
WNDPROC :: (hwnd: HWND, uMsg: UINT, wParam: WPARAM, lParam: LPARAM): LRESULT
WNDCLASSW :: struct;; style: UINT; lpfnWndProc: WNDPROC; cbClsExtra: int; cbWndExtra: int; hInstance: HINSTANCE; hIcon: HICON; hCursor: HCURSOR; hbrBackground: HBRUSH; lpszMenuName: LPCWSTR; lpszClassName: LPCWSTR
MSG :: struct;; hwnd: HWND; message: UINT; wParam: WPARAM; lParam: LPARAM; time: DWORD; pt: POINT; lPrivate: DWORD

View File

@@ -1,5 +1,5 @@
#import "KERNEL32.core"
#link "winmm.lib"
#link "winmm"
MMRESULT :: UINT
TIMERR_NOERROR :: 0

View File

@@ -77,11 +77,11 @@ GetWindowPos :: (window: HWND): Vec2I
AdjustWindowRect :: (window: HWND, style: DWORD, rect: *RECT): void
FALSE :: 0
if window == 0
dpi := GetDpiForWindow(window)
AdjustWindowRectExForDpi(rect, style, FALSE, 0, dpi)
else
AdjustWindowRectEx(rect, style, FALSE, 0)
// if window == 0
// dpi := GetDpiForWindow(window)
// AdjustWindowRectExForDpi(rect, style, FALSE, 0, dpi)
// else
AdjustWindowRectEx(rect, style, FALSE, 0)
SetWindowSize :: (window: HWND, style: DWORD, size: Vec2I): void
rect := RECT{ 0, 0, size.x->LONG, size.y->LONG }