windows_and_messages

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Rendered for windows/amd64

Index

Constants

View Source
const (
	WM_USER           uint32 = 1024
	TB_BUTTONCOUNT    uint32 = WM_USER + 24
	TB_COMMANDTOINDEX uint32 = WM_USER + 25
	TB_GETBUTTONINFOW uint32 = WM_USER + 63
	TB_GETBUTTONINFOA uint32 = WM_USER + 65
	TB_GETBUTTONTEXT  uint32 = WM_USER + 75
)

SendMessage

View Source
const (
	SM_CXSCREEN = 0
	SM_CYSCREEN = 1
)

GetSystemMetrics constants

View Source
const (
	MOUSEEVENTF_ABSOLUTE        = 0x8000
	MOUSEEVENTF_MOVE            = 0x0001
	MOUSEEVENTF_MOVE_NOCOALESCE = 0x2000
	MOUSEEVENTF_LEFTDOWN        = 0x0002
	MOUSEEVENTF_LEFTUP          = 0x0004
)

MOUSEINPUT DwFlags

View Source
const (
	SW_HIDE            = 0
	SW_NORMAL          = 1
	SW_SHOWNORMAL      = 1
	SW_SHOWMINIMIZED   = 2
	SW_MAXIMIZE        = 3
	SW_SHOWMAXIMIZED   = 3
	SW_SHOWNOACTIVATE  = 4
	SW_SHOW            = 5
	SW_MINIMIZE        = 6
	SW_SHOWMINNOACTIVE = 7
	SW_SHOWNA          = 8
	SW_RESTORE         = 9
	SW_SHOWDEFAULT     = 10
	SW_FORCEMINIMIZE   = 11
)

ShowWindow constants

View Source
const (
	INPUT_MOUSE = 0
)

INPUT Type

View Source
const (
	PROCESS_ALL_ACCESS = 0x1F0FFF
)

Process

Variables

This section is empty.

Functions

func AttachThreadInput

func AttachThreadInput(idAttach, idAttachTo *uint32, fAttach bool) (isBrought bool, err error)

https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-attachthreadinput BOOL AttachThreadInput(

	[in] DWORD idAttach,
	[in] DWORD idAttachTo,
	[in] BOOL  fAttach
  );

func BringWindowToTop

func BringWindowToTop(hwnd syscall.Handle) (isBrought bool, err error)

https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-bringwindowtotop BOOL BringWindowToTop(

	[in] HWND hWnd
  );

func EnumChildWindows

func EnumChildWindows(hWndParent syscall.Handle, lpEnumFunc, lParam uintptr) (err error)

https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-enumchildwindows BOOL EnumChildWindows(

HWND        hWndParent,
WNDENUMPROC lpEnumFunc,
LPARAM      lParam

);

func EnumWindows

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

https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-enumwindows BOOL EnumWindows(

WNDENUMPROC lpEnumFunc,
LPARAM      lParam

);

func FindWindowEx

func FindWindowEx(hwndParent, hwndChildAfter syscall.Handle, lpszClass, lpszWindow *uint16) (hwnd syscall.Handle, err error)

https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-findwindowexw HWND FindWindowExW(

HWND    hWndParent,
HWND    hWndChildAfter,
LPCWSTR lpszClass,
LPCWSTR lpszWindow

);

func FindWindowW

func FindWindowW(lpClassName, lpWindowName *uint16) (hwnd syscall.Handle, err error)

https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-findwindoww HWND FindWindowW(

LPCWSTR lpClassName,
LPCWSTR lpWindowName

);

func GetClassName

func GetClassName(hWnd syscall.Handle) (name string, err error)

https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-getclassnamew int GetClassNameW(

HWND   hWnd,
LPWSTR lpClassName,
int    nMaxCount

);

func GetDlgItem

func GetDlgItem(hDlg syscall.Handle, nIDDlgItem int32) (hwnd syscall.Handle, err error)

https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-getdlgitem HWND GetDlgItem(

HWND hDlg,
int  nIDDlgItem

);

func GetSystemMetrics

func GetSystemMetrics(nIndex int32) (metric int32, err error)

https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-getsystemmetrics int GetSystemMetrics(

int nIndex

);

func GetWindowRect

func GetWindowRect(hWnd syscall.Handle, rect *RECT) (success bool, err error)

https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-getwindowrect BOOL GetWindowRect(

HWND   hWnd,
LPRECT lpRect

);

func GetWindowThreadProcessId

func GetWindowThreadProcessId(hWnd syscall.Handle, lpdwProcessId *uint32) (windowCreatorThreadId int32, err error)

https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-getwindowthreadprocessid DWORD GetWindowThreadProcessId(

HWND    hWnd,
LPDWORD lpdwProcessId

);

func IsWindowUnicode

func IsWindowUnicode(hWnd syscall.Handle) (isUnicode bool, err error)

https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-iswindowunicode BOOL IsWindowUnicode(

HWND hWnd

);

func SendInput

func SendInput(cInputs uint32, pInputs unsafe.Pointer, cbSize int32) (successedEventsNumber int32, err error)

https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-sendinput UINT SendInput(

UINT    cInputs,
LPINPUT pInputs,
int     cbSize

);

func SendMessage

func SendMessage(hWnd syscall.Handle, msg uint32, wParam, lParam uintptr) (lResult uintptr, err error)

https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-sendmessagew https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-sendmessagea LRESULT SendMessageW(

HWND   hWnd,
UINT   Msg,
WPARAM wParam,
LPARAM lParam

);

func SetForegroundWindow

func SetForegroundWindow(hwnd syscall.Handle) (isBrought bool, err error)

https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-getforegroundwindow HWND SetForegroundWindow();

func ShowWindow

func ShowWindow(hWnd syscall.Handle, nCmdShow int32) (hidden bool, err error)

https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-showwindow BOOL ShowWindow(

HWND hWnd,
int  nCmdShow

);

Types

type RECT

type RECT struct {
	Left, Top, Right, Bottom int32
}

https://docs.microsoft.com/en-us/windows/win32/api/windef/ns-windef-rect

typedef struct tagRECT {
	LONG left;
	LONG top;
	LONG right;
	LONG bottom;
} RECT, *PRECT, *NPRECT, *LPRECT;

Jump to

Keyboard shortcuts

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