win32 api windows demo #26674
Unanswered
LukyGuyLucky
asked this question in
Questions and Answers
Replies: 1 comment 1 reply
-
|
I tested in windows this AI snippet and worked: // Include the Windows header
#include <windows.h>
// Link against user32.dll
#flag windows -luser32
// Declare the Win32 function
fn C.MessageBox(hwnd voidptr, text &u16, caption &u16, utype u32) int
fn main() {
// V strings are UTF-8; Win32 "W" functions require UTF-16
text := 'Hello from V!'.to_wide()
caption := 'Win32 API'.to_wide()
C.MessageBox(0, text, caption, 0)
} |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Sorry for the piece by piece questions come up.
Is there any demo on a win32 api windows program in v?I have searched but just got some examples which uses
import win32which does not exist.
Just want to learn how to interop with win32 api directly in v.
Thanks.
Beta Was this translation helpful? Give feedback.
All reactions