mbw

package module
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 19, 2021 License: Apache-2.0 Imports: 2 Imported by: 0

README

go-mbw

一个通过user32.dll调用 Windows 平台的MessageBoxW函数的 Go 语言库 A Go lib for call windows platform function MessageBoxW from user32.dll.

安装(Install)

go get github.com/Icarus-0727/go-mbw

例子(Example)

package main

import (
	"fmt"

	"github.com/Icarus-0727/go-mbw"
)

func main() {
	clicked, err := mbw.MessageBoxW("Test", "This is a test for `MODE_OK_CANCEL`", mbw.MODE_OK_CANCEL)
	fmt.Printf("clicked = %v, err = %v\n", clicked, err)
}

效果(Result)

image

Documentation

Index

Constants

View Source
const (
	// MessageBoxW mode
	MODE_OK                 = uintptr(0)
	MODE_OK_CANCEL          = uintptr(1)
	MODE_ABORT_RETRY_IGNORE = uintptr(2)
	MODE_YES_NO_CANCEL      = uintptr(3)
	MODE_YES_NO             = uintptr(4)
	MODE_RETRY_CANCEL       = uintptr(5)
	// MessageBoxW button
	BUTTON_OK     = 1
	BUTTON_CANCEL = 2
	BUTTON_ABORT  = 3
	BUTTON_RETRY  = 4
	BUTTON_IGNORE = 5
	BUTTON_YES    = 6
	BUTTON_NO     = 7
)

Variables

This section is empty.

Functions

func MessageBoxW

func MessageBoxW(title, text string, mode uintptr) (clicked uintptr, err error)

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL