-
-
Save qgcarver/6287aa486c963e61dfd6558a9cc01807 to your computer and use it in GitHub Desktop.
questions about @intToEnum
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fn main_wnd_proc(hwnd: user32.HWND, u_msg: std.os.windows.UINT, | |
wParam: std.os.windows.WPARAM, lParam: std.os.windows.LPARAM) | |
callconv(.Stdcall) std.os.windows.LRESULT { | |
// print_win32_message(u_msg); | |
var result: windows.LRESULT = null; | |
switch (@intToEnum(u_msgs, u_msg)) { | |
u_msgs.WM_DWMNCRENDERINGCHANGED => { | |
return user32.DefWindowProcA(hwnd, u_msg, wParam, lParam); | |
}, | |
u_msgs.WM_ERASEBKGND => { | |
return user32.DefWindowProcA(hwnd, u_msg, wParam, lParam); | |
}, | |
u_msgs.WM_NCLBUTTONDOWN => { | |
return user32.DefWindowProcA(hwnd, u_msg, wParam, lParam); | |
}, | |
u_msgs.WM_CLOSE => run = false, | |
else => { | |
return user32.DefWindowProcA(hwnd, u_msg, wParam, lParam); | |
} | |
} | |
std.debug.print("\n", .{}); | |
return result; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment