Documentation ¶
Index ¶
- Constants
- Variables
- func AdjustWindowRect(lpRectUpdate LPCRECT, style uintptr, bMenu bool) (bool, error)
- func AttachThreadInput(idAttach uintptr, idAttachTo uintptr, fAttach bool) bool
- func BoolToPtr(v bool) (ret uintptr)
- func BringWindowToTop(hWnd HWND) bool
- func CallWindowProcW(lpPrevWndFunc uintptr, hWnd HWND, Msg uint32, wParam, lParam uintptr) uintptr
- func ClientToScreen(hWnd HWND, lpPoint *POINT) bool
- func DefWindowProcW(hwnd HWND, msg UINT, wparam WPARAM, lparam LPARAM) (lresult uintptr)
- func DestroyWindow(hwnd HWND) (err error)
- func DialogBoxParam(instRes HINSTANCE, name string, parent HWND, proc uintptr, param uintptr) (int, error)
- func DispatchMessageW(msg *Msg) (ret int32)
- func EnableWindow(hWnd HWND, b bool) (bool, error)
- func EndDialog(h HWND, result int) (bool, error)
- func EndPaint(hwnd HWND, ps *PAINTSTRUCT) bool
- func FreeConsole() (ret uint64, err error)
- func GetCurrentThreadId() (ret uint, err error)
- func GetFullPathName(lpFileName string) (string, error)
- func GetKeyState(uVirtKey uint32) int16
- func GetKeyboardState() (keyState []byte, err error)
- func GetMessage(msg *Msg, hwnd HWND, MsgFilterMin uint32, MsgFilterMax uint32) (ret int32, err error)
- func GetWindowLongPtr(h HWND, index int) (ret uintptr, err error)
- func GetWindowText(hWnd HWND) (text string, err error)
- func GetWindowThreadProcessId(hwnd HWND) (id, pid uintptr)
- func InvalidateRect(hwnd HWND, lpRectUpdate LPCRECT, bErase BOOL) error
- func KeyState(key byte) bool
- func KillTimer(hWnd uintptr, nIDEvent TimerEventID) bool
- func LoadString(inst HINSTANCE, id uint) (ret string, err error)
- func MakeIntResource(id uint16) *uint16
- func MessageBoxTimeoutW(parent HWND, text, title string, boxType BoxType, wLanguageId uint16, ...) (int, error)
- func MessageBoxW(parent HWND, text, title string, boxType BoxType) (int, error)
- func MoveWindow(hWnd HWND, x, y, w, h int32) (bool, error)
- func PeekMessage(msg *Msg, hWnd HWND, wMSGfilterMin, wMsgFilterMax, wRemoveMsg UINT) bool
- func PostMessage(hwnd HWND, msg UINT, wparam WPARAM, lparam LPARAM) (err error)
- func PostQuitMessage(exitcode int32)
- func PtrToBool(v uintptr) (ret bool)
- func RedrawWindow(hwnd HWND, lpRectUpdate LPCRECT, prgnUpdate HANDLE, flags UINT) (bool, error)
- func RegisterClassExW(wndclass *Wndclassex) (atom uint16, err error)
- func RegisterClassW(wndclass *Wndclass) (atom uint16, err error)
- func RegisterHotKey(hwnd HWND, id int, fsModifiers UINT, vk UINT) (err error)
- func ReleaseDC(h HWND, hdc HDC) bool
- func ScreenToClient(hWnd HWND, lpPoint *POINT) bool
- func SendMessage(hwnd HWND, msg UINT, wparam WPARAM, lparam LPARAM) (lresult uintptr)
- func SetActiveWindow(hWnd HWND) bool
- func SetClassLong(hWnd HWND, nIndex int, dwNewLong HCURSOR) (bool, error)
- func SetFocus(hwnd HWND) (err error)
- func SetForegroundWindow(hWnd HWND) bool
- func SetLayeredWindowAttributes(hWnd HWND, crKey COLORREF, bAlpha BYTE, dwFlags DWORD) (bool, error)
- func SetMenu(hwnd HWND, menu HMENU) (bool, error)
- func SetWindowLongPtrW(h HWND, index int, value uintptr) (ret uintptr, err error)
- func SetWindowPos(hWnd, hWndInsertAfter HWND, x, y, cx, cy int32, uFlags uint32) bool
- func SetWindowTextW(hWnd HWND, text string) (bool, error)
- func Shell_NotifyIconW(dwMessage uint32, lpData *NOTIFYICONDATA) (ret bool, err error)
- func ShowWindow(hwnd HWND, cmdshow int32) (wasvisible bool)
- func StringToUintptr(v string) uintptr
- func Syscall(addr uintptr, a ...uintptr) (ret uintptr, err error)
- func ToAscii(uVirtKey, uScanCode uint32, lpKeyState []byte, char *uint16, uFlags uint32) int
- func TranslateMessage(msg *Msg) (done bool)
- func UTF16PtrToString(v *uint16) string
- func UintptrToString(v uintptr) string
- func UnregisterClassW(name string) (bool, error)
- func UpdateWindow(hwnd HWND) (err error)
- type BOOL
- type BYTE
- type BoxType
- type CHAR
- type CLSID
- type COLORREF
- type DOUBLE
- type DWORD
- type DWORD64
- type DWORD_PTR
- type FLOAT
- type GUID
- type HANDLE
- type HBITMAP
- type HBRUSH
- type HCURSOR
- func LoadCursor(instance HINSTANCE, cursorname *uint16) (cursor HCURSOR, err error)
- func LoadCursorS(instance HINSTANCE, cursorname string) (cursor HCURSOR, err error)
- func LoadCursorW(instance HINSTANCE, cursorname uintptr) (cursor HCURSOR, err error)
- func SetCursor(cursor HCURSOR) (precursor HCURSOR, err error)
- type HDC
- type HENHMETAFILE
- type HFONT
- type HICON
- type HINSTANCE
- type HMENU
- type HMETAFILE
- type HMODULE
- type HPALETTE
- type HPEN
- type HRGN
- type HWND
- func AppendMenu(h HWND, wFlags, wIDNewItem int, lpNewItem uintptr) (mh HWND, err error)
- func AppendMenuString(h HWND, wFlags, wIDNewItem int, lpNewItem string) (mh HWND, err error)
- func CreatePopupMenu() (HWND, error)
- func CreateWindowExA(exstyle uint32, classname string, windowname string, style uint32, x int32, ...) (hwnd HWND, err error)
- func CreateWindowExW(exstyle uint32, classname string, windowname string, style uint32, x int32, ...) (hwnd HWND, err error)
- func GetActiveWindow() HWND
- func GetDesktopWindow() (HWND, error)
- func GetDlgItem(h HWND, id int) HWND
- func GetForegroundWindow() HWND
- func LoadImageFromFile(name string, typ IMAGE_TYPE) (h HWND, err error)
- func LoadImageW(hInst HINSTANCE, name uintptr, typ IMAGE_TYPE, cx, cy int, fuLoad UINT) (h HWND, err error)
- func SetParent(hWndChild, hWndNewParent HWND) (h HWND, err error)
- type IMAGE_TYPE
- type INT
- type INT16
- type IStream
- type LANGID
- type LONG
- type LONGLONG
- type LPARAM
- type LPBYTE
- type LPCRECT
- type LPCSTR
- type LPCWSTR
- type LPSTR
- type LPWSTR
- type LRESULT
- type Msg
- type NOTIFYICONDATA
- type PAINTSTRUCT
- type POINT
- type POINTL
- type PROPID
- type RECT
- type RECTL
- type SHORT
- type SIZE
- type SIZEL
- type TFNTimerProc
- type ThreadProc
- type TimerEventID
- type UINT
- type UINT16
- type UINT32
- type UINT_PTR
- type ULONG
- type ULONG_PTR
- type WCHAR
- type WORD
- type WPARAM
- type Wndclass
- type Wndclassex
Constants ¶
const ( NIM_ADD = 0x00000000 NIM_MODIFY = 0x00000001 NIM_DELETE = 0x00000002 NIM_SETFOCUS = 0x00000003 NIM_SETVERSION = 0x00000004 )
const ( NIF_MESSAGE = 0x00000001 NIF_ICON = 0x00000002 NIF_TIP = 0x00000004 NIF_STATE = 0x00000008 NIF_INFO = 0x00000010 NIF_GUID = 0x00000020 NIF_REALTIME = 0x00000040 NIF_SHOWTIP = 0x00000080 )
const ( VK_SHIFT = 0x10 VK_CONTROL = 0x11 VK_MENU = 0x12 VK_PAUSE = 0x13 VK_CAPITAL = 0x14 )
Virtual Keys, Standard Set https://docs.microsoft.com/zh-cn/windows/win32/inputdev/virtual-key-codes
const ( /* * Class field offsets for GetClassLong() */ GCL_MENUNAME = (-8) GCL_HBRBACKGROUND = (-10) GCL_HCURSOR = (-12) GCL_HICON = (-14) GCL_HMODULE = (-16) GCL_CBWNDEXTRA = (-18) GCL_CBCLSEXTRA = (-20) GCL_WNDPROC = (-24) GCL_STYLE = (-26) GCW_ATOM = (-32) GCL_HICONSM = (-34) )
const ( SWP_NOSIZE = 1 SWP_NOMOVE = 2 SWP_NOZORDER = 4 SWP_NOREDRAW = 8 SWP_NOACTIVATE = 0x10 SWP_FRAMECHANGED = 0x20 // The frame changed: send WM_NCCALCSIZE SWP_SHOWWINDOW = 0x40 SWP_HIDEWINDOW = 0x80 SWP_NOCOPYBITS = 0x100 SWP_NOOWNERZORDER = 0x200 // Don't do owner Z ordering SWP_NOSENDCHANGING = 0x400 // Don't send WM_WINDOWPOSCHANGING SWP_DRAWFRAME = SWP_FRAMECHANGED SWP_NOREPOSITION = SWP_NOOWNERZORDER SWP_DEFERERASE = 0x2000 SWP_ASYNCWINDOWPOS = 0x4000 HWND_TOP = 0 HWND_BOTTOM = 1 HWND_TOPMOST = ^(-1) // -1 HWND_NOTOPMOST = ^(-2) // -2 )
const ( WM_APP = 32768 WM_ACTIVATE = 6 WM_ACTIVATEAPP = 28 WM_AFXFIRST = 864 WM_AFXLAST = 895 WM_ASKCBFORMATNAME = 780 WM_CANCELJOURNAL = 75 WM_CANCELMODE = 31 WM_CAPTURECHANGED = 533 WM_CHANGECBCHAIN = 781 WM_CHAR = 258 //按下某键,并已发出WM_KEYDOWN, WM_KEYUP消息 WM_CHARTOITEM = 47 WM_CHILDACTIVATE = 34 WM_CLEAR = 771 WM_CLOSE = 16 WM_COMMAND = 273 WM_COMMNOTIFY = 68 /* OBSOLETE */ WM_COMPACTING = 65 WM_COMPAREITEM = 57 WM_CONTEXTMENU = 123 WM_COPY = 769 WM_COPYDATA = 74 WM_CREATE = 1 WM_CTLCOLORBTN = 309 WM_CTLCOLORDLG = 310 WM_CTLCOLOREDIT = 307 WM_CTLCOLORLISTBOX = 308 WM_CTLCOLORMSGBOX = 306 WM_CTLCOLORSCROLLBAR = 311 WM_CTLCOLORSTATIC = 312 WM_CUT = 768 WM_DEADCHAR = 259 WM_DELETEITEM = 45 WM_DESTROY = 2 WM_DESTROYCLIPBOARD = 775 WM_DEVICECHANGE = 537 WM_DEVMODECHANGE = 27 WM_DISPLAYCHANGE = 126 WM_DRAWCLIPBOARD = 776 WM_DRAWITEM = 43 WM_DROPFILES = 563 WM_ENABLE = 10 WM_ENDSESSION = 22 WM_ENTERIDLE = 289 WM_ENTERMENULOOP = 529 WM_ENTERSIZEMOVE = 561 WM_ERASEBKGND = 20 WM_EXITMENULOOP = 530 WM_EXITSIZEMOVE = 562 WM_FONTCHANGE = 29 WM_GETDLGCODE = 135 WM_GETFONT = 49 WM_GETHOTKEY = 51 WM_GETICON = 127 WM_GETMINMAXINFO = 36 WM_GETTEXT = 13 WM_GETTEXTLENGTH = 14 WM_HANDHELDFIRST = 856 WM_HANDHELDLAST = 863 WM_HELP = 83 WM_HOTKEY = 786 WM_HSCROLL = 276 WM_HSCROLLCLIPBOARD = 782 WM_ICONERASEBKGND = 39 WM_INITDIALOG = 272 WM_INITMENU = 278 WM_INITMENUPOPUP = 279 WM_INPUT = 0X00FF WM_INPUTLANGCHANGE = 81 WM_INPUTLANGCHANGEREQUEST = 80 WM_KEYDOWN = 256 WM_KEYUP = 257 WM_KILLFOCUS = 8 WM_MDIACTIVATE = 546 WM_MDICASCADE = 551 WM_MDICREATE = 544 WM_MDIDESTROY = 545 WM_MDIGETACTIVE = 553 WM_MDIICONARRANGE = 552 WM_MDIMAXIMIZE = 549 WM_MDINEXT = 548 WM_MDIREFRESHMENU = 564 WM_MDIRESTORE = 547 WM_MDISETMENU = 560 WM_MDITILE = 550 WM_MEASUREITEM = 44 WM_GETOBJECT = 0X003D WM_CHANGEUISTATE = 0X0127 WM_UPDATEUISTATE = 0X0128 WM_QUERYUISTATE = 0X0129 WM_UNINITMENUPOPUP = 0X0125 WM_MENURBUTTONUP = 290 WM_MENUCOMMAND = 0X0126 WM_MENUGETOBJECT = 0X0124 WM_MENUDRAG = 0X0123 WM_APPCOMMAND = 0X0319 WM_MENUCHAR = 288 WM_MENUSELECT = 287 WM_MOVE = 3 WM_MOVING = 534 WM_NCACTIVATE = 134 WM_NCCALCSIZE = 131 WM_NCCREATE = 129 WM_NCDESTROY = 130 WM_NCHITTEST = 132 WM_NCLBUTTONDBLCLK = 163 WM_NCLBUTTONDOWN = 161 WM_NCLBUTTONUP = 162 WM_NCMBUTTONDBLCLK = 169 WM_NCMBUTTONDOWN = 167 WM_NCMBUTTONUP = 168 WM_NCXBUTTONDOWN = 171 WM_NCXBUTTONUP = 172 WM_NCXBUTTONDBLCLK = 173 WM_NCMOUSEHOVER = 0X02A0 WM_NCMOUSELEAVE = 0X02A2 WM_NCMOUSEMOVE = 160 WM_NCPAINT = 133 WM_NCRBUTTONDBLCLK = 166 WM_NCRBUTTONDOWN = 164 WM_NCRBUTTONUP = 165 WM_NEXTDLGCTL = 40 WM_NEXTMENU = 531 WM_NOTIFY = 78 WM_NOTIFYFORMAT = 85 WM_NULL = 0 WM_PAINT = 15 WM_PAINTCLIPBOARD = 777 WM_PAINTICON = 38 WM_PALETTECHANGED = 785 WM_PALETTEISCHANGING = 784 WM_PARENTNOTIFY = 528 WM_PASTE = 770 WM_PENWINFIRST = 896 WM_PENWINLAST = 911 WM_POWER = 72 WM_POWERBROADCAST = 536 WM_PRINT = 791 WM_PRINTCLIENT = 792 WM_QUERYDRAGICON = 55 WM_QUERYENDSESSION = 17 WM_QUERYNEWPALETTE = 783 WM_QUERYOPEN = 19 WM_QUEUESYNC = 35 WM_QUIT = 18 WM_RENDERALLFORMATS = 774 WM_RENDERFORMAT = 773 WM_SETCURSOR = 32 WM_SETFOCUS = 7 WM_SETFONT = 48 WM_SETHOTKEY = 50 WM_SETICON = 128 WM_SETREDRAW = 11 WM_SETTEXT = 12 WM_SETTINGCHANGE = 26 WM_SHOWWINDOW = 24 WM_SIZE = 5 WM_SIZECLIPBOARD = 779 WM_SIZING = 532 WM_SPOOLERSTATUS = 42 WM_STYLECHANGED = 125 WM_STYLECHANGING = 124 WM_SYSCHAR = 262 WM_SYSCOLORCHANGE = 21 WM_SYSCOMMAND = 274 WM_SYSDEADCHAR = 263 WM_SYSKEYDOWN = 260 WM_SYSKEYUP = 261 WM_TCARD = 82 WM_THEMECHANGED = 794 WM_TIMECHANGE = 30 WM_TIMER = 275 WM_UNDO = 772 WM_USER = 1024 WM_USERCHANGED = 84 WM_VKEYTOITEM = 46 WM_VSCROLL = 277 WM_VSCROLLCLIPBOARD = 778 WM_WINDOWPOSCHANGED = 71 WM_WINDOWPOSCHANGING = 70 WM_WININICHANGE = 26 WM_KEYFIRST = 256 WM_KEYLAST = 264 WM_SYNCPAINT = 136 WM_MOUSEACTIVATE = 33 WM_MOUSEMOVE = 512 WM_LBUTTONDOWN = 513 WM_LBUTTONUP = 514 WM_LBUTTONDBLCLK = 515 WM_RBUTTONDOWN = 516 WM_RBUTTONUP = 517 WM_RBUTTONDBLCLK = 518 WM_MBUTTONDOWN = 519 WM_MBUTTONUP = 520 WM_MBUTTONDBLCLK = 521 WM_MOUSEWHEEL = 522 WM_MOUSEFIRST = 512 WM_XBUTTONDOWN = 523 WM_XBUTTONUP = 524 WM_XBUTTONDBLCLK = 525 WM_MOUSELAST = 525 WM_MOUSEHOVER = 0X2A1 WM_MOUSELEAVE = 0X2A3 )
Window message constants
const ( MK_CONTROL = 0x0008 MK_LBUTTON = 0x0001 MK_MBUTTON = 0x0010 MK_RBUTTON = 0x0002 MK_SHIFT = 0x0004 MK_XBUTTON1 = 0x0020 MK_XBUTTON2 = 0x0040 )
mouse button constants
const ( WS_OVERLAPPED = 0X00000000 WS_POPUP = 0X80000000 WS_CHILD = 0X40000000 WS_MINIMIZE = 0X20000000 WS_VISIBLE = 0X10000000 WS_DISABLED = 0X08000000 WS_CLIPSIBLINGS = 0X04000000 WS_CLIPCHILDREN = 0X02000000 WS_MAXIMIZE = 0X01000000 WS_CAPTION = 0X00C00000 WS_BORDER = 0X00800000 WS_DLGFRAME = 0X00400000 WS_VSCROLL = 0X00200000 WS_HSCROLL = 0X00100000 WS_SYSMENU = 0X00080000 WS_THICKFRAME = 0X00040000 WS_GROUP = 0X00020000 WS_TABSTOP = 0X00010000 WS_MINIMIZEBOX = 0X00020000 WS_MAXIMIZEBOX = 0X00010000 WS_TILED = 0X00000000 WS_ICONIC = 0X20000000 WS_SIZEBOX = 0X00040000 WS_OVERLAPPEDWINDOW = 0X00000000 | 0X00C00000 | 0X00080000 | 0X00040000 | 0X00020000 | 0X00010000 WS_POPUPWINDOW = 0X80000000 | 0X00800000 | 0X00080000 WS_CHILDWINDOW = 0X40000000 )
Window style constants
const ( WS_EX_DLGMODALFRAME = 0X00000001 WS_EX_NOPARENTNOTIFY = 0X00000004 WS_EX_TOPMOST = 0X00000008 WS_EX_ACCEPTFILES = 0X00000010 WS_EX_TRANSPARENT = 0X00000020 WS_EX_MDICHILD = 0X00000040 WS_EX_TOOLWINDOW = 0X00000080 WS_EX_WINDOWEDGE = 0X00000100 WS_EX_CLIENTEDGE = 0X00000200 WS_EX_CONTEXTHELP = 0X00000400 WS_EX_RIGHT = 0X00001000 WS_EX_LEFT = 0X00000000 WS_EX_RTLREADING = 0X00002000 WS_EX_LTRREADING = 0X00000000 WS_EX_LEFTSCROLLBAR = 0X00004000 WS_EX_RIGHTSCROLLBAR = 0X00000000 WS_EX_CONTROLPARENT = 0X00010000 WS_EX_STATICEDGE = 0X00020000 WS_EX_APPWINDOW = 0X00040000 WS_EX_OVERLAPPEDWINDOW = 0X00000100 | 0X00000200 WS_EX_PALETTEWINDOW = 0X00000100 | 0X00000080 | 0X00000008 WS_EX_LAYERED = 0X00080000 WS_EX_NOINHERITLAYOUT = 0X00100000 WS_EX_LAYOUTRTL = 0X00400000 WS_EX_NOACTIVATE = 0X08000000 WS_TILEDWINDOW = WS_OVERLAPPEDWINDOW WS_EX_COMPOSITED = 0x02000000 //Windows XP:将一个窗体的所有子窗口使用双缓冲按照从低到高方式绘制出来,参阅remark项.如果这个视窗已经使用经典样式中的下列值CS_OWNDC , CS_CLASSDC,WS_EX_CONTEXTHELP.此参数将不能使用.这个样式的视窗在标题栏上有一个问号,当拥护点击着个问号,鼠标变成一个问号,如果用户然后点击一个子窗口,子窗就会收到一条WM_HELP消息.子窗口将把这个消息传递给他的父进程,这个父进程将用HELP_WM_HELP命令调用WinHelp函数.这个帮助程序常常弹出一个典型的包含其子窗口的帮助的窗口本参数不能和WS_MAXIMIZEBOX ,WS_MINIMIZEBOX一起使用. )
Extended window style constants
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 SW_MAX = 10 //{同 SW_SHOWNORMAL} )
ShowWindow constants
const ( BST_CHECKED = 1 BST_INDETERMINATE = 2 BST_UNCHECKED = 0 BST_FOCUS = 8 BST_PUSHED = 4 )
Button state constants
const ( COLOR_3DDKSHADOW = 21 COLOR_3DFACE = 15 COLOR_3DHILIGHT = 20 COLOR_3DHIGHLIGHT = 20 COLOR_3DLIGHT = 22 COLOR_BTNHILIGHT = 20 COLOR_3DSHADOW = 16 COLOR_ACTIVEBORDER = 10 COLOR_ACTIVECAPTION = 2 COLOR_APPWORKSPACE = 12 COLOR_BACKGROUND = 1 COLOR_DESKTOP = 1 COLOR_BTNFACE = 15 COLOR_BTNHIGHLIGHT = 20 COLOR_BTNSHADOW = 16 COLOR_BTNTEXT = 18 COLOR_CAPTIONTEXT = 9 COLOR_GRAYTEXT = 17 COLOR_HIGHLIGHT = 13 COLOR_HIGHLIGHTTEXT = 14 COLOR_INACTIVEBORDER = 11 COLOR_INACTIVECAPTION = 3 COLOR_INACTIVECAPTIONTEXT = 19 COLOR_INFOBK = 24 COLOR_INFOTEXT = 23 COLOR_MENU = 4 COLOR_MENUTEXT = 7 COLOR_SCROLLBAR = 0 COLOR_WINDOW = 5 COLOR_WINDOWFRAME = 6 COLOR_WINDOWTEXT = 8 COLOR_HOTLIGHT = 26 COLOR_GRADIENTACTIVECAPTION = 27 COLOR_GRADIENTINACTIVECAPTION = 28 )
Predefined brushes constants
const ( IDOK = 1 IDCANCEL = 2 IDABORT = 3 IDRETRY = 4 IDIGNORE = 5 IDYES = 6 IDNO = 7 IDCLOSE = 8 IDHELP = 9 IDTRYAGAIN = 10 IDCONTINUE = 11 IDTIMEOUT = 32000 )
Dialog box command ids
const ( SC_SIZE = 0xF000 SC_MOVE = 0xF010 SC_MINIMIZE = 0xF020 SC_MAXIMIZE = 0xF030 SC_NEXTWINDOW = 0xF040 SC_PREVWINDOW = 0xF050 SC_CLOSE = 0xF060 SC_VSCROLL = 0xF070 SC_HSCROLL = 0xF080 SC_MOUSEMENU = 0xF090 SC_KEYMENU = 0xF100 SC_ARRANGE = 0xF110 SC_RESTORE = 0xF120 SC_TASKLIST = 0xF130 SC_SCREENSAVE = 0xF140 SC_HOTKEY = 0xF150 SC_DEFAULT = 0xF160 SC_MONITORPOWER = 0xF170 SC_CONTEXTHELP = 0xF180 SC_SEPARATOR = 0xF00F )
System commands
const ( SS_BITMAP = 14 SS_BLACKFRAME = 7 SS_BLACKRECT = 4 SS_CENTER = 1 SS_CENTERIMAGE = 512 SS_EDITCONTROL = 0x2000 SS_ENHMETAFILE = 15 SS_ETCHEDFRAME = 18 SS_ETCHEDHORZ = 16 SS_ETCHEDVERT = 17 SS_GRAYFRAME = 8 SS_GRAYRECT = 5 SS_ICON = 3 SS_LEFT = 0 SS_LEFTNOWORDWRAP = 0xc SS_NOPREFIX = 128 SS_NOTIFY = 256 SS_OWNERDRAW = 0xd SS_REALSIZECONTROL = 0x040 SS_REALSIZEIMAGE = 0x800 SS_RIGHT = 2 SS_RIGHTJUST = 0x400 SS_SIMPLE = 11 SS_SUNKEN = 4096 SS_WHITEFRAME = 9 SS_WHITERECT = 6 SS_USERITEM = 10 SS_TYPEMASK = 0x0000001F SS_ENDELLIPSIS = 0x00004000 SS_PATHELLIPSIS = 0x00008000 SS_WORDELLIPSIS = 0x0000C000 SS_ELLIPSISMASK = 0x0000C000 )
Static control styles
const ( BM_CLICK = 245 BM_GETCHECK = 240 BM_GETIMAGE = 246 BM_GETSTATE = 242 BM_SETCHECK = 241 BM_SETIMAGE = 247 BM_SETSTATE = 243 BM_SETSTYLE = 244 )
Button message constants
const ( BN_CLICKED = 0 BN_PAINT = 1 BN_HILITE = 2 BN_PUSHED = BN_HILITE BN_UNHILITE = 3 BN_UNPUSHED = BN_UNHILITE BN_DISABLE = 4 BN_DOUBLECLICKED = 5 BN_DBLCLK = BN_DOUBLECLICKED BN_SETFOCUS = 6 BN_KILLFOCUS = 7 )
Button notifications
const ( BS_3STATE = 5 BS_AUTO3STATE = 6 BS_AUTOCHECKBOX = 3 BS_AUTORADIOBUTTON = 9 BS_BITMAP = 128 BS_BOTTOM = 0X800 BS_CENTER = 0X300 BS_CHECKBOX = 2 BS_DEFPUSHBUTTON = 1 BS_GROUPBOX = 7 BS_ICON = 64 BS_LEFT = 256 BS_LEFTTEXT = 32 BS_MULTILINE = 0X2000 BS_NOTIFY = 0X4000 BS_OWNERDRAW = 0XB BS_PUSHBUTTON = 0 BS_PUSHLIKE = 4096 BS_RADIOBUTTON = 4 BS_RIGHT = 512 BS_RIGHTBUTTON = 32 BS_TEXT = 0 BS_TOP = 0X400 BS_USERBUTTON = 8 BS_VCENTER = 0XC00 BS_FLAT = 0X8000 )
Button style constants
const ( SM_CXSCREEN = 0 SM_CYSCREEN = 1 SM_CXVSCROLL = 2 SM_CYHSCROLL = 3 SM_CYCAPTION = 4 SM_CXBORDER = 5 SM_CYBORDER = 6 SM_CXDLGFRAME = 7 SM_CYDLGFRAME = 8 SM_CYVTHUMB = 9 SM_CXHTHUMB = 10 SM_CXICON = 11 SM_CYICON = 12 SM_CXCURSOR = 13 SM_CYCURSOR = 14 SM_CYMENU = 15 SM_CXFULLSCREEN = 16 SM_CYFULLSCREEN = 17 SM_CYKANJIWINDOW = 18 SM_MOUSEPRESENT = 19 SM_CYVSCROLL = 20 SM_CXHSCROLL = 21 SM_DEBUG = 22 SM_SWAPBUTTON = 23 SM_RESERVED1 = 24 SM_RESERVED2 = 25 SM_RESERVED3 = 26 SM_RESERVED4 = 27 SM_CXMIN = 28 SM_CYMIN = 29 SM_CXSIZE = 30 SM_CYSIZE = 31 SM_CXFRAME = 32 SM_CYFRAME = 33 SM_CXMINTRACK = 34 SM_CYMINTRACK = 35 SM_CXDOUBLECLK = 36 SM_CYDOUBLECLK = 37 SM_CXICONSPACING = 38 SM_CYICONSPACING = 39 SM_MENUDROPALIGNMENT = 40 SM_PENWINDOWS = 41 SM_DBCSENABLED = 42 SM_CMOUSEBUTTONS = 43 SM_CXFIXEDFRAME = SM_CXDLGFRAME SM_CYFIXEDFRAME = SM_CYDLGFRAME SM_CXSIZEFRAME = SM_CXFRAME SM_CYSIZEFRAME = SM_CYFRAME SM_SECURE = 44 SM_CXEDGE = 45 SM_CYEDGE = 46 SM_CXMINSPACING = 47 SM_CYMINSPACING = 48 SM_CXSMICON = 49 SM_CYSMICON = 50 SM_CYSMCAPTION = 51 SM_CXSMSIZE = 52 SM_CYSMSIZE = 53 SM_CXMENUSIZE = 54 SM_CYMENUSIZE = 55 SM_ARRANGE = 56 SM_CXMINIMIZED = 57 SM_CYMINIMIZED = 58 SM_CXMAXTRACK = 59 SM_CYMAXTRACK = 60 SM_CXMAXIMIZED = 61 SM_CYMAXIMIZED = 62 SM_NETWORK = 63 SM_CLEANBOOT = 67 SM_CXDRAG = 68 SM_CYDRAG = 69 SM_SHOWSOUNDS = 70 SM_CXMENUCHECK = 71 SM_CYMENUCHECK = 72 SM_SLOWMACHINE = 73 SM_MIDEASTENABLED = 74 SM_MOUSEWHEELPRESENT = 75 SM_XVIRTUALSCREEN = 76 SM_YVIRTUALSCREEN = 77 SM_CXVIRTUALSCREEN = 78 SM_CYVIRTUALSCREEN = 79 SM_CMONITORS = 80 SM_SAMEDISPLAYFORMAT = 81 SM_IMMENABLED = 82 SM_CXFOCUSBORDER = 83 SM_CYFOCUSBORDER = 84 SM_TABLETPC = 86 SM_MEDIACENTER = 87 SM_STARTER = 88 SM_SERVERR2 = 89 SM_CMETRICS = 91 SM_REMOTESESSION = 0x1000 SM_SHUTTINGDOWN = 0x2000 SM_REMOTECONTROL = 0x2001 SM_CARETBLINKINGENABLED = 0x2002 )
GetSystemMetrics constants
const ( CS_VREDRAW = 0x00000001 CS_HREDRAW = 0x00000002 CS_KEYCVTWINDOW = 0x00000004 CS_DBLCLKS = 0x00000008 CS_OWNDC = 0x00000020 CS_CLASSDC = 0x00000040 CS_PARENTDC = 0x00000080 CS_NOKEYCVT = 0x00000100 CS_NOCLOSE = 0x00000200 CS_SAVEBITS = 0x00000800 CS_BYTEALIGNCLIENT = 0x00001000 CS_BYTEALIGNWINDOW = 0x00002000 CS_GLOBALCLASS = 0x00004000 CS_IME = 0x00010000 CS_DROPSHADOW = 0x00020000 )
Window class styles
const ( GWL_EXSTYLE = -20 //设定一个新的扩展风格。 GWL_STYLE = -16 //设定一个新的窗口风格。 GWL_WNDPROC = -4 //为窗口过程设定一个新的地址。 GWLP_WNDPROC = -4 GWL_HINSTANCE = -6 GWLP_HINSTANCE = -6 //设置一个新的应用程序实例句柄。 GWL_HWNDPARENT = -8 //改变子窗口的父窗口,应使用SetParent函数。 GWLP_HWNDPARENT = -8 GWL_ID = -12 //设置一个新的窗口标识符。 GWLP_ID = -12 GWL_USERDATA = -21 //设置与窗口有关的32位值。每个窗口均有一个由创建该窗口的应用程序使用的32位值。 GWLP_USERDATA = -21 )
GetWindowLong and GetWindowLongPtr constants
const ( RDW_INVALIDATE = 0x0001 RDW_INTERNALPAINT = 0x0002 RDW_ERASE = 0x0004 RDW_VALIDATE = 0x0008 RDW_NOINTERNALPAINT = 0x0010 RDW_NOERASE = 0x0020 RDW_NOCHILDREN = 0x0040 RDW_ALLCHILDREN = 0x0080 RDW_UPDATENOW = 0x0100 RDW_ERASENOW = 0x0200 RDW_FRAME = 0x0400 RDW_NOFRAME = 0x0800 )
* RedrawWindow() flags
const ( LWA_COLORKEY = 0x00000001 LWA_ALPHA = 0x00000002 )
const ( /* * Menu flags for Add/Check/EnableMenuItem() */ MF_INSERT = 0x00000000 MF_CHANGE = 0x00000080 MF_APPEND = 0x00000100 MF_DELETE = 0x00000200 MF_REMOVE = 0x00001000 MF_BYCOMMAND = 0x00000000 MF_BYPOSITION = 0x00000400 MF_SEPARATOR = 0x00000800 MF_ENABLED = 0x00000000 MF_GRAYED = 0x00000001 MF_DISABLED = 0x00000002 MF_UNCHECKED = 0x00000000 MF_CHECKED = 0x00000008 MF_USECHECKBITMAPS = 0x00000200 MF_STRING = 0x00000000 MF_BITMAP = 0x00000004 MF_OWNERDRAW = 0x00000100 MF_POPUP = 0x00000010 MF_MENUBARBREAK = 0x00000020 MF_MENUBREAK = 0x00000040 MF_UNHILITE = 0x00000000 MF_HILITE = 0x00000080 MF_DEFAULT = 0x00001000 MF_SYSMENU = 0x00002000 MF_HELP = 0x00004000 //MF_RIGHTJUSTIFY 0x00004000 MF_MOUSESELECT = 0x00008000 )
const ( /* * Flags for TrackPopupMenu */ TPM_LEFTBUTTON = 0x0000 TPM_RIGHTBUTTON = 0x0002 TPM_LEFTALIGN = 0x0000 TPM_CENTERALIGN = 0x0004 TPM_RIGHTALIGN = 0x0008 TPM_TOPALIGN = 0x0000 TPM_VCENTERALIGN = 0x0010 TPM_BOTTOMALIGN = 0x0020 TPM_HORIZONTAL = 0x0000 /* Horz alignment matters more */ TPM_VERTICAL = 0x0040 /* Vert alignment matters more */ TPM_NONOTIFY = 0x0080 /* Don't send any notification msgs */ TPM_RETURNCMD = 0x0100 TPM_RECURSE = 0x0001 TPM_HORPOSANIMATION = 0x0400 TPM_HORNEGANIMATION = 0x0800 TPM_VERPOSANIMATION = 0x1000 TPM_VERNEGANIMATION = 0x2000 TPM_NOANIMATION = 0x4000 TPM_LAYOUTRTL = 0x8000 TPM_WORKAREA = 0x10000 )
const ( IMAGE_BITMAP IMAGE_TYPE = 0 IMAGE_ICON = 1 IMAGE_CURSOR = 2 )
const ( LR_DEFAULTCOLOR = 0x00000000 LR_MONOCHROME = 0x00000001 LR_COLOR = 0x00000002 LR_COPYRETURNORG = 0x00000004 LR_COPYDELETEORG = 0x00000008 LR_LOADFROMFILE = 0x00000010 LR_LOADTRANSPARENT = 0x00000020 LR_DEFAULTSIZE = 0x00000040 LR_VGACOLOR = 0x00000080 LR_LOADMAP3DCOLORS = 0x00001000 LR_CREATEDIBSECTION = 0x00002000 LR_COPYFROMRESOURCE = 0x00004000 LR_SHARED = 0x00008000 )
const ( FILE_FLAG_NO_BUFFERING = 0x20000000 FILE_FLAG_WRITE_THROUGH = 0x80000000 )
const CW_USEDEFAULT = ^0x7fffffff
const (
HWND_BROADCAST = HWND(0xffff)
)
Variables ¶
var ( // Some globally known cursors IDC_ARROW = MakeIntResource(32512) IDC_IBEAM = MakeIntResource(32513) IDC_WAIT = MakeIntResource(32514) IDC_CROSS = MakeIntResource(32515) IDC_UPARROW = MakeIntResource(32516) IDC_SIZENS = MakeIntResource(32645) IDC_SIZEWE = MakeIntResource(32644) IDC_SIZENWSE = MakeIntResource(32642) IDC_SIZENESW = MakeIntResource(32643) IDC_SIZEALL = MakeIntResource(32646) IDC_NO = MakeIntResource(32648) IDC_HAND = MakeIntResource(32649) IDC_APPSTARTING = MakeIntResource(32650) IDC_HELP = MakeIntResource(32651) IDC_ICON = MakeIntResource(32641) IDC_SIZE = MakeIntResource(32640) // Some globally known icons IDI_APPLICATION = MakeIntResource(32512) IDI_HAND = MakeIntResource(32513) IDI_QUESTION = MakeIntResource(32514) IDI_EXCLAMATION = MakeIntResource(32515) IDI_ASTERISK = MakeIntResource(32516) IDI_WINLOGO = MakeIntResource(32517) IDI_WARNING = IDI_EXCLAMATION IDI_ERROR = IDI_HAND IDI_INFORMATION = IDI_ASTERISK )
var (
ProcGetFullPathName = modkernel32.NewProc("GetFullPathNameA")
)
var RECTL_SIZE = UINT(unsafe.Sizeof(RECTL{}))
var RECT_SIZE = UINT(unsafe.Sizeof(RECT{}))
Functions ¶
func AdjustWindowRect ¶
func AttachThreadInput ¶
idAttach As Long, ByVal idAttachTo As Long, ByVal fAttach
func BringWindowToTop ¶
func CallWindowProcW ¶
func ClientToScreen ¶
func DefWindowProcW ¶
func DestroyWindow ¶
func DialogBoxParam ¶
func DispatchMessageW ¶
func EndPaint ¶
func EndPaint(hwnd HWND, ps *PAINTSTRUCT) bool
func FreeConsole ¶
func GetCurrentThreadId ¶
func GetFullPathName ¶
func GetKeyState ¶
func GetKeyboardState ¶
func GetMessage ¶
func GetWindowText ¶
func InvalidateRect ¶
LPCRECT lpRect, BOOL bErase = TRUE
func KillTimer ¶
func KillTimer(hWnd uintptr, nIDEvent TimerEventID) bool
func MakeIntResource ¶
func MessageBoxTimeoutW ¶
func PeekMessage ¶
func PostQuitMessage ¶
func PostQuitMessage(exitcode int32)
func RedrawWindow ¶
prgnUpdate *CRgn
func RegisterClassExW ¶
func RegisterClassExW(wndclass *Wndclassex) (atom uint16, err error)
func RegisterClassW ¶
func ScreenToClient ¶
func SendMessage ¶
func SetActiveWindow ¶
func SetForegroundWindow ¶
func SetWindowLongPtrW ¶
func SetWindowPos ¶
func Shell_NotifyIconW ¶
func Shell_NotifyIconW(dwMessage uint32, lpData *NOTIFYICONDATA) (ret bool, err error)
func ShowWindow ¶
func StringToUintptr ¶
func TranslateMessage ¶
func UTF16PtrToString ¶
func UintptrToString ¶
func UnregisterClassW ¶
func UpdateWindow ¶
Types ¶
type BoxType ¶
type BoxType uint
const ( MB_OK BoxType = 0x00000000 MB_OKCANCEL BoxType = 0x00000001 MB_ABORTRETRYIGNORE BoxType = 0x00000002 MB_YESNOCANCEL BoxType = 0x00000003 MB_YESNO BoxType = 0x00000004 MB_RETRYCANCEL BoxType = 0x00000005 //#if(WINVER >= 0x0500) MB_CANCELTRYCONTINUE BoxType = 0x00000006 MB_ICONHAND BoxType = 0x00000010 MB_ICONQUESTION BoxType = 0x00000020 MB_ICONEXCLAMATION BoxType = 0x00000030 MB_ICONASTERISK BoxType = 0x00000040 //#if(WINVER >= 0x0400) MB_USERICON BoxType = 0x00000080 MB_ICONWARNING BoxType = MB_ICONEXCLAMATION MB_ICONERROR BoxType = MB_ICONHAND MB_ICONINFORMATION BoxType = MB_ICONASTERISK MB_ICONSTOP BoxType = MB_ICONHAND MB_DEFBUTTON1 BoxType = 0x00000000 MB_DEFBUTTON2 BoxType = 0x00000100 MB_DEFBUTTON3 BoxType = 0x00000200 //#if(WINVER >= 0x0400) MB_DEFBUTTON4 BoxType = 0x00000300 MB_APPLMODAL BoxType = 0x00000000 MB_SYSTEMMODAL BoxType = 0x00001000 MB_TASKMODAL BoxType = 0x00002000 //#if(WINVER >= 0x0400) MB_HELP BoxType = 0x00004000 // Help Button MB_NOFOCUS BoxType = 0x00008000 MB_SETFOREGROUND BoxType = 0x00010000 MB_DEFAULT_DESKTOP_ONLY BoxType = 0x00020000 //#if(WINVER >= 0x0400) MB_TOPMOST BoxType = 0x00040000 MB_RIGHT BoxType = 0x00080000 MB_RTLREADING BoxType = 0x00100000 //#ifdef _WIN32_WINNT //#if (_WIN32_WINNT >= 0x0400) MB_SERVICE_NOTIFICATION BoxType = 0x00200000 //#else // MB_SERVICE_NOTIFICATION BoxType = 0x00040000 //#endif MB_SERVICE_NOTIFICATION_NT3X BoxType = 0x00040000 MB_TYPEMASK BoxType = 0x0000000F MB_ICONMASK BoxType = 0x000000F0 MB_DEFMASK BoxType = 0x00000F00 MB_MODEMASK BoxType = 0x00003000 MB_MISCMASK BoxType = 0x0000C000 )
type HANDLE ¶
type HANDLE uintptr
func CreateThread ¶
func CreateThread(proc ThreadProc) (h HANDLE, tid uintptr, err error)
type HDC ¶
func BeginPaint ¶
func BeginPaint(hwnd HWND, ps *PAINTSTRUCT) (hdc HDC)
type HENHMETAFILE ¶
type HENHMETAFILE uintptr
type HWND ¶
type HWND = HANDLE
func AppendMenu ¶
func AppendMenuString ¶
func CreatePopupMenu ¶
func CreateWindowExA ¶
func CreateWindowExW ¶
func GetActiveWindow ¶
func GetActiveWindow() HWND
func GetDesktopWindow ¶
func GetDlgItem ¶
func GetForegroundWindow ¶
func GetForegroundWindow() HWND
func LoadImageFromFile ¶
func LoadImageFromFile(name string, typ IMAGE_TYPE) (h HWND, err error)
func LoadImageW ¶
type IMAGE_TYPE ¶
type IMAGE_TYPE uint8
type LANGID ¶
type LANGID uint16
const ( LANG_NEUTRAL LANGID = 0x00 LANG_INVARIANT LANGID = 0x7f LANG_AFRIKAANS LANGID = 0x36 LANG_ALBANIAN LANGID = 0x1c LANG_ALSATIAN LANGID = 0x84 LANG_AMHARIC LANGID = 0x5e LANG_ARABIC LANGID = 0x01 LANG_ARMENIAN LANGID = 0x2b LANG_ASSAMESE LANGID = 0x4d LANG_AZERI LANGID = 0x2c LANG_BASHKIR LANGID = 0x6d LANG_BASQUE LANGID = 0x2d LANG_BELARUSIAN LANGID = 0x23 LANG_BENGALI LANGID = 0x45 LANG_BRETON LANGID = 0x7e LANG_BOSNIAN LANGID = 0x1a // Use with SUBLANG_BOSNIAN_* Sublanguage IDs LANG_BOSNIAN_NEUTRAL LANGID = 0x781a // Use with the ConvertDefaultLocale function LANG_BULGARIAN LANGID = 0x02 LANG_CATALAN LANGID = 0x03 LANG_CHINESE LANGID = 0x04 // Use with SUBLANG_CHINESE_* Sublanguage IDs LANG_CHINESE_SIMPLIFIED LANGID = 0x04 // Use with the ConvertDefaultLocale function LANG_CHINESE_TRADITIONAL LANGID = 0x7c04 // Use with the ConvertDefaultLocale function LANG_CORSICAN LANGID = 0x83 LANG_CROATIAN LANGID = 0x1a LANG_CZECH LANGID = 0x05 LANG_DANISH LANGID = 0x06 LANG_DARI LANGID = 0x8c LANG_DIVEHI LANGID = 0x65 LANG_DUTCH LANGID = 0x13 LANG_ENGLISH LANGID = 0x09 LANG_ESTONIAN LANGID = 0x25 LANG_FAEROESE LANGID = 0x38 LANG_FARSI LANGID = 0x29 // Deprecated: use LANG_PERSIAN instead LANG_FILIPINO LANGID = 0x64 LANG_FINNISH LANGID = 0x0b LANG_FRENCH LANGID = 0x0c LANG_FRISIAN LANGID = 0x62 LANG_GALICIAN LANGID = 0x56 LANG_GEORGIAN LANGID = 0x37 LANG_GERMAN LANGID = 0x07 LANG_GREEK LANGID = 0x08 LANG_GREENLANDIC LANGID = 0x6f LANG_GUJARATI LANGID = 0x47 LANG_HAUSA LANGID = 0x68 LANG_HEBREW LANGID = 0x0d LANG_HINDI LANGID = 0x39 LANG_HUNGARIAN LANGID = 0x0e LANG_ICELANDIC LANGID = 0x0f LANG_IGBO LANGID = 0x70 LANG_INDONESIAN LANGID = 0x21 LANG_INUKTITUT LANGID = 0x5d LANG_IRISH LANGID = 0x3c // Use with the SUBLANG_IRISH_IRELAND Sublanguage ID LANG_ITALIAN LANGID = 0x10 LANG_JAPANESE LANGID = 0x11 LANG_KANNADA LANGID = 0x4b LANG_KASHMIRI LANGID = 0x60 LANG_KAZAK LANGID = 0x3f LANG_KHMER LANGID = 0x53 LANG_KICHE LANGID = 0x86 LANG_KINYARWANDA LANGID = 0x87 LANG_KONKANI LANGID = 0x57 LANG_KOREAN LANGID = 0x12 LANG_KYRGYZ LANGID = 0x40 LANG_LAO LANGID = 0x54 LANG_LATVIAN LANGID = 0x26 LANG_LITHUANIAN LANGID = 0x27 LANG_LOWER_SORBIAN LANGID = 0x2e LANG_LUXEMBOURGISH LANGID = 0x6e LANG_MACEDONIAN LANGID = 0x2f // the Former Yugoslav Republic of Macedonia LANG_MALAY LANGID = 0x3e LANG_MALAYALAM LANGID = 0x4c LANG_MALTESE LANGID = 0x3a LANG_MANIPURI LANGID = 0x58 LANG_MAORI LANGID = 0x81 LANG_MAPUDUNGUN LANGID = 0x7a LANG_MARATHI LANGID = 0x4e LANG_MOHAWK LANGID = 0x7c LANG_MONGOLIAN LANGID = 0x50 LANG_NEPALI LANGID = 0x61 LANG_NORWEGIAN LANGID = 0x14 LANG_OCCITAN LANGID = 0x82 LANG_ORIYA LANGID = 0x48 LANG_PASHTO LANGID = 0x63 LANG_PERSIAN LANGID = 0x29 LANG_POLISH LANGID = 0x15 LANG_PORTUGUESE LANGID = 0x16 LANG_PUNJABI LANGID = 0x46 LANG_QUECHUA LANGID = 0x6b LANG_ROMANIAN LANGID = 0x18 LANG_ROMANSH LANGID = 0x17 LANG_RUSSIAN LANGID = 0x19 LANG_SAMI LANGID = 0x3b LANG_SANSKRIT LANGID = 0x4f LANG_SCOTTISH_GAELIC LANGID = 0x91 LANG_SERBIAN LANGID = 0x1a // Use with the SUBLANG_SERBIAN_* Sublanguage IDs LANG_SERBIAN_NEUTRAL LANGID = 0x7c1a // Use with the ConvertDefaultLocale function LANG_SINDHI LANGID = 0x59 LANG_SINHALESE LANGID = 0x5b LANG_SLOVAK LANGID = 0x1b LANG_SLOVENIAN LANGID = 0x24 LANG_SOTHO LANGID = 0x6c LANG_SPANISH LANGID = 0x0a LANG_SWAHILI LANGID = 0x41 LANG_SWEDISH LANGID = 0x1d LANG_SYRIAC LANGID = 0x5a LANG_TAJIK LANGID = 0x28 LANG_TAMAZIGHT LANGID = 0x5f LANG_TAMIL LANGID = 0x49 LANG_TATAR LANGID = 0x44 LANG_TELUGU LANGID = 0x4a LANG_THAI LANGID = 0x1e LANG_TIBETAN LANGID = 0x51 LANG_TIGRIGNA LANGID = 0x73 LANG_TSWANA LANGID = 0x32 LANG_TURKISH LANGID = 0x1f LANG_TURKMEN LANGID = 0x42 LANG_UIGHUR LANGID = 0x80 LANG_UKRAINIAN LANGID = 0x22 LANG_UPPER_SORBIAN LANGID = 0x2e LANG_URDU LANGID = 0x20 LANG_UZBEK LANGID = 0x43 LANG_VIETNAMESE LANGID = 0x2a LANG_WELSH LANGID = 0x52 LANG_WOLOF LANGID = 0x88 LANG_XHOSA LANGID = 0x34 LANG_YAKUT LANGID = 0x85 LANG_YI LANGID = 0x78 LANG_YORUBA LANGID = 0x6a LANG_ZULU LANGID = 0x35 )
Primary language IDs.
WARNING: These aren't always unique. Bosnian, Serbian & Croation for example.
It is recommended that applications test for locale names or actual LCIDs.
Note that the LANG, SUBLANG construction is not always consistent. The named locale APIs (eg GetLocaleInfoEx) are recommended.
type NOTIFYICONDATA ¶
type PAINTSTRUCT ¶
type POINT ¶
func GetCursorPos ¶
type TFNTimerProc ¶
type TFNTimerProc func(hWnd uintptr, uMsg UINT, idEvent TimerEventID, Time DWORD)
type ThreadProc ¶
HANDLE WINAPI CreateThread( _In_opt_LPSECURITY_ATTRIBUTES lpThreadAttributes, _In_SIZE_T dwStackSize, _In_LPTHREAD_START_ROUTINE lpStartAddress, _In_opt___drv_aliasesMemLPVOID lpParameter, _In_DWORD dwCreationFlags, _Out_opt_LPDWORD lpThreadId );
DWORD WINAPI ThreadProc(LPVOID lpParam){ return 0 }
hThread[i]=CreateThread(
NULL,//default security attributes 0,//use default stack size ThreadProc,//thread function pData,//argument to thread function 0,//use default creation flags &dwThreadId[i]);//returns the thread identifier
type TimerEventID ¶
type TimerEventID UINT
type UINT ¶
type UINT uint32
func SetTimer ¶
func SetTimer(hWnd uintptr, nIDEvent TimerEventID, uElapse UINT, lpTimerFunc TFNTimerProc) UINT