Open eddineimad0 opened 1 year ago
For anyone looking at this in the future. You can add the following to your own files and it would be a local work around. The key for the fix here is the align(1)
for the u16 strings.
const std = @import("std");
const win32 = @import("win32");
const typedConst = win32.zig.typedConst;
const HCURSOR = win32.ui.windows_and_messaging.HCursor;
const HINSTANCE = win32.foundation.HINSTANCE;
pub extern "user32" fn LoadCursorW(
hInstance: ?HINSTANCE,
lpCursorName: ?[*:0]align(1) const u16,
) callconv(std.os.windows.WINAPI) ?HCURSOR;
pub const IDC_HAND = typedConst([*:0]align(1) const u16, @as(u32, 32649))
// ... repeat for the rest of the missing constants
// reference the MS docs for their values: https://learn.microsoft.com/en-us/windows/win32/menurc/about-cursors
I saw that definitions for IDC constants is skipped in the window_and_messaging.zig
i'm guessing that the cause of this is pointer alignment but anyway is there any alternative to these constants in the zigwin32 library?