Files
cloudsave/pkg/tools/windows/windows_windows.go
2025-05-15 00:46:57 +02:00

23 lines
435 B
Go

package windows
import (
"syscall"
"unsafe"
)
const (
NULL = 0
MB_OK = 0
)
// MessageBox of Win32 API.
func MessageBox(hwnd uintptr, caption, title string, flags uint) int {
ret, _, _ := syscall.NewLazyDLL("user32.dll").NewProc("MessageBoxW").Call(
uintptr(hwnd),
uintptr(unsafe.Pointer(syscall.StringToUTF16Ptr(caption))),
uintptr(unsafe.Pointer(syscall.StringToUTF16Ptr(title))),
uintptr(flags))
return int(ret)
}