w32find

package module
v0.0.0-...-ffb72b8 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2022 License: MIT Imports: 4 Imported by: 0

README

w32find

Go Reference

Package w32find provides a set of interface to win32 APIs that can be used to find windows and their controls.

Install

go get -v github.com/moonchant12/w32find

Import

import "github.com/moonchant12/w32find"

Usage

hwnd1, err1 := w32find.FindWindowFromEnum("Your parent window title")
hwnd2, err2 := w32find.FindWindowEx(hwnd1, 0, "", "Your child window title")

Documentation

Rendered for windows/amd64

Overview

Package w32find provides a set of interface to win32 APIs that can be used to find windows and their controls.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EnumWindows

func EnumWindows(enumFunc uintptr, lparam uintptr) (err error)

func FindWindow

func FindWindow(className, windowName string) (syscall.Handle, error)

FindWindow finds hwnd by name. This can't find all types of windows. For dialogs and controls, use FindWindowEx and FindWindowFromEnum instead.

hwnd, _ := w32find.FindWindow("", "Your window title")

func FindWindowEx

func FindWindowEx(hwndParent, hwndChildAfter syscall.Handle, className, windowName string) (syscall.Handle, error)

FindWindowEx finds a child window. This can be used to find controls inside a window.

h2, err2 := w32find.FindWindowEx(h1, 0, "", "Your child window title")

func FindWindowExW

func FindWindowExW(hwndParent, hwndChildAfter syscall.Handle, className, windowName *uint16) syscall.Handle

func FindWindowFromEnum

func FindWindowFromEnum(title string) (syscall.Handle, error)

FindWindowFromEnum finds a window from user32!EnumWindows(). This can be used to find dialogs.

h1, err1 := w32find.FindWindowFromEnum("Your parent window title")

func FindWindowW

func FindWindowW(className, windowName *uint16) syscall.Handle

func GetWindowText

func GetWindowText(hwnd syscall.Handle, str *uint16, maxCount int32) (len int32, err error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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