Documentation ¶
Index ¶
- func CString(str string, p *[]win32.WCHAR)
- func ClientToScreen(hwnd win32.HWND, rect *win32.RECT) error
- func CopyCString(dest, src []win32.WCHAR) (charCopied int)
- func CreatePen(style win32.PEN_STYLE, width win32.DWORD, color win32.COLORREF) (win32.HPEN, error)
- func CreateWindow(spec *Wnd) (win32.HWND, error)
- func DPIConv[T ~int32 | ~uint32](oldValue T, oldDPI, newDPI win32.UINT) (newValue T)
- func EmptyDialogTemplate(style win32.DWORD, exStyle win32.DWORD, x win32.SHORT, y win32.SHORT, ...) *win32.DLGTEMPLATE
- func FromDefaultDPI[T ~int32 | ~uint32](value T, dpi win32.UINT) T
- func GetWindowText(hwnd win32.HWND) (string, error)
- func GoString(p *win32.WCHAR, size int) string
- func MessageBox(owner win32.HWND, text string, caption string, typ win32.MESSAGE_BOX_TYPE) (int, error)
- func MessageBoxEx(owner win32.HWND, text string, caption string, typ win32.MESSAGE_BOX_TYPE, ...) (int, error)
- func RegisterClass(cls *WndClass) (win32.ATOM, error)
- func ScreenToClient(hwnd win32.HWND, rect *win32.RECT) error
- func SetWindowText(hwnd win32.HWND, str string) error
- type Wnd
- type WndClass
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CopyCString ¶
CopyCString copies null terminated C string src to dest. Returns the count of win32.WCHAR copied, includes terminating null.
func CreatePen ¶
CreatePen simulates CreatePen API using ExtCreatePen. Style can be one of PS_SOLID, PS_DASH, PS_DOT, PS_DASHDOT, PS_DASHDOTDOT, PS_NULL, PS_INSIDEFRAME.
func EmptyDialogTemplate ¶
func EmptyDialogTemplate(style win32.DWORD, exStyle win32.DWORD, x win32.SHORT, y win32.SHORT, cx win32.SHORT, cy win32.SHORT) *win32.DLGTEMPLATE
EmptyDialogTemplate allocates an empty dialog template. x, y, cx, cy are in pixel format in screen coordinates.
func FromDefaultDPI ¶
FromDefaultDPI convert value from USER_DEFAULT_SCREEN_DPI(96) to a new DPI.
func GoString ¶
GoString converts a null terminated C string to go string. size is the buffer length of C string, includes terminating null.
func MessageBox ¶
func MessageBoxEx ¶
Types ¶
type Wnd ¶
type Wnd struct { ClassName string WindowName string Style win32.WINDOW_STYLE ExStyle win32.WINDOW_EX_STYLE X win32.INT Y win32.INT Width win32.INT Height win32.INT WndParent win32.HWND InParentDPI bool // Whether X, Y, Width and Height are in WndParent's DPI. USER_DEFAULT_SCREEN_DPI is used if false. Menu win32.HMENU Instance win32.HINSTANCE // 0 for this module. Param win32.UINT_PTR }
Click to show internal directories.
Click to hide internal directories.