Documentation ¶
Index ¶
- Variables
- func AdjustWindowRectEx(rc *RECT, style co.WS, hasMenu bool, exStyle co.WS_EX)
- func AllocConsole() error
- func AllowSetForegroundWindow(processId uint32)
- func AttachConsole(processId uint32) error
- func BroadcastSystemMessage(flags co.BSF, recipients co.BSM, msg co.WM, wParam WPARAM, lParam LPARAM) (broadcastSuccessful bool, receivers co.BSM, e error)
- func ChooseColor(cc *CHOOSECOLOR) bool
- func CommDlgExtendedError() errco.CDERR
- func CommandLineToArgv(cmdLine string) []string
- func CopyFile(existingFile, newFile string, failIfExists bool) error
- func CreateDirectory(pathName string, securityAttributes *SECURITY_ATTRIBUTES) error
- func CreateProcess(applicationName, commandLine StrOpt, ...)
- func DeleteFile(fileName string) error
- func DestroyCaret() error
- func DispatchMessage(msg *MSG) uintptr
- func DwmEnableMMCSS(enable bool) error
- func DwmFlush() error
- func DwmIsCompositionEnabled() bool
- func EndMenu()
- func EnumDisplayDevices(device StrOpt, flags co.EDD, ...)
- func EnumProcesses() ([]uint32, error)
- func EnumWindows(callback func(hWnd HWND) bool)
- func ExitProcess(exitCode uint32)
- func ExpandEnvironmentStrings(src string) string
- func FileTimeToSystemTime(inFileTime *FILETIME, outSystemTime *SYSTEMTIME)
- func FreeConsole() error
- func GdiFlush() bool
- func GetAsyncKeyState(virtKeyCode co.VK) uint16
- func GetCommandLine() string
- func GetConsoleCP() (co.CP, error)
- func GetConsoleTitle() (string, error)
- func GetCurrentDirectory() string
- func GetCurrentProcessId() uint32
- func GetCurrentThreadId() uint32
- func GetDialogBaseUnits() (horz, vert uint16)
- func GetDynamicTimeZoneInformation(timeZoneInfo *DYNAMIC_TIME_ZONE_INFORMATION) co.TIME_ZONE_ID
- func GetEnvironmentStrings() map[string]string
- func GetFileAttributes(fileName string) (co.FILE_ATTRIBUTE, error)
- func GetFileVersionInfo(fileName string) ([]byte, error)
- func GetFileVersionInfoSize(fileName string) (uint32, error)
- func GetGUIThreadInfo(thread_id uint32, info *GUITHREADINFO)
- func GetInputState() bool
- func GetLocalTime(systemTime *SYSTEMTIME)
- func GetMessage(msg *MSG, hWnd HWND, msgFilterMin, msgFilterMax uint32) (int32, error)
- func GetMessageTime() time.Duration
- func GetProcessDefaultLayout() co.LAYOUT
- func GetQueueStatus(flags co.QS) uint32
- func GetStartupInfo(startupInfo *STARTUPINFO)
- func GetSystemInfo(systemInfo *SYSTEM_INFO)
- func GetSystemMetrics(index co.SM) int32
- func GetSystemMetricsForDpi(index co.SM, dpi uint32) int32
- func GetSystemTime(systemTime *SYSTEMTIME)
- func GetTickCount64() uint64
- func GetTimeZoneInformation(timeZoneInfo *TIME_ZONE_INFORMATION) co.TIME_ZONE_ID
- func GetTimeZoneInformationForYear(wYear uint16, dtzi *DYNAMIC_TIME_ZONE_INFORMATION, tzi *TIME_ZONE_INFORMATION)
- func GetVolumeInformation(rootPathName StrOpt) (_VolumeInfo, error)
- func GetWindowsDirectory() string
- func HIBYTE(val uint16) uint8
- func HIWORD(val uint32) uint16
- func InSendMessage() bool
- func InSendMessageEx() co.ISMEX
- func InitCommonControls()
- func InitCommonControlsEx(icce *INITCOMMONCONTROLSEX) bool
- func IsAppThemed() bool
- func IsCompositionActive() bool
- func IsGUIThread(convertToGuiThread bool) (bool, error)
- func IsThemeActive() bool
- func IsWindows10OrGreater() bool
- func IsWindows7OrGreater() bool
- func IsWindows8OrGreater() bool
- func IsWindows8Point1OrGreater() bool
- func IsWindowsVersionOrGreater(majorVersion, minorVersion uint32, servicePackMajor uint16) bool
- func IsWindowsVistaOrGreater() bool
- func IsWindowsXpOrGreater() bool
- func LOBYTE(val uint16) uint8
- func LOWORD(val uint32) uint16
- func LockSetForegroundWindow(lockCode co.LSFW)
- func MAKELONG(lo, hi uint16) uint32
- func MAKEWORD(lo, hi uint8) uint16
- func MoveFile(existingFile, newFile string) error
- func MoveFileEx(existingFile, newFile string, flags co.MOVEFILE) error
- func MulDiv(number, numerator, denominator int32) int32
- func PeekMessage(msg *MSG, hWnd HWND, msgFilterMin, msgFilterMax co.WM, removeMsg co.PM) bool
- func PostQuitMessage(exitCode int32)
- func PostThreadMessage(idThread uint32, msg co.WM, wParam WPARAM, lParam LPARAM) error
- func QueryPerformanceCounter() int64
- func QueryPerformanceFrequency() int64
- func RegisterWindowMessage(message string) (co.WM, error)
- func RemoveDirectory(pathName string) error
- func ReplaceFile(replaced, replacement string, backup StrOpt, replaceFlags co.REPLACEFILE) error
- func ReplyMessage(result uintptr) bool
- func SHGetFileInfo(path string, fileAttributes co.FILE_ATTRIBUTE, sfi *SHFILEINFO, flags co.SHGFI)
- func SetConsoleOutputCP(codePage co.CP) error
- func SetConsoleTitle(title string) error
- func SetCurrentDirectory(pathName string) error
- func SetFileAttributes(fileName string, attrs co.FILE_ATTRIBUTE) error
- func SetProcessDPIAware()
- func SetProcessDefaultLayout(defaultLayout co.LAYOUT)
- func SetProcessDpiAwarenessContext(value co.DPI_AWARE_CTX) error
- func ShellNotifyIcon(message co.NIM, data *NOTIFYICONDATA) error
- func Sleep(milliseconds uint32)
- func SystemParametersInfo(uiAction co.SPI, uiParam uint32, pvParam unsafe.Pointer, fWinIni co.SPIF)
- func SystemTimeToFileTime(inSystemTime *SYSTEMTIME, outFileTime *FILETIME)
- func SystemTimeToTzSpecificLocalTime(timeZoneInfo *TIME_ZONE_INFORMATION, inUniversalTime *SYSTEMTIME, ...)
- func TaskDialogIndirect(taskConfig *TASKDIALOGCONFIG) co.ID
- func TranslateMessage(msg *MSG) bool
- func TzSpecificLocalTimeToSystemTime(timeZoneInfo *TIME_ZONE_INFORMATION, inLocalTime *SYSTEMTIME, ...)
- func UnregisterClass(className ClassName, hInst HINSTANCE) error
- func VerQueryValue(block []byte, subBlock string) (ptr unsafe.Pointer, sz uint32, exists bool)
- func VerSetConditionMask(conditionMask uint64, typeMask co.VER, condition co.VER_COND) uint64
- func VerifyVersionInfo(ovi *OSVERSIONINFOEX, typeMask co.VER, conditionMask uint64) (bool, error)
- type ACCEL
- type ATOM
- type BITMAP
- type BITMAPFILEHEADER
- type BITMAPINFO
- type BITMAPINFOHEADER
- type BLENDFUNCTION
- type CHOOSECOLOR
- type COLORREF
- type COMPAREITEMSTRUCT
- type CONSOLE_CURSOR_INFO
- type CONSOLE_FONT_INFO
- type CONSOLE_READCONSOLE_CONTROL
- type CONVCONTEXT
- type COORD
- type COPYDATASTRUCT
- type CREATESTRUCT
- type CWPRETSTRUCT
- type ClassName
- type CursorRes
- type DELETEITEMSTRUCT
- type DISPLAY_DEVICE
- type DLGITEMTEMPLATE
- type DLGTEMPLATE
- type DRAWITEMSTRUCT
- type DYNAMIC_TIME_ZONE_INFORMATION
- func (dtz *DYNAMIC_TIME_ZONE_INFORMATION) DaylightName() string
- func (dtz *DYNAMIC_TIME_ZONE_INFORMATION) DynamicDaylightTimeDisabled() bool
- func (dtz *DYNAMIC_TIME_ZONE_INFORMATION) SetDaylightName(val string)
- func (dtz *DYNAMIC_TIME_ZONE_INFORMATION) SetDynamicDaylightTimeDisabled(val bool)
- func (dtz *DYNAMIC_TIME_ZONE_INFORMATION) SetStandardName(val string)
- func (dtz *DYNAMIC_TIME_ZONE_INFORMATION) SetTimeZoneKeyName(val string)
- func (dtz *DYNAMIC_TIME_ZONE_INFORMATION) StandardName() string
- func (dtz *DYNAMIC_TIME_ZONE_INFORMATION) TimeZoneKeyName() string
- type EDITBALLOONTIP
- type FILETIME
- type File
- func (me *File) Close() error
- func (me *File) Hfile() HFILE
- func (me *File) Read(p []byte) (n int, err error)
- func (me *File) ReadAll() ([]byte, error)
- func (me *File) ReadByte() (byte, error)
- func (me *File) ReadLines() ([]string, error)
- func (me *File) Resize(numBytes int) error
- func (me *File) Seek(offset int64, whence int) (int64, error)
- func (me *File) Size() int
- func (me *File) Write(p []byte) (n int, err error)
- func (me *File) WriteByte(c byte) error
- func (me *File) WriteString(s string) (int, error)
- type FileMapped
- type GUID
- type GUITHREADINFO
- type HACCEL
- type HACCESSTOKEN
- type HANDLE
- type HBITMAP
- type HBRUSH
- type HCLIPBOARD
- func (HCLIPBOARD) CloseClipboard()
- func (HCLIPBOARD) CountClipboardFormats() int32
- func (HCLIPBOARD) EmptyClipboard()
- func (HCLIPBOARD) EnumClipboardFormats() []co.CF
- func (HCLIPBOARD) GetClipboardSequenceNumber() uint32
- func (HCLIPBOARD) IsClipboardFormatAvailable(format co.CF) bool
- func (HCLIPBOARD) SetClipboardData(format co.CF, hMem HGLOBAL)
- func (hClip HCLIPBOARD) WriteBitmap(hBmp HBITMAP)
- func (hClip HCLIPBOARD) WriteString(text string)
- type HCONV
- type HCURSOR
- type HDC
- func (hdc HDC) AbortDoc()
- func (hdc HDC) AbortPath()
- func (hdc HDC) AlphaBlend(originDest POINT, szDest SIZE, hdcSrc HDC, originSrc POINT, szSrc SIZE, ...)
- func (hdc HDC) AngleArc(center POINT, r uint32, startAngle, sweepAngle float32)
- func (hdc HDC) Arc(bound RECT, radialStart, radialEnd POINT)
- func (hdc HDC) ArcTo(bound RECT, radialStart, radialEnd POINT)
- func (hdc HDC) BeginPath()
- func (hdc HDC) BitBlt(destTopLeft POINT, sz SIZE, hdcSrc HDC, srcTopLeft POINT, rop co.ROP)
- func (hdc HDC) CancelDC()
- func (hdc HDC) Chord(bound RECT, radialStart, radialEnd POINT)
- func (hdc HDC) CloseFigure()
- func (hdc HDC) CreateCompatibleBitmap(cx, cy int32) HBITMAP
- func (hdc HDC) CreateCompatibleDC() HDC
- func (hdc HDC) CreateDIBSection(bmi *BITMAPINFO, usage co.DIB, hSection HFILEMAP, offset uint32) (HBITMAP, *byte)
- func (hdc HDC) DeleteDC()
- func (hdc HDC) DrawIcon(x, y int32, hIcon HICON)
- func (hdc HDC) DrawIconEx(pos POINT, hIcon HICON, size SIZE, frameIndex uint32, hbrFlickerFree HBRUSH, ...)
- func (hdc HDC) Ellipse(bound RECT)
- func (hdc HDC) EndPath()
- func (hdc HDC) EnumDisplayMonitors(rcClip *RECT, callback func(hMon HMONITOR, hdcMon HDC, rcMon *RECT) bool) error
- func (hdc HDC) FillPath()
- func (hdc HDC) FillRect(rc *RECT, hBrush HBRUSH)
- func (hdc HDC) FillRgn(hRgn HRGN, hBrush HBRUSH)
- func (hdc HDC) FlattenPath()
- func (hdc HDC) FrameRect(rc *RECT, hBrush HBRUSH)
- func (hdc HDC) FrameRgn(hRgn HRGN, hBrush HBRUSH, w, h int32)
- func (hdc HDC) GetCurrentPositionEx() POINT
- func (hdc HDC) GetDCBrushColor() COLORREF
- func (hdc HDC) GetDCPenColor() COLORREF
- func (hdc HDC) GetDIBits(hbm HBITMAP, firstScanLine, numScanLines int, bitmapDataBuffer []byte, ...) int
- func (hdc HDC) GetDeviceCaps(index co.GDC) int32
- func (hdc HDC) GetPolyFillMode() co.POLYF
- func (hdc HDC) GetTextExtentPoint32(text string) SIZE
- func (hdc HDC) GetTextFace() string
- func (hdc HDC) GetTextMetrics(tm *TEXTMETRIC)
- func (hdc HDC) GetViewportExtEx() SIZE
- func (hdc HDC) GetViewportOrgEx() POINT
- func (hdc HDC) GetWindowExtEx() SIZE
- func (hdc HDC) GetWindowOrgEx() POINT
- func (hdc HDC) HiMetricToPixel(himetricX, himetricY int32) (pixelX, pixelY int32)
- func (hdc HDC) IntersectClipRect(coords RECT) co.REGION
- func (hdc HDC) InvertRect(rc *RECT)
- func (hdc HDC) InvertRgn(hRgn HRGN)
- func (hdc HDC) LPtoDP(pts []POINT)
- func (hdc HDC) LineTo(x, y int32)
- func (hdc HDC) MaskBlt(destTopLeft POINT, sz SIZE, hdcSrc HDC, srcTopLeft POINT, hbmMask HBITMAP, ...)
- func (hdc HDC) MoveToEx(x, y int32, pt *POINT)
- func (hdc HDC) PaintDesktop()
- func (hdc HDC) PaintRgn(hRgn HRGN)
- func (hdc HDC) PathToRegion() HRGN
- func (hdc HDC) Pie(bound RECT, endPointRadial1, endPointRadial2 POINT)
- func (hdc HDC) PixelToHiMetric(pixelX, pixelY int32) (himetricX, himetricY int32)
- func (hdc HDC) PolyDraw(pts []POINT, usage []co.PT)
- func (hdc HDC) PolyPolygon(pts [][]POINT)
- func (hdc HDC) PolyPolyline(pts [][]POINT)
- func (hdc HDC) Polygon(pts []POINT)
- func (hdc HDC) Polyline(pts []POINT)
- func (hdc HDC) PolylineTo(pts []POINT)
- func (hdc HDC) PtVisible(x, y int32) bool
- func (hdc HDC) Rectangle(bound RECT)
- func (hdc HDC) RestoreDC(savedDC int32)
- func (hdc HDC) RoundRect(bound RECT, sz SIZE)
- func (hdc HDC) SaveDC() int32
- func (hdc HDC) SelectClipPath(mode co.RGN)
- func (hdc HDC) SelectClipRgn(hRgn HRGN) co.REGION
- func (hdc HDC) SelectObjectBitmap(hBmp HBITMAP) HBITMAP
- func (hdc HDC) SelectObjectBrush(hBrush HBRUSH) HBRUSH
- func (hdc HDC) SelectObjectFont(hFont HFONT) HFONT
- func (hdc HDC) SelectObjectPen(hPen HPEN) HPEN
- func (hdc HDC) SelectObjectRgn(hRgn HRGN) co.REGION
- func (hdc HDC) SetArcDirection(direction co.AD) co.AD
- func (hdc HDC) SetBkColor(color COLORREF) COLORREF
- func (hdc HDC) SetBkMode(mode co.BKMODE) co.BKMODE
- func (hdc HDC) SetPolyFillMode(mode co.POLYF) co.POLYF
- func (hdc HDC) SetStretchBltMode(mode co.STRETCH) co.STRETCH
- func (hdc HDC) SetTextAlign(align co.TA)
- func (hdc HDC) StretchBlt(destTopLeft POINT, destSz SIZE, hdcSrc HDC, srcTopLeft POINT, srcSz SIZE, ...)
- func (hdc HDC) StrokeAndFillPath()
- func (hdc HDC) StrokePath()
- func (hdc HDC) TextOut(x, y int32, text string)
- func (hdc HDC) TransparentBlt(destTopLeft POINT, destSz SIZE, hdcSrc HDC, srcTopLeft POINT, srcSz SIZE, ...)
- func (hdc HDC) WidenPath()
- type HDDE
- func (hDde HDDE) DdeAddData(hData HDDEDATA, data []byte, offset int) (HDDEDATA, error)
- func (hDde HDDE) DdeClientTransaction(data []byte, hConv HCONV, item StrOpt, fmt co.CF, xType co.XTYP, msTimeout int) (HDDEDATA, error)
- func (hDde HDDE) DdeCmpStringHandles(hsz1, hsz2 HSZ) int
- func (hDde HDDE) DdeConnect(serviceName, topic StrOpt, cc *CONVCONTEXT) (HCONV, error)
- func (hDde HDDE) DdeCreateStringHandle(text string) (HSZ, error)
- func (hDde HDDE) DdeDisconnect(hConv HCONV) error
- func (hDde HDDE) DdeFreeDataHandle(hData HDDEDATA) error
- func (hDde HDDE) DdeFreeStringHandle(hsz HSZ) error
- func (hDde HDDE) DdeGetData(hData HDDEDATA, offset int) ([]byte, error)
- func (hDde HDDE) DdeGetLastError() errco.DMLERR
- func (hDde HDDE) DdeKeepStringHandle(hsz HSZ) error
- func (hDde HDDE) DdeNameService(serviceName StrOpt, opts co.DDENS) error
- func (hDde HDDE) DdePostAdvise(topic, item StrOpt) error
- func (hDde HDDE) DdeQueryString(hsz HSZ) (string, error)
- func (hDde HDDE) DdeUninitialize() error
- type HDDEDATA
- type HDROP
- type HDWP
- type HELPINFO
- type HEVENT
- type HFILE
- func (hFile HFILE) CloseHandle() error
- func (hFile HFILE) CreateFileMapping(securityAttributes *SECURITY_ATTRIBUTES, protectPage co.PAGE, ...) (HFILEMAP, error)
- func (hFile HFILE) GetFileSizeEx() (uint64, error)
- func (hFile HFILE) LockFile(offset, numBytes uint64) error
- func (hFile HFILE) LockFileEx(flags co.LOCKFILE, numBytes uint64, overlapped *OVERLAPPED) error
- func (hFile HFILE) ReadFile(buffer []byte, overlapped *OVERLAPPED) (numBytesRead uint32, e error)
- func (hFile HFILE) SetEndOfFile() error
- func (hFile HFILE) SetFilePointerEx(distanceToMove int64, moveMethod co.FILE_FROM) (newPointerOffset int64, e error)
- func (hFile HFILE) UnlockFile(offset, numBytes uint64) error
- func (hFile HFILE) UnlockFileEx(numBytes uint64, overlapped *OVERLAPPED) error
- func (hFile HFILE) WriteFile(data []byte, overlapped *OVERLAPPED) (numBytesWritten uint32, e error)
- type HFILEMAP
- type HFILEMAPVIEW
- type HFIND
- type HFONT
- type HGDIOBJ
- type HGLOBAL
- func (hGlobal HGLOBAL) GlobalFlags() co.GMEM
- func (hGlobal HGLOBAL) GlobalFree() error
- func (hGlobal HGLOBAL) GlobalLock(numBytes int) []byte
- func (hGlobal HGLOBAL) GlobalReAlloc(numBytes int, uFlags co.GMEM) HGLOBAL
- func (hGlobal HGLOBAL) GlobalSize() int
- func (hGlobal HGLOBAL) GlobalUnlock() error
- type HHEAP
- func (hHeap HHEAP) HeapAlloc(flags co.HEAP_ALLOC, num_bytes uint) ([]byte, error)
- func (hHeap HHEAP) HeapCompact(flags co.HEAP_NS) (uint, error)
- func (hHeap HHEAP) HeapDestroy() error
- func (hHeap HHEAP) HeapFree(flags co.HEAP_NS, block []byte) error
- func (hHeap HHEAP) HeapReAlloc(flags co.HEAP_REALLOC, block []byte, num_bytes uint) ([]byte, error)
- func (hHeap HHEAP) HeapSetInformation(informationClass co.HEAP_CLASS, information *uint32, informationLength int) error
- func (hHeap HHEAP) HeapSize(flags co.HEAP_NS, block []byte) (uint, error)
- func (hHeap HHEAP) HeapValidate(flags co.HEAP_NS, block []byte) bool
- type HHOOK
- type HICON
- type HIMAGELIST
- func (hImg HIMAGELIST) AddIcon(hIcons ...HICON)
- func (hImg HIMAGELIST) AddIconFromShell(fileExtensions ...string)
- func (hImg HIMAGELIST) Destroy() error
- func (hImg HIMAGELIST) GetIconSize() SIZE
- func (hImg HIMAGELIST) GetImageCount() uint32
- func (hImg HIMAGELIST) ReplaceIcon(i int32, hIcon HICON) int32
- type HINSTANCE
- func (hInst HINSTANCE) CreateDialogParam(templateName ResId, hwndParent HWND, dialogFunc uintptr, dwInitParam LPARAM) HWND
- func (hInst HINSTANCE) DialogBoxIndirectParam(template *DLGTEMPLATE, hwndParent HWND, dialogFunc uintptr, dwInitParam LPARAM) uintptr
- func (hInst HINSTANCE) DialogBoxParam(templateName ResId, hwndParent HWND, dialogFunc uintptr, dwInitParam LPARAM) uintptr
- func (hInst HINSTANCE) DuplicateIcon(hIcon HICON) HICON
- func (hInst HINSTANCE) FindResource(name ResId, rsrcType RsrcType) (HRSRC, error)
- func (hInst HINSTANCE) FindResourceEx(name ResId, rsrcType RsrcType, language LANGID) (HRSRC, error)
- func (hInst HINSTANCE) FreeLibrary() error
- func (hInst HINSTANCE) GetClassInfoEx(className *uint16, destBuf *WNDCLASSEX) (ATOM, error)
- func (hInst HINSTANCE) GetModuleFileName() string
- func (hInst HINSTANCE) GetProcAddress(procName string) (uintptr, error)
- func (hInst HINSTANCE) LoadAccelerators(tableName ResId) HACCEL
- func (hInst HINSTANCE) LoadCursor(cursorName CursorRes) HCURSOR
- func (hInst HINSTANCE) LoadIcon(iconName IconRes) HICON
- func (hInst HINSTANCE) LoadImage(name ResId, imgType co.IMAGE, cx, cy int32, fuLoad co.LR) HGDIOBJ
- func (hInst HINSTANCE) LoadMenu(menuName ResId) HMENU
- func (hInst HINSTANCE) LoadResource(hResInfo HRSRC) (HRSRCMEM, error)
- func (hInst HINSTANCE) LockResource(hResInfo HRSRC, hResLoaded HRSRCMEM) ([]byte, error)
- func (hInst HINSTANCE) SizeofResource(hResInfo HRSRC) (int, error)
- type HKEY
- func (hKey HKEY) RegCloseKey() error
- func (hKey HKEY) RegDeleteKey(subKey string) error
- func (hKey HKEY) RegDeleteKeyEx(subKey string, samDesired co.KEY) error
- func (hKey HKEY) RegDeleteKeyValue(subKey, valueName string) error
- func (hKey HKEY) RegDeleteTree(subKey string) error
- func (hKey HKEY) RegEnumKeyEx() ([]string, error)
- func (hKey HKEY) RegEnumValue() ([]_HkeyValueEnum, error)
- func (hKey HKEY) RegFlushKey() error
- func (hKey HKEY) RegGetValue(subKey, value StrOpt) (RegVal, error)
- func (hKey HKEY) RegOpenKeyEx(subKey string, ulOptions co.REG_OPTION, samDesired co.KEY) (HKEY, error)
- func (hKey HKEY) RegQueryInfoKey() (_HkeyInfo, error)
- func (hKey HKEY) RegSetKeyValue(subKey, value StrOpt, data RegVal) error
- type HLOCAL
- type HMENU
- func (hMenu HMENU) AddItem(cmdId int, text string) HMENU
- func (hMenu HMENU) AddSeparator() HMENU
- func (hMenu HMENU) AddSubmenu(text string, hSubMenu HMENU)
- func (hMenu HMENU) AppendMenu(uFlags co.MF, uIDNewItem interface{}, lpNewItem interface{})
- func (hMenu HMENU) CheckMenuItem(item MenuItem, check bool) bool
- func (hMenu HMENU) CheckMenuRadioItem(firstItem, lastItem, checkedItem MenuItem)
- func (hMenu HMENU) DeleteMenu(item MenuItem)
- func (hMenu HMENU) DestroyMenu() error
- func (hMenu HMENU) EnableMenuItem(item MenuItem, enable bool) bool
- func (hMenu HMENU) GetMenuDefaultItem(gmdiFlags co.GMDI) (pos MenuItem)
- func (hMenu HMENU) GetMenuItemCount() uint32
- func (hMenu HMENU) GetMenuItemID(pos uint32) int32
- func (hMenu HMENU) GetMenuItemInfo(item MenuItem, mii *MENUITEMINFO)
- func (hMenu HMENU) GetSubMenu(pos uint32) (HMENU, bool)
- func (hMenu HMENU) InsertMenuItem(itemBefore MenuItem, mii *MENUITEMINFO)
- func (hMenu HMENU) RemoveMenu(item MenuItem)
- func (hMenu HMENU) SetMenuDefaultItem(item MenuItem)
- func (hMenu HMENU) SetMenuInfo(info *MENUINFO)
- func (hMenu HMENU) SetMenuItemBitmaps(item MenuItem, hBmpUnchecked, hBmpChecked HBITMAP)
- func (hMenu HMENU) SetMenuItemInfo(item MenuItem, info *MENUITEMINFO)
- func (hMenu HMENU) ShowAtPoint(pos POINT, hParent, hCoordsRelativeTo HWND)
- func (hMenu HMENU) TrackPopupMenu(flags co.TPM, x, y int32, hWnd HWND) int
- type HMONITOR
- type HPEN
- type HPIPE
- func (hPipe HPIPE) CloseHandle() error
- func (hPipe HPIPE) ConnectNamedPipe() error
- func (hPipe HPIPE) DisconnectNamedPipe() error
- func (hPipe HPIPE) GetNamedPipeInfo() (_HpipeInfo, error)
- func (hPipe HPIPE) PeekNamedPipe(buffer []byte) (_HpipePeek, error)
- func (hPipe HPIPE) ReadFile(buffer []byte, overlapped *OVERLAPPED) (numBytesRead uint32, e error)
- func (hPipe HPIPE) WriteFile(data []byte, overlapped *OVERLAPPED) (numBytesWritten uint32, e error)
- type HPROCESS
- func (hProcess HPROCESS) CloseHandle() error
- func (hProcess HPROCESS) EnumProcessModules() ([]HINSTANCE, error)
- func (hProcess HPROCESS) GetExitCodeProcess() (uint32, error)
- func (hProcess HPROCESS) GetModuleBaseName(hModule HINSTANCE) (string, error)
- func (hProcess HPROCESS) GetProcessId() (uint32, error)
- func (hProcess HPROCESS) GetProcessTimes() (creationTime, exitTime, kernelTime, userTime FILETIME, e error)
- func (hProcess HPROCESS) OpenProcessToken(desiredAccess co.TOKEN) (HACCESSTOKEN, error)
- func (hProcess HPROCESS) ReadProcessMemory(baseAddress uintptr, buffer []byte) (numBytesRead uint64, e error)
- func (hProcess HPROCESS) SetUserObjectInformation(index co.UOI, info unsafe.Pointer, infoLen uintptr) error
- func (hProcess HPROCESS) TerminateProcess(exitCode uint32) error
- func (hProcess HPROCESS) WaitForSingleObject(milliseconds NumInf) (co.WAIT, error)
- func (hProcess HPROCESS) WriteProcessMemory(baseAddress uintptr, data []byte) (numBytesWritten uint64, e error)
- type HPROCSNAPSHOT
- func (hProcSnap HPROCSNAPSHOT) CloseHandle() error
- func (hProcSnap HPROCSNAPSHOT) EnumModules(callback func(me32 *MODULEENTRY32) bool) error
- func (hProcSnap HPROCSNAPSHOT) EnumProcesses(callback func(me32 *PROCESSENTRY32) bool) error
- func (hProcSnap HPROCSNAPSHOT) EnumThreads(callback func(me32 *THREADENTRY32) bool) error
- func (hProcSnap HPROCSNAPSHOT) Module32First(buf *MODULEENTRY32) (bool, error)
- func (hProcSnap HPROCSNAPSHOT) Module32Next(buf *MODULEENTRY32) (bool, error)
- func (hProcSnap HPROCSNAPSHOT) Process32First(buf *PROCESSENTRY32) (bool, error)
- func (hProcSnap HPROCSNAPSHOT) Process32Next(buf *PROCESSENTRY32) (bool, error)
- func (hProcSnap HPROCSNAPSHOT) Thread32First(buf *THREADENTRY32) (bool, error)
- func (hProcSnap HPROCSNAPSHOT) Thread32Next(buf *THREADENTRY32) (bool, error)
- type HRGN
- type HRSRC
- type HRSRCMEM
- type HSTDHANDLE
- func (hStd HSTDHANDLE) GetCurrentConsoleFont(maximumWindow bool, info *CONSOLE_FONT_INFO) error
- func (hStd HSTDHANDLE) ReadConsole(maxChars int, inputControl *CONSOLE_READCONSOLE_CONTROL) (string, error)
- func (hStd HSTDHANDLE) SetConsoleCursorInfo(info *CONSOLE_CURSOR_INFO) error
- func (hStd HSTDHANDLE) SetConsoleCursorPosition(x, y int) error
- func (hStd HSTDHANDLE) SetConsoleDisplayMode(mode co.CONSOLE) (SIZE, error)
- func (hStd HSTDHANDLE) SetConsoleMode(mode co.ENABLE) error
- func (hStd HSTDHANDLE) SetConsoleScreenBufferSize(x, y int) error
- func (hStd HSTDHANDLE) WriteConsole(text string) (numCharsWritten int, e error)
- type HSZ
- type HTASKMEM
- type HTHEME
- func (hTheme HTHEME) CloseThemeData()
- func (hTheme HTHEME) DrawThemeBackground(hdc HDC, partStateId co.VS, rc *RECT, clipRc *RECT)
- func (hTheme HTHEME) GetThemeColor(partStateId co.VS, propId co.TMT) COLORREF
- func (hTheme HTHEME) GetThemeInt(partStateId co.VS, propId co.TMT) int32
- func (hTheme HTHEME) GetThemeMetric(hdc HDC, partStateId co.VS, propId co.TMT) int32
- func (hTheme HTHEME) GetThemePosition(partStateId co.VS, propId co.TMT) POINT
- func (hTheme HTHEME) GetThemePropertyOrigin(partStateId co.VS, propId co.TMT) co.PROPERTYORIGIN
- func (hTheme HTHEME) GetThemeRect(partStateId co.VS, propId co.TMT) RECT
- func (hTheme HTHEME) GetThemeString(partStateId co.VS, propId co.TMT) string
- func (hTheme HTHEME) GetThemeSysColorBrush(colorId co.TMT) HBRUSH
- func (hTheme HTHEME) GetThemeSysFont(fontId co.TMT, lf *LOGFONT)
- func (hTheme HTHEME) GetThemeTextMetrics(hdc HDC, partStateId co.VS, tm *TEXTMETRIC)
- func (hTheme HTHEME) IsThemeBackgroundPartiallyTransparent(partStateId co.VS) bool
- func (hTheme HTHEME) IsThemePartDefined(partStateId co.VS) bool
- type HTHREAD
- func (hThread HTHREAD) CloseHandle() error
- func (hThread HTHREAD) GetExitCodeThread() (uint32, error)
- func (hThread HTHREAD) GetProcessIdOfThread() (uint32, error)
- func (hThread HTHREAD) GetThreadId() (uint32, error)
- func (hThread HTHREAD) GetThreadTimes() (creationTime, exitTime, kernelTime, userTime FILETIME, e error)
- func (hThread HTHREAD) ResumeThread() (uint32, error)
- func (hThread HTHREAD) SuspendThread() (uint32, error)
- func (hThread HTHREAD) TerminateThread(exitCode uint32) error
- func (hThread HTHREAD) WaitForSingleObject(milliseconds NumInf) (co.WAIT, error)
- type HTREEITEM
- type HWND
- func CreateWindowEx(exStyle co.WS_EX, className ClassName, title StrOpt, style co.WS, ...) HWND
- func FindWindow(className ClassName, title StrOpt) (HWND, bool)
- func GetClipboardOwner() HWND
- func GetConsoleWindow() HWND
- func GetDesktopWindow() HWND
- func GetFocus() HWND
- func GetForegroundWindow() HWND
- func GetOpenClipboardWindow() HWND
- func GetShellWindow() HWND
- func (hWnd HWND) BeginPaint(ps *PAINTSTRUCT) HDC
- func (hWnd HWND) ChildWindowFromPoint(pt POINT) (HWND, bool)
- func (hWnd HWND) ChildWindowFromPointEx(pt POINT, flags co.CWP) (HWND, bool)
- func (hWnd HWND) ClientToScreenPt(pt *POINT)
- func (hWnd HWND) ClientToScreenRc(rc *RECT)
- func (hWnd HWND) DefDlgProc(msg co.WM, wParam WPARAM, lParam LPARAM) uintptr
- func (hWnd HWND) DefSubclassProc(msg co.WM, wParam WPARAM, lParam LPARAM) uintptr
- func (hWnd HWND) DefWindowProc(msg co.WM, wParam WPARAM, lParam LPARAM) uintptr
- func (hWnd HWND) DestroyWindow() error
- func (hWnd HWND) DragAcceptFiles(accept bool)
- func (hWnd HWND) DrawMenuBar()
- func (hWnd HWND) DwmExtendFrameIntoClientArea(marginsInset *MARGINS)
- func (hWnd HWND) DwmGetWindowAttribute(attr co.DWMWA_GET) interface{}
- func (hWnd HWND) DwmInvalidateIconicBitmaps()
- func (hWnd HWND) DwmSetIconicLivePreviewBitmap(hBmp HBITMAP, ptClient POINT, sitFlags co.DWM_SIT)
- func (hWnd HWND) DwmSetIconicThumbnail(hBmp HBITMAP, sitFlags co.DWM_SIT)
- func (hWnd HWND) DwmSetWindowAttribute(attr co.DWMWA_SET, val interface{})
- func (hWnd HWND) EnableWindow(enable bool) bool
- func (hWnd HWND) EndDialog(result uintptr) error
- func (hWnd HWND) EndPaint(ps *PAINTSTRUCT)
- func (hWnd HWND) EnumChildWindows(callback func(hChild HWND) bool)
- func (hWnd HWND) GetAncestor(gaFlags co.GA) HWND
- func (hWnd HWND) GetClassLongPtr(index co.GCL) uint32
- func (hWnd HWND) GetClassName() string
- func (hWnd HWND) GetClientRect() RECT
- func (hWnd HWND) GetDC() HDC
- func (hWnd HWND) GetDlgCtrlID() int32
- func (hWnd HWND) GetDlgItem(dlgId int32) HWND
- func (hWnd HWND) GetLastActivePopup() HWND
- func (hWnd HWND) GetMenu() HMENU
- func (hWnd HWND) GetNextDlgGroupItem(hChild HWND, isPrevious bool) HWND
- func (hWnd HWND) GetNextDlgTabItem(hChild HWND, isPrevious bool) HWND
- func (hWnd HWND) GetParent() HWND
- func (hWnd HWND) GetScrollInfo(bar co.SB_TYPE, si *SCROLLINFO)
- func (hWnd HWND) GetSystemMenu(revert bool) HMENU
- func (hWnd HWND) GetTopWindow() HWND
- func (hWnd HWND) GetWindow(cmd co.GW) HWND
- func (hWnd HWND) GetWindowDC() HDC
- func (hWnd HWND) GetWindowLongPtr(index co.GWLP) uintptr
- func (hWnd HWND) GetWindowRect() RECT
- func (hWnd HWND) GetWindowText() string
- func (hWnd HWND) GetWindowTextLength() int32
- func (hWnd HWND) GetWindowThreadProcessId() (threadId, processId uint32)
- func (hWnd HWND) HideCaret()
- func (hWnd HWND) HiliteMenuItem(hMenu HMENU, item MenuItem, hilite bool) bool
- func (hWnd HWND) Hinstance() HINSTANCE
- func (hWnd HWND) InvalidateRect(rc *RECT, erase bool)
- func (hWnd HWND) IsChild(hChild HWND) bool
- func (hWnd HWND) IsDialogMessage(msg *MSG) bool
- func (hWnd HWND) IsDlgButtonChecked(idButton int32) co.BST
- func (hWnd HWND) IsIconic() bool
- func (hWnd HWND) IsThemeDialogTextureEnabled() bool
- func (hWnd HWND) IsTopLevelWindow() bool
- func (hWnd HWND) IsWindow() bool
- func (hWnd HWND) IsWindowEnabled() bool
- func (hWnd HWND) IsWindowVisible() bool
- func (hWnd HWND) IsZoomed() bool
- func (hWnd HWND) KillTimer(timerId uintptr)
- func (hWnd HWND) LockWindowUpdate() error
- func (hWnd HWND) LogicalToPhysicalPoint(pt *POINT)
- func (hWnd HWND) MapDialogRect(rc *RECT)
- func (hWnd HWND) MapWindowPoints(hWndTo HWND, points []POINT) (int, int)
- func (hWnd HWND) MenuItemFromPoint(hMenu HMENU, pt POINT) (int, bool)
- func (hWnd HWND) MessageBox(text, caption string, uType co.MB) co.ID
- func (hWnd HWND) MonitorFromWindow(flags co.MONITOR) HMONITOR
- func (hWnd HWND) MoveWindow(x, y, width, height int32, repaint bool)
- func (hWnd HWND) OpenClipboard() HCLIPBOARD
- func (hWnd HWND) OpenThemeData(classNames string) (HTHEME, error)
- func (hWnd HWND) PhysicalToLogicalPoint(pt *POINT)
- func (hWnd HWND) PostMessage(msg co.WM, wParam WPARAM, lParam LPARAM)
- func (hWnd HWND) RealChildWindowFromPoint(parentClientCoords POINT) (HWND, bool)
- func (hWnd HWND) RealGetWindowClass() string
- func (hWnd HWND) ReleaseDC(hdc HDC)
- func (hWnd HWND) RemoveWindowSubclass(subclassProc uintptr, idSubclass uint32)
- func (hWnd HWND) ScreenToClientPt(pt *POINT)
- func (hWnd HWND) ScreenToClientRc(rc *RECT)
- func (hWnd HWND) SendMessage(msg co.WM, wParam WPARAM, lParam LPARAM) uintptr
- func (hWnd HWND) SendMessageTimeout(msg co.WM, wParam WPARAM, lParam LPARAM, flags co.SMTO, msTimeout int) (uintptr, error)
- func (hWnd HWND) SetFocus() (HWND, error)
- func (hWnd HWND) SetForegroundWindow() bool
- func (hWnd HWND) SetLayeredWindowAttributes(transparencyColorKey COLORREF, alpha uint8, flags co.LWA)
- func (hWnd HWND) SetMenu(hMenu HMENU)
- func (hWnd HWND) SetParent(hwndNewParent HWND) HWND
- func (hWnd HWND) SetScrollInfo(bar co.SB_TYPE, si *SCROLLINFO, redraw bool) int32
- func (hWnd HWND) SetScrollPos(bar co.SB_TYPE, pos int32, redraw bool) int32
- func (hWnd HWND) SetScrollRange(bar co.SB_TYPE, minPos, maxPos int32, redraw bool) bool
- func (hWnd HWND) SetTimer(msElapse int, timerId uintptr) uintptr
- func (hWnd HWND) SetTimerCallback(msElapse int, timerFunc func(timerId uintptr)) uintptr
- func (hWnd HWND) SetWindowDisplayAffinity(affinity co.WDA)
- func (hWnd HWND) SetWindowLongPtr(index co.GWLP, newLong uintptr) uintptr
- func (hWnd HWND) SetWindowPos(hwndInsertAfter HWND, x, y, cx, cy int32, flags co.SWP)
- func (hWnd HWND) SetWindowRgn(hRgn HRGN, redraw bool)
- func (hWnd HWND) SetWindowSubclass(subclassProc uintptr, idSubclass uint32, refData unsafe.Pointer)
- func (hWnd HWND) SetWindowText(text string)
- func (hWnd HWND) ShowCaret()
- func (hWnd HWND) ShowWindow(cmdShow co.SW) bool
- func (hWnd HWND) TaskDialog(hInstance HINSTANCE, windowTitle, mainInstruction, content StrOpt, ...) co.ID
- func (hWnd HWND) TranslateAccelerator(hAccel HACCEL, msg *MSG) error
- func (hWnd HWND) UpdateWindow() bool
- type ICONINFO
- type ICONINFOEX
- type IMAGELISTDRAWPARAMS
- type INITCOMMONCONTROLSEX
- type IconRes
- type Ini
- type IniKey
- type IniSection
- type LANGID
- type LCID
- type LITEM
- type LOGBRUSH
- type LOGFONT
- type LOGPEN
- type LPARAM
- type LVCOLUMN
- type LVFINDINFO
- type LVHITTESTINFO
- type LVITEM
- type LVITEMINDEX
- type MANAGEDAPPLICATION
- func (ma *MANAGEDAPPLICATION) BInstalled() bool
- func (ma *MANAGEDAPPLICATION) PszComments() string
- func (ma *MANAGEDAPPLICATION) PszCompany() string
- func (ma *MANAGEDAPPLICATION) PszContact() string
- func (ma *MANAGEDAPPLICATION) PszOwner() string
- func (ma *MANAGEDAPPLICATION) PszPackageName() string
- func (ma *MANAGEDAPPLICATION) PszPolicyName() string
- func (ma *MANAGEDAPPLICATION) PszPublisher() string
- func (ma *MANAGEDAPPLICATION) PszSupportUrl() string
- type MARGINS
- type MDINEXTMENU
- type MENUGETOBJECTINFO
- type MENUINFO
- type MENUITEMINFO
- type MINMAXINFO
- type MODULEENTRY32
- type MONITORINFOEX
- type MSG
- type MenuItem
- type NCCALCSIZE_PARAMS
- type NMBCDROPDOWN
- type NMBCHOTITEM
- type NMCHAR
- type NMCUSTOMDRAW
- type NMDATETIMECHANGE
- type NMDATETIMEFORMAT
- type NMDATETIMEFORMATQUERY
- type NMDATETIMESTRING
- type NMDATETIMEWMKEYDOWN
- type NMDAYSTATE
- type NMHDR
- type NMITEMACTIVATE
- type NMKEY
- func (nmk *NMKEY) ContextCode() bool
- func (nmk *NMKEY) IsExtendedKey() bool
- func (nmk *NMKEY) IsKeyDownBeforeSend() bool
- func (nmk *NMKEY) NVKey() co.VK
- func (nmk *NMKEY) ScanCode() uint8
- func (nmk *NMKEY) SetContextCode(val bool)
- func (nmk *NMKEY) SetIsExtendedKey(val bool)
- func (nmk *NMKEY) SetIsKeyDownBeforeSend(val bool)
- func (nmk *NMKEY) SetNVKey(val co.VK)
- func (nmk *NMKEY) SetScanCode(val uint8)
- func (nmk *NMKEY) SetTransitionState(val bool)
- func (nmk *NMKEY) TransitionState() bool
- type NMLINK
- type NMLISTVIEW
- type NMLVCACHEHINT
- type NMLVCUSTOMDRAW
- type NMLVDISPINFO
- type NMLVEMPTYMARKUP
- type NMLVFINDITEM
- type NMLVGETINFOTIP
- type NMLVKEYDOWN
- type NMLVLINK
- type NMLVODSTATECHANGE
- type NMLVSCROLL
- type NMMOUSE
- type NMOBJECTNOTIFY
- type NMSELCHANGE
- type NMTBCUSTOMDRAW
- type NMTBDISPINFO
- type NMTBDUPACCELERATOR
- type NMTBGETINFOTIP
- type NMTBHOTITEM
- type NMTBRESTORE
- type NMTBSAVE
- type NMTBWRAPACCELERATOR
- type NMTBWRAPHOTITEM
- type NMTOOLBAR
- type NMTOOLTIPSCREATED
- type NMTRBTHUMBPOSCHANGING
- type NMTREEVIEW
- type NMTVASYNCDRAW
- type NMTVCUSTOMDRAW
- type NMTVDISPINFO
- type NMTVGETINFOTIP
- type NMTVITEMCHANGE
- type NMTVKEYDOWN
- type NMVIEWCHANGE
- type NONCLIENTMETRICS
- type NOTIFYICONDATA
- func (nid *NOTIFYICONDATA) SetCbSize()
- func (nid *NOTIFYICONDATA) SetSzInfo(val string)
- func (nid *NOTIFYICONDATA) SetSzInfoTitle(val string)
- func (nid *NOTIFYICONDATA) SetSzTip(val string)
- func (nid *NOTIFYICONDATA) SzInfo() string
- func (nid *NOTIFYICONDATA) SzInfoTitle() string
- func (nid *NOTIFYICONDATA) SzTip() string
- type NumInf
- type OSVERSIONINFOEX
- type OVERLAPPED
- type PAINTSTRUCT
- type POINT
- type POWERBROADCAST_SETTING
- type PROCESSENTRY32
- type PROCESS_INFORMATION
- type RECT
- type RGBQUAD
- type RegVal
- type ResId
- type ResourceInfo
- type ResourceInfoBlock
- func (me *ResourceInfoBlock) CodePage() co.CP
- func (me *ResourceInfoBlock) Comments() (string, bool)
- func (me *ResourceInfoBlock) CompanyName() (string, bool)
- func (me *ResourceInfoBlock) FileDescription() (string, bool)
- func (me *ResourceInfoBlock) FileVersion() (string, bool)
- func (me *ResourceInfoBlock) InternalName() (string, bool)
- func (me *ResourceInfoBlock) LangId() LANGID
- func (me *ResourceInfoBlock) LegalCopyright() (string, bool)
- func (me *ResourceInfoBlock) LegalTrademarks() (string, bool)
- func (me *ResourceInfoBlock) OriginalFilename() (string, bool)
- func (me *ResourceInfoBlock) PrivateBuild() (string, bool)
- func (me *ResourceInfoBlock) ProductName() (string, bool)
- func (me *ResourceInfoBlock) ProductVersion() (string, bool)
- func (me *ResourceInfoBlock) SpecialBuild() (string, bool)
- type RsrcType
- type SCROLLINFO
- type SECURITY_ATTRIBUTES
- type SECURITY_QUALITY_OF_SERVICE
- func (qs *SECURITY_QUALITY_OF_SERVICE) ContextTrackingMode() bool
- func (qs *SECURITY_QUALITY_OF_SERVICE) EffectiveOnly() bool
- func (qs *SECURITY_QUALITY_OF_SERVICE) SetContextTrackingMode(val bool)
- func (qs *SECURITY_QUALITY_OF_SERVICE) SetEffectiveOnly(val bool)
- func (qs *SECURITY_QUALITY_OF_SERVICE) SetLength()
- type SHFILEINFO
- type SIZE
- type STARTUPINFO
- type STYLESTRUCT_WS
- type STYLESTRUCT_WSEX
- type SYSTEMTIME
- type SYSTEM_INFO
- type StrOpt
- type TASKDIALOGCONFIG
- type TASKDIALOG_BUTTON
- type TBBUTTON
- type TBBUTTONINFO
- type TEXTMETRIC
- type THREADENTRY32
- type TIME_ZONE_INFORMATION
- type TITLEBARINFOEX
- type TOKEN_ELEVATION
- type TOKEN_LINKED_TOKEN
- type TOKEN_MANDATORY_POLICY
- type TVINSERTSTRUCT
- type TVITEM
- type TVITEMEX
- type TdcIcon
- type VS_FIXEDFILEINFO
- func (ffi *VS_FIXEDFILEINFO) FileDate() uint64
- func (ffi *VS_FIXEDFILEINFO) FileVersion() (major, minor, patch, build uint16)
- func (ffi *VS_FIXEDFILEINFO) ProductVersion() (major, minor, patch, build uint16)
- func (ffi *VS_FIXEDFILEINFO) SetFileDate(val uint64)
- func (ffi *VS_FIXEDFILEINFO) SetFileVersion(major, minor, patch, build uint16)
- func (ffi *VS_FIXEDFILEINFO) SetProductVersion(major, minor, patch, build uint16)
- type WIN32_FIND_DATA
- type WINDOWPOS
- type WNDCLASSEX
- type WPARAM
Constants ¶
This section is empty.
Variables ¶
var Path _PathT
File and folder path utilities.
var Str _StrT
String utilities, including wide char UTF-16 string conversion functions.
Functions ¶
func AdjustWindowRectEx ¶
AdjustWindowRectEx function.
func AllocConsole ¶
func AllocConsole() error
AllocConsole function.
⚠️ You must defer FreeConsole().
func AllowSetForegroundWindow ¶
func AllowSetForegroundWindow(processId uint32)
AllowSetForegroundWindow function.
func BroadcastSystemMessage ¶
func BroadcastSystemMessage( flags co.BSF, recipients co.BSM, msg co.WM, wParam WPARAM, lParam LPARAM) (broadcastSuccessful bool, receivers co.BSM, e error)
BroadcastSystemMessage function.
func CreateDirectory ¶
func CreateDirectory( pathName string, securityAttributes *SECURITY_ATTRIBUTES) error
CreateDirectory function.
func CreateProcess ¶
func CreateProcess( applicationName, commandLine StrOpt, processAttributes, threadAttributes *SECURITY_ATTRIBUTES, inheritHandles bool, creationFlags co.CREATE, environment []struct { name string val string }, currentDirectory StrOpt, startupInfo *STARTUPINFO, processInformation *PROCESS_INFORMATION)
CreateProcess function.
⚠️ You must defer HPROCESS.CloseHandle() and HTHREAD.CloseHandle() on HProcess and HThread members of PROCESS_INFORMATION.
func DwmIsCompositionEnabled ¶
func DwmIsCompositionEnabled() bool
DwmIsCompositionEnabled function.
func EnumDisplayDevices ¶
func EnumDisplayDevices( device StrOpt, flags co.EDD, callback func(devNum int, info *DISPLAY_DEVICE) bool)
EnumDisplayDevices function.
To continue enumeration, the callback function must return true; to stop enumeration, it must return false.
func EnumWindows ¶
EnumWindows function.
To continue enumeration, the callback function must return true; to stop enumeration, it must return false.
func ExpandEnvironmentStrings ¶
ExpandEnvironmentStrings function.
func FileTimeToSystemTime ¶
func FileTimeToSystemTime(inFileTime *FILETIME, outSystemTime *SYSTEMTIME)
FileTimeToSystemTime function.
func GetDialogBaseUnits ¶
func GetDialogBaseUnits() (horz, vert uint16)
GetDialogBaseUnits function.
func GetDynamicTimeZoneInformation ¶
func GetDynamicTimeZoneInformation( timeZoneInfo *DYNAMIC_TIME_ZONE_INFORMATION) co.TIME_ZONE_ID
GetDynamicTimeZoneInformation function.
func GetEnvironmentStrings ¶
GetEnvironmentStrings function.
You don't need to call FreeEnvironmentStrings, it's automatically called after the data retrieval.
func GetFileAttributes ¶
func GetFileAttributes(fileName string) (co.FILE_ATTRIBUTE, error)
GetFileAttributes function.
func GetFileVersionInfo ¶
GetFileVersionInfo function.
Automatically allocs the buffer with GetFileVersionInfoSize().
func GetFileVersionInfoSize ¶
GetFileVersionInfo function.
func GetGUIThreadInfo ¶
func GetGUIThreadInfo(thread_id uint32, info *GUITHREADINFO)
GetGUIThreadInfo function.
func GetLocalTime ¶
func GetLocalTime(systemTime *SYSTEMTIME)
GetLocalTime function.
Example ¶
var st win.SYSTEMTIME win.GetLocalTime(&st)
func GetMessage ¶
GetMessage function.
func GetProcessDefaultLayout ¶
GetProcessDefaultLayout function.
func GetSystemMetricsForDpi ¶
GetSystemMetricsForDpi function.
Available in Windows 10, version 1607.
func GetSystemTime ¶
func GetSystemTime(systemTime *SYSTEMTIME)
GetSystemTime function.
Note that the returned value is in UTC format, the local time can be retrieved with GetLocalTime.
Example ¶
var st win.SYSTEMTIME win.GetSystemTime(&st)
func GetTimeZoneInformation ¶
func GetTimeZoneInformation( timeZoneInfo *TIME_ZONE_INFORMATION) co.TIME_ZONE_ID
GetTimeZoneInformation function.
func GetTimeZoneInformationForYear ¶
func GetTimeZoneInformationForYear( wYear uint16, dtzi *DYNAMIC_TIME_ZONE_INFORMATION, tzi *TIME_ZONE_INFORMATION)
GetTimeZoneInformationForYear function.
func GetVolumeInformation ¶
GetVolumeInformation function.
Example ¶
nfo, err := win.GetVolumeInformation(win.StrOptSome("C:\\")) if err != nil { panic(err) } fmt.Printf("Name: %s\n", nfo.Name) fmt.Printf("File system name: %s\n", nfo.FileSystemName) fmt.Printf("Max component length: %d\n", nfo.MaxComponentLength) fmt.Printf("Serial number: 0x08%x\n", nfo.SerialNumber)
func InitCommonControlsEx ¶
func InitCommonControlsEx(icce *INITCOMMONCONTROLSEX) bool
InitCommonControlsEx function.
func IsWindows8Point1OrGreater ¶
func IsWindows8Point1OrGreater() bool
IsWindows8Point1OrGreater function.
func IsWindowsVersionOrGreater ¶
IsWindowsVersionOrGreater function.
func IsWindowsVistaOrGreater ¶
func IsWindowsVistaOrGreater() bool
IsWindowsVistaOrGreater function.
func LockSetForegroundWindow ¶
LockSetForegroundWindow function.
func MoveFileEx ¶
MoveFileEx function.
func MulDiv ¶
MulDiv function.
Note: You'll achieve a much better performance with ordinary Go code:
res := int32((int64(n) * int64(num)) / int64(den))
func PeekMessage ¶
PeekMessage function.
func PostThreadMessage ¶
PostThreadMessage function.
func QueryPerformanceCounter ¶
func QueryPerformanceCounter() int64
QueryPerformanceCounter function.
func QueryPerformanceFrequency ¶
func QueryPerformanceFrequency() int64
QueryPerformanceFrequency function.
func RegisterWindowMessage ¶
RegisterWindowMessage function.
func ReplaceFile ¶
func ReplaceFile( replaced, replacement string, backup StrOpt, replaceFlags co.REPLACEFILE) error
ReplaceFile function.
func SHGetFileInfo ¶
func SHGetFileInfo( path string, fileAttributes co.FILE_ATTRIBUTE, sfi *SHFILEINFO, flags co.SHGFI)
SHGetFileInfo function.
Depends of CoInitializeEx().
func SetConsoleOutputCP ¶
SetConsoleOutputCP function.
func SetCurrentDirectory ¶
SetCurrentDirectory function.
func SetFileAttributes ¶
func SetFileAttributes(fileName string, attrs co.FILE_ATTRIBUTE) error
SetFileAttributes function.
func SetProcessDPIAware ¶
func SetProcessDPIAware()
SetProcessDPIAware function.
Available in Windows Vista.
func SetProcessDefaultLayout ¶
SetProcessDefaultLayout function.
func SetProcessDpiAwarenessContext ¶
func SetProcessDpiAwarenessContext(value co.DPI_AWARE_CTX) error
SetProcessDpiAwarenessContext function.
Available in Windows 10, version 1703.
func ShellNotifyIcon ¶
func ShellNotifyIcon(message co.NIM, data *NOTIFYICONDATA) error
ShellNotifyIcon function.
func SystemParametersInfo ¶
func SystemParametersInfo( uiAction co.SPI, uiParam uint32, pvParam unsafe.Pointer, fWinIni co.SPIF)
SystemParametersInfo function.
func SystemTimeToFileTime ¶
func SystemTimeToFileTime(inSystemTime *SYSTEMTIME, outFileTime *FILETIME)
SystemTimeToFileTime function.
func SystemTimeToTzSpecificLocalTime ¶
func SystemTimeToTzSpecificLocalTime( timeZoneInfo *TIME_ZONE_INFORMATION, inUniversalTime *SYSTEMTIME, outLocalTime *SYSTEMTIME)
SystemTimeToTzSpecificLocalTime function.
func TaskDialogIndirect ¶
func TaskDialogIndirect(taskConfig *TASKDIALOGCONFIG) co.ID
TaskDialogIndirect function.
Prefer using ui.TaskDlg wrappers, which deals with the most commons cases of this function in a safer, easier way.
func TzSpecificLocalTimeToSystemTime ¶
func TzSpecificLocalTimeToSystemTime( timeZoneInfo *TIME_ZONE_INFORMATION, inLocalTime *SYSTEMTIME, outUniversalTime *SYSTEMTIME)
TzSpecificLocalTimeToSystemTime function.
func UnregisterClass ¶
UnregisterClass function.
func VerQueryValue ¶
VerQueryValue function.
Returns a pointer to the block and its size, which varies according to the data type. Returns false if the block doesn't exist.
This function is rather tricky. Prefer using ResourceInfo.
func VerSetConditionMask ¶
VerSetConditionMask function.
func VerifyVersionInfo ¶
VerifyVersionInfo function.
Types ¶
type ACCEL ¶
type ACCEL struct { FVirt co.ACCELF // Modifiers. Key co.VK // Virtual key code. Cmd uint16 // LOWORD(wParam) value. }
ACCEL struct.
type ATOM ¶
type ATOM uint16
An atom.
func RegisterClassEx ¶
func RegisterClassEx(wcx *WNDCLASSEX) (ATOM, error)
RegisterClassEx function.
func (ATOM) GlobalGetAtomName ¶
GlobalGetAtomName function.
type BITMAP ¶
type BITMAP struct { BmWidth int32 BmHeight int32 BmWidthBytes int32 BmPlanes uint16 BmBitsPixel uint16 BmBits *byte // contains filtered or unexported fields }
BITMAP struct.
func (*BITMAP) CalcBitmapSize ¶
type BITMAPFILEHEADER ¶
type BITMAPFILEHEADER struct {
// contains filtered or unexported fields
}
BITMAPFILEHEADER struct.
⚠️ You must call SetBfType() to initialize the struct.
Example ¶
var bfh BITMAPFILEHEADER bfh.SetBfType()
func (*BITMAPFILEHEADER) BfOffBits ¶
func (bfh *BITMAPFILEHEADER) BfOffBits() uint32
func (*BITMAPFILEHEADER) BfSize ¶
func (bfh *BITMAPFILEHEADER) BfSize() uint32
func (*BITMAPFILEHEADER) Serialize ¶
func (bfh *BITMAPFILEHEADER) Serialize() []byte
func (*BITMAPFILEHEADER) SetBfOffBits ¶
func (bfh *BITMAPFILEHEADER) SetBfOffBits(val uint32)
func (*BITMAPFILEHEADER) SetBfSize ¶
func (bfh *BITMAPFILEHEADER) SetBfSize(val uint32)
func (*BITMAPFILEHEADER) SetBfType ¶
func (bfh *BITMAPFILEHEADER) SetBfType()
type BITMAPINFO ¶
type BITMAPINFO struct { BmiHeader BITMAPINFOHEADER BmiColors [1]RGBQUAD }
BITMAPINFO struct.
⚠️ You must call BmiHeader.SetBiSize() to initialize the struct.
type BITMAPINFOHEADER ¶
type BITMAPINFOHEADER struct { BiWidth int32 BiHeight int32 BiPlanes uint16 BiBitCount uint16 BiCompression co.BI BiSizeImage uint32 BiXPelsPerMeter int32 BiYPelsPerMeter int32 BiClrUsed uint32 BiClrImportant uint32 // contains filtered or unexported fields }
BITMAPINFOHEADER struct.
⚠️ You must call SetBiSize() to initialize the struct.
Example ¶
bih := &BITMAPINFOHEADER{} bih.SetBiSize()
func (*BITMAPINFOHEADER) Serialize ¶
func (bih *BITMAPINFOHEADER) Serialize() []byte
func (*BITMAPINFOHEADER) SetBiSize ¶
func (bih *BITMAPINFOHEADER) SetBiSize()
type BLENDFUNCTION ¶
type BLENDFUNCTION struct { BlendOp byte BlendFlags byte SourceConstantAlpha byte AlphaFormat byte }
BLENDFUNCTION struct.
type CHOOSECOLOR ¶
type CHOOSECOLOR struct { HwndOwner HWND HInstance HWND RgbResult COLORREF LpCustColors *COLORREF // Slice must have 16 values. Flags co.CC LCustData uintptr // LPARAM LpfnHook uintptr // LPCCHOOKPROC LpTemplateName *uint16 // contains filtered or unexported fields }
CHOOSECOLOR struct.
⚠️ You must call SetLStructSize() to initialize the struct.
Example ¶
cc := &CHOOSECOLOR{} cc.SetLStructSize()
func (*CHOOSECOLOR) SetLStructSize ¶
func (cc *CHOOSECOLOR) SetLStructSize()
type COLORREF ¶
type COLORREF uint32
COLORREF struct.
Specifies an RGB color.
func DwmGetColorizationColor ¶
DwmGetColorizationColor function.
type COMPAREITEMSTRUCT ¶
type COMPAREITEMSTRUCT struct { CtlType co.ODT_C CtlID uint32 HwndItem HWND ItemID1 uint32 ItemData1 uintptr // ULONG_PTR ItemID2 uint32 ItemData2 uintptr // ULONG_PTR DwLocaleId uint32 }
COMPAREITEMSTRUCT struct.
type CONSOLE_CURSOR_INFO ¶
type CONSOLE_CURSOR_INFO struct { DwSize uint32 // contains filtered or unexported fields }
CONSOLE_CURSOR_INFO struct.
func (*CONSOLE_CURSOR_INFO) BVisible ¶
func (cc *CONSOLE_CURSOR_INFO) BVisible() bool
func (*CONSOLE_CURSOR_INFO) SetBVisible ¶
func (cc *CONSOLE_CURSOR_INFO) SetBVisible(val bool)
type CONSOLE_FONT_INFO ¶
CONSOLE_FONT_INFO struct.
type CONSOLE_READCONSOLE_CONTROL ¶
type CONSOLE_READCONSOLE_CONTROL struct { NInitialChars uint32 DwCtrlWakeupMask uint32 DwControlKeyState co.CKS // contains filtered or unexported fields }
CONSOLE_READCONSOLE_CONTROL struct.
⚠️ You must call SetNLength() to initialize the struct.
func (*CONSOLE_READCONSOLE_CONTROL) SetNLength ¶
func (c *CONSOLE_READCONSOLE_CONTROL) SetNLength()
type CONVCONTEXT ¶
type CONVCONTEXT struct { WCountryID uint32 DwSecurity uint32 Qos SECURITY_QUALITY_OF_SERVICE // contains filtered or unexported fields }
CONVCONTEXT struct.
⚠️ You must call SetCb() to initialize the struct.
func (*CONVCONTEXT) DwLangId ¶
func (cc *CONVCONTEXT) DwLangId() LANGID
func (*CONVCONTEXT) SetCb ¶
func (cc *CONVCONTEXT) SetCb()
func (*CONVCONTEXT) SetDwLangId ¶
func (cc *CONVCONTEXT) SetDwLangId(val LANGID)
type COPYDATASTRUCT ¶
COPYDATASTRUCT struct.
type CREATESTRUCT ¶
type CREATESTRUCT struct { LpCreateParams uintptr // LPVOID HInstance HINSTANCE HMenu HMENU HwndParent HWND Cy, Cx int32 Y, X int32 Style co.WS LpszName *uint16 LpszClass *uint16 ExStyle co.WS_EX }
CREATESTRUCT struct.
type CWPRETSTRUCT ¶
type CWPRETSTRUCT struct { LResult uintptr // LRESULT LParam LPARAM WParam WPARAM Message co.WM Hwnd HWND }
CWPRETSTRUCT struct.
type ClassName ¶
type ClassName struct {
// contains filtered or unexported fields
}
Variant type for a class name identifier, which can be empty, an ATOM or a string.
Example: ¶
clsName := win.ClassNameStr("FOO") if s, ok := clsName.Str(); ok { println(s) }
func ClassNameAtom ¶
Creates a new ClassName variant with an ATOM value.
func ClassNameNone ¶
func ClassNameNone() ClassName
Creates a new ClassName variant with an empty value.
func ClassNameStr ¶
Creates a new ClassName variant with a string value.
type CursorRes ¶
type CursorRes struct {
// contains filtered or unexported fields
}
Variant type for a cursor resource identifier.
Example: ¶
curId := win.CursorResIdc(co.IDC_ARROW) if idc, ok := curId.Idc(); ok { println(idc) }
func CursorResIdc ¶
Creates a new CursorRes variant with a co.IDC value.
func CursorResInt ¶
Creates a new CursorRes variant with an int value.
func CursorResStr ¶
Creates a new CursorRes variant with a string value.
type DELETEITEMSTRUCT ¶
type DELETEITEMSTRUCT struct { CtlType co.ODT_C CtlID uint32 ItemID uint32 HwndItem HWND ItemData uintptr // ULONG_PTR }
DELETEITEMSTRUCT struct.
type DISPLAY_DEVICE ¶
type DISPLAY_DEVICE struct { StateFlags co.DISPLAY_DEVICE // contains filtered or unexported fields }
DISPLAY_DEVICE struct.
⚠️ You must call SetCb() to initialize the struct.
func (*DISPLAY_DEVICE) DeviceName ¶
func (dd *DISPLAY_DEVICE) DeviceName() string
func (*DISPLAY_DEVICE) DeviceString ¶
func (dd *DISPLAY_DEVICE) DeviceString() string
func (*DISPLAY_DEVICE) SetCb ¶
func (dd *DISPLAY_DEVICE) SetCb()
func (*DISPLAY_DEVICE) SetDeviceName ¶
func (dd *DISPLAY_DEVICE) SetDeviceName(val string)
func (*DISPLAY_DEVICE) SetDeviceString ¶
func (dd *DISPLAY_DEVICE) SetDeviceString(val string)
type DLGITEMTEMPLATE ¶
DLGITEMTEMPLATE struct.
type DLGTEMPLATE ¶
DLGTEMPLATE struct.
type DRAWITEMSTRUCT ¶
type DRAWITEMSTRUCT struct { CtlType co.ODT CtlID uint32 ItemID uint32 ItemAction co.ODA ItemState co.ODS HwndItem HWND Hdc HDC RcItem RECT ItemData uintptr // ULONG_PTR }
DRAWITEMSTRUCT struct.
type DYNAMIC_TIME_ZONE_INFORMATION ¶
type DYNAMIC_TIME_ZONE_INFORMATION struct { Bias int32 StandardDate SYSTEMTIME StandardBias int32 DaylightDate SYSTEMTIME DaylightBias int32 // contains filtered or unexported fields }
DYNAMIC_TIME_ZONE_INFORMATION struct.
func (*DYNAMIC_TIME_ZONE_INFORMATION) DaylightName ¶
func (dtz *DYNAMIC_TIME_ZONE_INFORMATION) DaylightName() string
func (*DYNAMIC_TIME_ZONE_INFORMATION) DynamicDaylightTimeDisabled ¶
func (dtz *DYNAMIC_TIME_ZONE_INFORMATION) DynamicDaylightTimeDisabled() bool
func (*DYNAMIC_TIME_ZONE_INFORMATION) SetDaylightName ¶
func (dtz *DYNAMIC_TIME_ZONE_INFORMATION) SetDaylightName(val string)
func (*DYNAMIC_TIME_ZONE_INFORMATION) SetDynamicDaylightTimeDisabled ¶
func (dtz *DYNAMIC_TIME_ZONE_INFORMATION) SetDynamicDaylightTimeDisabled(val bool)
func (*DYNAMIC_TIME_ZONE_INFORMATION) SetStandardName ¶
func (dtz *DYNAMIC_TIME_ZONE_INFORMATION) SetStandardName(val string)
func (*DYNAMIC_TIME_ZONE_INFORMATION) SetTimeZoneKeyName ¶
func (dtz *DYNAMIC_TIME_ZONE_INFORMATION) SetTimeZoneKeyName(val string)
func (*DYNAMIC_TIME_ZONE_INFORMATION) StandardName ¶
func (dtz *DYNAMIC_TIME_ZONE_INFORMATION) StandardName() string
func (*DYNAMIC_TIME_ZONE_INFORMATION) TimeZoneKeyName ¶
func (dtz *DYNAMIC_TIME_ZONE_INFORMATION) TimeZoneKeyName() string
type EDITBALLOONTIP ¶
type EDITBALLOONTIP struct { PszTitle *uint16 PszText *uint16 TtiIcon co.TTI // contains filtered or unexported fields }
EDITBALLOONTIP struct.
⚠️ You must call SetCbStruct() to initialize the struct.
Example: ¶
ebt := &EDITBALLOONTIP{} ebt.SetCbStruct()
func (*EDITBALLOONTIP) SetCbStruct ¶
func (eb *EDITBALLOONTIP) SetCbStruct()
type FILETIME ¶
type FILETIME struct {
// contains filtered or unexported fields
}
FILETIME struct.
Can be converted to SYSTEMTIME with FileTimeToSystemTime function.
func GetSystemTimeAsFileTime ¶
func GetSystemTimeAsFileTime() FILETIME
GetSystemTimeAsFileTime function.
Note that the returned value is in UTC format.
func GetSystemTimePreciseAsFileTime ¶
func GetSystemTimePreciseAsFileTime() FILETIME
GetSystemTimePreciseAsFileTime function.
Note that the returned value is in UTC format.
func GetSystemTimes ¶
func GetSystemTimes() (idleTime, kernelTime, userTime FILETIME)
GetSystemTimes function.
func (*FILETIME) EpochNano100 ¶
Returns the internal value converted to epoch in 100-nanoseconds unit.
func (*FILETIME) SetEpochNano100 ¶
Replaces the internal value with the given epoch in 100-nanoseconds unit.
type File ¶
type File struct {
// contains filtered or unexported fields
}
High-level abstraction to HFILE, providing several operations.
Implements the following standard io interfaces:
Created with FileOpen().
func FileOpen ¶
Opens a file with CreateFile, returning a new high-level File object.
⚠️ You must defer File.Close().
func (*File) Read ¶
Implements io.Reader.
Calls ReadFile to read the file contents from its current internal pointer up to the buffer size.
func (*File) ReadAll ¶
Rewinds the internal file pointer and reads all contents at once, then rewinds the pointer again.
Calls SetFilePointerEx and ReadFile
func (*File) ReadLines ¶
Loads all the file content in memory with ReadAll(), which calls ReadFile, then parses it as text and returns the lines.
func (*File) Resize ¶
Truncates or expands the file, according to the new size. Zero will empty the file. The internal file pointer will rewind.
Calls SetFilePointerEx and SetEndOfFile.
func (*File) Size ¶
Retrieves the file size with GetFileSizeEx. This value is not cached.
func (*File) Write ¶
Implements io.Writer.
Calls WriteFile to write a slice at current internal pointer position.
func (*File) WriteByte ¶
Implements io.ByteWriter.
Calls WriteFile to write a byte at current internal pointer position.
func (*File) WriteString ¶
Implements io.StringWriter.
Calls WriteFile to write a string at current internal pointer position.
type FileMapped ¶
type FileMapped struct {
// contains filtered or unexported fields
}
High-level abstraction to HFILEMAP, providing several operations.
Note that memory-mapped files may present issues in x86 architectures; if so, just use the ordinary File.
Created with FileMappedOpen().
func FileMappedOpen ¶
func FileMappedOpen( filePath string, desiredAccess co.FILE_OPEN) (*FileMapped, error)
Opens a memory-mapped file, returning a new high-level FileMapped object.
Note that memory-mapped files may present issues in x86 architectures; if so, just use the ordinary FileOpen.
⚠️ You must defer FileMapped.Close().
func (*FileMapped) Close ¶
func (me *FileMapped) Close() error
Unmaps and releases the file resource.
func (*FileMapped) HotSlice ¶
func (me *FileMapped) HotSlice() []byte
Returns a slice to the memory-mapped bytes.
The FileMapped object must remain open while the slice is being used. If you need to close the file right away, use ReadAll() instead.
func (*FileMapped) ReadAll ¶
func (me *FileMapped) ReadAll() []byte
Returns a new []byte with a copy of all data in the file.
func (*FileMapped) ReadChunk ¶
func (me *FileMapped) ReadChunk(offset, length int) []byte
Returns a new []byte with a copy of data, start with offset, and with the given length.
func (*FileMapped) ReadLines ¶
func (me *FileMapped) ReadLines() []string
Parses the file content as text and returns the lines.
func (*FileMapped) Resize ¶
func (me *FileMapped) Resize(numBytes int) error
Truncates or expands the file, according to the new size. Zero will empty the file.
Internally, the file is unmapped, then remapped back into memory.
func (*FileMapped) Size ¶
func (me *FileMapped) Size() int
Retrieves the file size. This value is cached.
type GUID ¶
type GUID struct {
// contains filtered or unexported fields
}
GUID struct.
Can be created with NewGuidFromClsid() or NewGuidFromIid().
func GuidFromClsid ¶
Returns a GUID struct from a CLSID string.
type GUITHREADINFO ¶
type GUITHREADINFO struct { Flags co.GUI HwndActive HWND HwndFocus HWND HwndCapture HWND HwndMenuOwner HWND HwndMoveSize HWND HwndCaret HWND RcCaret RECT // contains filtered or unexported fields }
GUITHREADINFO struct.
⚠️ You must call SetCbSize() to initialize the struct.
func (*GUITHREADINFO) SetCbSize ¶
func (gti *GUITHREADINFO) SetCbSize()
type HACCEL ¶
type HACCEL HANDLE
A handle to an accelerator table.
func CreateAcceleratorTable ¶
CreateAcceleratorTable function.
⚠️ You must defer HACCEL.DestroyAcceleratorTable().
func (HACCEL) CopyAcceleratorTable ¶
CopyAcceleratorTable function.
func (HACCEL) DestroyAcceleratorTable ¶
DestroyAcceleratorTable function.
type HACCESSTOKEN ¶
type HACCESSTOKEN HANDLE
Handle to an access token.
func GetCurrentProcessToken ¶
func GetCurrentProcessToken() HACCESSTOKEN
GetCurrentProcessToken function.
func GetCurrentThreadEffectiveToken ¶
func GetCurrentThreadEffectiveToken() HACCESSTOKEN
GetCurrentThreadEffectiveToken function.
func (HACCESSTOKEN) CloseHandle ¶
func (hToken HACCESSTOKEN) CloseHandle() error
CloseHandle function.
func (HACCESSTOKEN) GetTokenInformation ¶
func (hToken HACCESSTOKEN) GetTokenInformation( infoClass co.TOKEN_INFO, pInfo unsafe.Pointer, szInfo uint32) error
GetTokenInformation function.
Example ¶
Checking of the current process has elevated privileges:
hToken, _ := win.GetCurrentProcess(). OpenProcessToken(co.TOKEN_QUERY) defer hToken.CloseHandle() var elevation win.TOKEN_ELEVATION hToken.GetTokenInformation( co.TOKEN_INFO_Elevation, unsafe.Pointer(&elevation), uint32(unsafe.Sizeof(elevation)), )
type HANDLE ¶
A handle to an object. This generic handle is used throughout the whole API, with different meanings.
type HBITMAP ¶
type HBITMAP HGDIOBJ
A handle to a bitmap.
func CreateBitmapIndirect ¶
CreateBitmapIndirect function.
⚠️ You must defer HBITMAP.DeleteObject().
type HBRUSH ¶
type HBRUSH HGDIOBJ
A handle to a brush.
func CreateSysColorBrush ¶
This helper method performs the tricky conversion to create a brush from a system color, particularly used when registering a window class.
type HCLIPBOARD ¶
type HCLIPBOARD struct{}
A handle to the clipboard. Actually this handle does not exist, it only serves the purpose of logically group the clipboard functions.
This handle is returned by HWND.OpenClipboard().
func (HCLIPBOARD) CountClipboardFormats ¶
func (HCLIPBOARD) CountClipboardFormats() int32
CountClipboardFormats function.
func (HCLIPBOARD) EnumClipboardFormats ¶
func (HCLIPBOARD) EnumClipboardFormats() []co.CF
EnumClipboardFormats function.
func (HCLIPBOARD) GetClipboardSequenceNumber ¶
func (HCLIPBOARD) GetClipboardSequenceNumber() uint32
GetClipboardSequenceNumber function.
func (HCLIPBOARD) IsClipboardFormatAvailable ¶
func (HCLIPBOARD) IsClipboardFormatAvailable(format co.CF) bool
IsClipboardFormatAvailable function.
func (HCLIPBOARD) SetClipboardData ¶
func (HCLIPBOARD) SetClipboardData(format co.CF, hMem HGLOBAL)
SetClipboardData function.
⚠️ hMem will be owned by the clipboard, do not call HGLOBAL.Free() anymore.
Unless you're doing something specific, prefer HCLIPBOARD.WriteBitmap() or HCLIPBOARD.WriteString().
func (HCLIPBOARD) WriteBitmap ¶
func (hClip HCLIPBOARD) WriteBitmap(hBmp HBITMAP)
This helper method writes a bitmap to the clipboard with HCLIPBOARD.SetClipboardData().
⚠️ hBmp will be owned by the clipboard, do not call HBITMAP.DeleteObject() anymore.
func (HCLIPBOARD) WriteString ¶
func (hClip HCLIPBOARD) WriteString(text string)
This helper method writes a string to the clipboard with HCLIPBOARD.SetClipboardData().
type HCURSOR ¶
type HCURSOR HANDLE
A handle to a cursor.
func CreateCursorFromResourceEx ¶
func CreateCursorFromResourceEx( resBits []byte, fmtVersion int, cxDesired, cyDesired int, flags co.LR) (HCURSOR, error)
CreateCursorFromResourceEx function.
This function creates HCURSOR only. The HICON variation is CreateIconFromResourceEx().
⚠️ You must defer HCURSOR.DestroyCursor().
func (HCURSOR) SetSystemCursor ¶
SetSystemCursor function.
type HDC ¶
type HDC HANDLE
A handle to a device context (DC).
func (HDC) AlphaBlend ¶
func (hdc HDC) AlphaBlend( originDest POINT, szDest SIZE, hdcSrc HDC, originSrc POINT, szSrc SIZE, ftn BLENDFUNCTION)
AlphaBlend function.
This method is called from the destination HDC.
func (HDC) BeginPath ¶
func (hdc HDC) BeginPath()
BeginPath function.
⚠️ You must defer HDC.EndPath().
func (HDC) CreateCompatibleBitmap ¶
CreateCompatibleBitmap function.
⚠️ You must defer HBITMAP.DeleteObject().
func (HDC) CreateDIBSection ¶
func (hdc HDC) CreateDIBSection( bmi *BITMAPINFO, usage co.DIB, hSection HFILEMAP, offset uint32) (HBITMAP, *byte)
CreateDIBSection function.
⚠️ You must defer HBITMAP.DeleteObject().
func (HDC) DrawIconEx ¶
func (hdc HDC) DrawIconEx( pos POINT, hIcon HICON, size SIZE, frameIndex uint32, hbrFlickerFree HBRUSH, diFlags co.DI)
DrawIconEx function.
func (HDC) EnumDisplayMonitors ¶
func (hdc HDC) EnumDisplayMonitors( rcClip *RECT, callback func(hMon HMONITOR, hdcMon HDC, rcMon *RECT) bool) error
EnumDisplayMonitors function.
To continue enumeration, the callback function must return true; to stop enumeration, it must return false.
func (HDC) GetCurrentPositionEx ¶
GetCurrentPositionEx function.
func (HDC) GetDIBits ¶
func (hdc HDC) GetDIBits( hbm HBITMAP, firstScanLine, numScanLines int, bitmapDataBuffer []byte, bmi *BITMAPINFO, usage co.DIB) int
GetDIBits function.
Note that this method fails if bitmapDataBuffer is an ordinary Go slice; it must be allocated directly from the OS heap.
Example ¶
Taking a screenshot and saving into a BMP file:
cxScreen := win.GetSystemMetrics(co.SM_CXSCREEN) cyScreen := win.GetSystemMetrics(co.SM_CYSCREEN) hdcScreen := win.HWND(0).GetDC() defer win.HWND(0).ReleaseDC(hdcScreen) hBmp := hdcScreen.CreateCompatibleBitmap(cxScreen, cyScreen) defer hBmp.DeleteObject() hdcMem := hdcScreen.CreateCompatibleDC() defer hdcMem.DeleteDC() hBmpOld := hdcMem.SelectObjectBitmap(hBmp) defer hdcMem.SelectObjectBitmap(hBmpOld) hdcMem.BitBlt( win.POINT{X: 0, Y: 0}, win.SIZE{Cx: cxScreen, Cy: cyScreen}, hdcScreen, win.POINT{X: 0, Y: 0}, co.ROP_SRCCOPY, ) bi := win.BITMAPINFO{ BmiHeader: win.BITMAPINFOHEADER{ BiWidth: cxScreen, BiHeight: cyScreen, BiPlanes: 1, BiBitCount: 32, BiCompression: co.BI_RGB, }, } bi.BmiHeader.SetBiSize() var bmpObj win.BITMAP hBmp.GetObject(&bmpObj) bmpSize := bmpObj.CalcBitmapSize(bi.BmiHeader.BiBitCount) rawMem := win.GlobalAlloc(co.GMEM_FIXED|co.GMEM_ZEROINIT, bmpSize) defer rawMem.GlobalFree() bmpSlice := rawMem.GlobalLock(bmpSize) defer rawMem.GlobalUnlock() hdcScreen.GetDIBits(hBmp, 0, int(cyScreen), bmpSlice, &bi, co.DIB_RGB_COLORS) var bfh win.BITMAPFILEHEADER bfh.SetBfType() bfh.SetBfOffBits(uint32(unsafe.Sizeof(bfh) + unsafe.Sizeof(bi.BmiHeader))) bfh.SetBfSize(bfh.BfOffBits() + uint32(bmpSize)) fo, _ := win.FileOpen("C:\\Temp\\foo.bmp", co.FILE_OPEN_RW_OPEN_OR_CREATE) defer fo.Close() fo.Write(bfh.Serialize()) fo.Write(bi.BmiHeader.Serialize()) fo.Write(bmpSlice)
func (HDC) GetTextExtentPoint32 ¶
GetTextExtentPoint32 function.
func (HDC) HiMetricToPixel ¶
AtlHiMetricToPixel function. Converts HIMETRIC units to pixels.
func (HDC) IntersectClipRect ¶
IntersectClipRect function.
func (HDC) MaskBlt ¶
func (hdc HDC) MaskBlt( destTopLeft POINT, sz SIZE, hdcSrc HDC, srcTopLeft POINT, hbmMask HBITMAP, maskOffset POINT, rop co.ROP)
MaskBlt function.
func (HDC) PixelToHiMetric ¶
AtlPixelToHiMetric function. Converts pixels to HIMETRIC units.
func (HDC) SelectClipRgn ¶
SelectClipRgn function.
func (HDC) SelectObjectBitmap ¶
SelectObjectBitmap function.
func (HDC) SelectObjectBrush ¶
SelectObjectBrush function.
func (HDC) SelectObjectFont ¶
SelectObjectFont function.
func (HDC) SelectObjectPen ¶
SelectObjectPen function.
func (HDC) SelectObjectRgn ¶
SelectObjectRgn function.
func (HDC) SetArcDirection ¶
SetArcDirection function.
func (HDC) SetPolyFillMode ¶
SetPolyFillMode function.
func (HDC) SetStretchBltMode ¶
SetStretchBltMode function.
func (HDC) StretchBlt ¶
func (hdc HDC) StretchBlt( destTopLeft POINT, destSz SIZE, hdcSrc HDC, srcTopLeft POINT, srcSz SIZE, rop co.ROP)
StretchBlt function.
This method is called from the destination HDC.
func (HDC) TransparentBlt ¶
func (hdc HDC) TransparentBlt( destTopLeft POINT, destSz SIZE, hdcSrc HDC, srcTopLeft POINT, srcSz SIZE, colorTransparent COLORREF)
TransparentBlt function.
This method is called from the destination HDC.
type HDDE ¶
type HDDE uint32
A handle to a DDE instance. Actually this handle does not exist, it's just a number identifying the instance.
This handle is returned by win.DdeInitialize().
func DdeInitialize ¶
func DdeInitialize( callback func( wType co.XTYP, wFmt uint32, hConv HCONV, hsz1, hsz2 HSZ, hData, dwData1, dwData2 uintptr) uintptr, afCmd co.AFCMD) (HDDE, error)
DdeInitialize function.
Note that this function is intended to be called only once. If you call it more than once, you'll overwrite the callback function.
⚠️ You must defer HDDE.DdeUninitialize().
func (HDDE) DdeClientTransaction ¶
func (hDde HDDE) DdeClientTransaction( data []byte, hConv HCONV, item StrOpt, fmt co.CF, xType co.XTYP, msTimeout int) (HDDEDATA, error)
DdeClientTransaction function.
For an async operation, pass -1 to timeout.
⚠️ You must defer HDDE.DdeFreeDataHandle().
func (HDDE) DdeCmpStringHandles ¶
DdeCmpStringHandles function.
func (HDDE) DdeConnect ¶
func (hDde HDDE) DdeConnect( serviceName, topic StrOpt, cc *CONVCONTEXT) (HCONV, error)
DdeConnect function.
⚠️ You must defer HDDE.DdeDisconnect().
func (HDDE) DdeCreateStringHandle ¶
DdeCreateStringHandle function.
⚠️ You must defer HDDE.DdeFreeStringHandle().
func (HDDE) DdeDisconnect ¶
DdeDisconnect function.
func (HDDE) DdeFreeDataHandle ¶
DdeFreeDataHandle function.
func (HDDE) DdeFreeStringHandle ¶
DdeFreeStringHandle function.
func (HDDE) DdeGetLastError ¶
DdeGetLastError function.
func (HDDE) DdeKeepStringHandle ¶
DdeKeepStringHandle function.
⚠️ You must defer HDDE.DdeFreeStringHandle() on the hsz, because a clone of it has been made.
func (HDDE) DdeNameService ¶
DdeNameService function.
func (HDDE) DdePostAdvise ¶
DdePostAdvise function.
func (HDDE) DdeQueryString ¶
DdeQueryString function.
type HDROP ¶
type HDROP HANDLE
A handle to an internal drop structure.
func (HDROP) DragFinish ¶
func (hDrop HDROP) DragFinish()
DragFinish function.
This function is rather tricky. Prefer using HDROP.ListFilesAndFinish().
func (HDROP) DragQueryFile ¶
DragQueryFile function.
This function is rather tricky. Prefer using HDROP.ListFilesAndFinish().
func (HDROP) ListFilesAndFinish ¶
This helper method retrieves all file names with DragQueryFile() and calls DragFinish().
type HDWP ¶
type HDWP HANDLE
A handle to a deferred window position structure.
func BeginDeferWindowPos ¶
BeginDeferWindowPos function.
⚠️ You must defer HDWP.EndDeferWindowPos().
func (HDWP) DeferWindowPos ¶
func (hDwp HDWP) DeferWindowPos( hWnd, hwndInsertAfter HWND, x, y, cx, cy int32, uFlags co.SWP) HDWP
DeferWindowPos function.
func (HDWP) EndDeferWindowPos ¶
EndDeferWindowPos function.
type HELPINFO ¶
type HELPINFO struct { IContextType co.HELPINFO ICtrlId int32 HItemHandle HANDLE DwContextId uintptr // DWORD_PTR MousePos POINT // contains filtered or unexported fields }
HELPINFO struct.
⚠️ You must call SetCbSize() to initialize the struct.
type HFILE ¶
type HFILE HANDLE
A handle to a file.
func CreateFile ¶
func CreateFile( fileName string, desiredAccess co.GENERIC, shareMode co.FILE_SHARE, securityAttributes *SECURITY_ATTRIBUTES, creationDisposition co.DISPOSITION, attributes co.FILE_ATTRIBUTE, flags co.FILE_FLAG, security co.SECURITY, hTemplateFile HFILE) (HFILE, error)
CreateFile function.
⚠️ You must defer HFILE.CloseHandle().
func (HFILE) CreateFileMapping ¶
func (hFile HFILE) CreateFileMapping( securityAttributes *SECURITY_ATTRIBUTES, protectPage co.PAGE, protectSec co.SEC, maxSize uint64, objectName StrOpt) (HFILEMAP, error)
CreateFileMapping function.
⚠️ You must defer HFILEMAP.CloseHandle().
func (HFILE) GetFileSizeEx ¶
GetFileSizeEx function.
func (HFILE) ReadFile ¶
func (hFile HFILE) ReadFile( buffer []byte, overlapped *OVERLAPPED) (numBytesRead uint32, e error)
ReadFile function.
func (HFILE) SetFilePointerEx ¶
func (hFile HFILE) SetFilePointerEx( distanceToMove int64, moveMethod co.FILE_FROM) (newPointerOffset int64, e error)
SetFilePointerEx function.
In x86 architecture, SetFilePointer will be called instead.
func (HFILE) UnlockFile ¶
UnlockFile function.
func (HFILE) UnlockFileEx ¶
func (hFile HFILE) UnlockFileEx(numBytes uint64, overlapped *OVERLAPPED) error
UnlockFileEx function.
type HFILEMAP ¶
type HFILEMAP HANDLE
A handle to a memory-mapped file.
func (HFILEMAP) MapViewOfFile ¶
func (hMap HFILEMAP) MapViewOfFile( desiredAccess co.FILE_MAP, offset uint64, numBytesToMap uint) (HFILEMAPVIEW, error)
MapViewOfFile function.
The offset will be rounded down to a multiple of the allocation granularity, which is taken with GetSystemInfo().
Note that this function may present issues in x86 architectures.
⚠️ You must defer HFILEMAPVIEW.UnmapViewOfFile().
type HFILEMAPVIEW ¶
type HFILEMAPVIEW HANDLE
A handle to the memory block of a memory-mapped file. Actually, this is the starting address of the mapped view.
func (HFILEMAPVIEW) FlushViewOfFile ¶
func (hMem HFILEMAPVIEW) FlushViewOfFile(numBytes uint64) error
FlushViewOfFile function.
func (HFILEMAPVIEW) Ptr ¶
func (hMem HFILEMAPVIEW) Ptr() *byte
Returns a pointer to the beginning of the mapped memory block.
func (HFILEMAPVIEW) UnmapViewOfFile ¶
func (hMem HFILEMAPVIEW) UnmapViewOfFile() error
UnmapViewOfFile function.
type HFIND ¶
type HFIND HANDLE
A handle returned by FindFirstFile function.
func FindFirstFile ¶
func FindFirstFile(fileName string, findFileData *WIN32_FIND_DATA) (HFIND, bool, error)
FindFirstFile function.
Returns true if a file was found.
⚠️ You must defer HFIND.FindClose().
func (HFIND) FindNextFile ¶
func (hFind HFIND) FindNextFile(findFileData *WIN32_FIND_DATA) (bool, error)
FindNextFile function.
Returns true if a file was found.
type HFONT ¶
type HFONT HGDIOBJ
A handle to a font.
type HGDIOBJ ¶
type HGDIOBJ HANDLE
A handle to a GDI object.
This type is used as the base type for the specialized GDI objects, being rarely used as itself.
type HGLOBAL ¶
type HGLOBAL HANDLE
A handle to a global memory block.
func GlobalAlloc ¶
GlobalAlloc function.
With co.GMEM_FIXED, the handle itself is the pointer to the memory block, and it can optionally be passed to unsafe.Slice() to create a slice over the memory block.
With co.GMEM_MOVEABLE, you must call HGLOBAL.GlobalLock() to retrieve the pointer.
⚠️ You must defer HGLOBAL.GlobalFree().
Example ¶
hMem := win.GlobalAlloc(co.GMEM_FIXED|co.GMEM_ZEROINIT, 50) defer hMem.GlobalFree() sliceMem := hMem.GlobalLock(50) defer hMem.GlobalUnlock()
func GlobalAllocStr ¶
This helper method calls GlobalAlloc to alloc a null-terminated *uint16.
With co.GMEM_FIXED, the handle itself is the pointer to the memory block, and it can optionally be passed to unsafe.Slice() to create a slice over the memory block.
With co.GMEM_MOVEABLE, you must call HGLOBAL.GlobalLock() to retrieve the pointer.
⚠️ You must defer HGLOBAL.GlobalFree().
Example ¶
hMem := win.GlobalAllocStr(co.GMEM_FIXED, "my text") defer hMem.GlobalFree() charSlice := hMem.GlobalLock(hMem.GlobalSize()) defer hMem.GlobalUnlock()
func (HGLOBAL) GlobalFree ¶
GlobalFree function.
This method is safe to be called if hGlobal is zero.
func (HGLOBAL) GlobalLock ¶
GlobalLock function.
If you called GlobalAlloc() with co.GMEM_FIXED, technically you don't need to call this method, because the handle itself is the pointer to the memory block; however, this method is easier to use.
Make sure that numBytes isn't greater than the memory block size, or you'll have a segfault. The safest way is simply call HGLOBAL.GlobalSize().
⚠️ You must defer HGLOBAL.GlobalUnlock(). After that, the slice must not be used.
Example ¶
hMem := win.GlobalAlloc(co.GMEM_FIXED|co.GMEM_ZEROINIT, 50) defer hMem.GlobalFree() sliceMem := hMem.GlobalLock(hMem.GlobalSize()) defer hMem.GlobalUnlock()
type HHEAP ¶
type HHEAP HANDLE
Handle to a heap object.
func HeapCreate ¶
func HeapCreate( options co.HEAP_CREATE, initialSize, maximumSize uint) (HHEAP, error)
HeapCreate function.
⚠️ You must defer HHEAP.HeapDestroy().
func (HHEAP) HeapCompact ¶
HeapCompact function.
func (HHEAP) HeapReAlloc ¶
func (hHeap HHEAP) HeapReAlloc( flags co.HEAP_REALLOC, block []byte, num_bytes uint) ([]byte, error)
HeapReAlloc function.
⚠️ You must defer HHEAP.HeapFree().
func (HHEAP) HeapSetInformation ¶
func (hHeap HHEAP) HeapSetInformation( informationClass co.HEAP_CLASS, information *uint32, informationLength int) error
HeapSetInformation function.
func (HHEAP) HeapValidate ¶
HeapValidate function.
type HHOOK ¶
type HHOOK HANDLE
A handle to a hook.
func SetWindowsHookEx ¶
func SetWindowsHookEx(idHook co.WH, callback func(code int32, wp WPARAM, lp LPARAM) uintptr, hMod HINSTANCE, threadId uint32) (HHOOK, error)
SetWindowsHookEx function.
Note that the callback is recreated each function call, and the number of system callbacks is limited somewhere by the Go runtime.
SetWindowsHookEx() doesn't have a context argument, so everything inside of it depends on global objects.
⚠️ You must defer HHOOK.UnhookWindowsHookEx().
func (HHOOK) CallNextHookEx ¶
CallNextHookEx function.
func (HHOOK) UnhookWindowsHookEx ¶
UnhookWindowsHookEx function.
type HICON ¶
type HICON HANDLE
A handle to an icon.
func CreateIconFromResourceEx ¶
func CreateIconFromResourceEx( resBits []byte, fmtVersion int, cxDesired, cyDesired int, flags co.LR) (HICON, error)
CreateIconFromResourceEx function.
This function creates HICON only. The HCURSOR variation is CreateCursorFromResourceEx().
⚠️ You must defer HICON.DestroyIcon().
func ExtractIconEx ¶
ExtractIconEx function.
Extracts all icons: big and small.
⚠️ You must defer HICON.DestroyIcon() on each icon returned in both slices.
func (HICON) GetIconInfo ¶
GetIconInfo function.
⚠️ You must defer HBITMAP.DeleteObject() in HbmMask and HbmColor fields.
func (HICON) GetIconInfoEx ¶
func (hIcon HICON) GetIconInfoEx(iconInfoEx *ICONINFOEX)
GetIconInfoEx function.
⚠️ You must defer HBITMAP.DeleteObject() in HbmMask and HbmColor fields.
type HIMAGELIST ¶
type HIMAGELIST HANDLE
A handle to an image list.
func ImageListCreate ¶
func ImageListCreate( cx, cy uint32, flags co.ILC, szInitial, szGrow uint32) HIMAGELIST
ImageList_Create function.
Usually flags is ILC_COLOR32.
⚠️ You must defer HIMAGELIST.Destroy().
func (HIMAGELIST) AddIcon ¶
func (hImg HIMAGELIST) AddIcon(hIcons ...HICON)
ImageList_AddIcon function.
If icon was loaded from resource with LoadIcon(), it doesn't need to be destroyed, because all icon resources are automatically freed. Otherwise, if loaded with CreateIcon(), it must be destroyed.
func (HIMAGELIST) AddIconFromShell ¶
func (hImg HIMAGELIST) AddIconFromShell(fileExtensions ...string)
This helper method calls SHGetFileInfo to load icons from the shell, used by Windows Explorer to represent the given file extensions, like "mp3".
func (HIMAGELIST) GetIconSize ¶
func (hImg HIMAGELIST) GetIconSize() SIZE
ImageList_GetIconSize function.
func (HIMAGELIST) GetImageCount ¶
func (hImg HIMAGELIST) GetImageCount() uint32
ImageList_GetImageCount function.
func (HIMAGELIST) ReplaceIcon ¶
func (hImg HIMAGELIST) ReplaceIcon(i int32, hIcon HICON) int32
ImageList_ReplaceIcon function.
If icon was loaded from resource with LoadIcon(), it doesn't need to be destroyed, because all icon resources are automatically freed. Otherwise, if loaded with CreateIcon(), it must be destroyed.
type HINSTANCE ¶
type HINSTANCE HANDLE
A handle to an instance. This is the base address of the module in memory.
func GetModuleHandle ¶
GetModuleHandle function.
If moduleName is nil, returns a handle to the file used to create the calling process (.exe file).
func (HINSTANCE) CreateDialogParam ¶
func (hInst HINSTANCE) CreateDialogParam( templateName ResId, hwndParent HWND, dialogFunc uintptr, dwInitParam LPARAM) HWND
CreateDialogParam function.
func (HINSTANCE) DialogBoxIndirectParam ¶
func (hInst HINSTANCE) DialogBoxIndirectParam( template *DLGTEMPLATE, hwndParent HWND, dialogFunc uintptr, dwInitParam LPARAM) uintptr
DialogBoxIndirectParam function.
func (HINSTANCE) DialogBoxParam ¶
func (hInst HINSTANCE) DialogBoxParam( templateName ResId, hwndParent HWND, dialogFunc uintptr, dwInitParam LPARAM) uintptr
DialogBoxParam function.
func (HINSTANCE) DuplicateIcon ¶
DuplicateIcon function.
func (HINSTANCE) FindResource ¶
FindResource function.
func (HINSTANCE) FindResourceEx ¶
func (hInst HINSTANCE) FindResourceEx( name ResId, rsrcType RsrcType, language LANGID) (HRSRC, error)
FindResourceEx function.
func (HINSTANCE) GetClassInfoEx ¶
func (hInst HINSTANCE) GetClassInfoEx( className *uint16, destBuf *WNDCLASSEX) (ATOM, error)
GetClassInfoEx function.
func (HINSTANCE) GetModuleFileName ¶
GetModuleFileName function.
Example ¶
Retrieving own .exe path:
exePath := win.HINSTANCE(0).GetModuleFileName() fmt.Printf("Current .exe path: %s\n", exePath)
func (HINSTANCE) GetProcAddress ¶
GetProcAddress function.
func (HINSTANCE) LoadAccelerators ¶
LoadAccelerators function.
func (HINSTANCE) LoadCursor ¶
LoadCursor function.
func (HINSTANCE) LoadImage ¶
LoadImage function.
Returned HGDIOBJ must be cast into HBITMAP, HCURSOR or HICON.
⚠️ If the object is not being loaded from the application resources, you must defer its respective DeleteObject().
Examples ¶
Loading a 16x16 icon resource:
const MY_ICON_ID int = 101 hIcon := win.HICON( win.GetModuleHandle(win.StrOptNone()).LoadImage( win.ResIdInt(MY_ICON_ID), co.IMAGE_ICON, 16, 16, co.LR_DEFAULTCOLOR, ), )
Loading a bitmap from a file:
hBmp := win.HBITMAP( win.HINSTANCE(0).LoadImage( win.ResIdStr("C:\\Temp\\image.bmp"), co.IMAGE_BITMAP, 0, 0, co.LR_LOADFROMFILE, ), ) defer hBmp.DeleteObject()
func (HINSTANCE) LoadResource ¶
LoadResource function.
func (HINSTANCE) LockResource ¶
LockResource function.
This method should belong to HRSRCMEM, but in order to make it safe, we automatically call HINSTANCE.SizeofResource(), so it's implemented here.
func (HINSTANCE) SizeofResource ¶
SizeofResource function.
type HKEY ¶
type HKEY HANDLE
A handle to a registry key.
const ( HKEY_CLASSES_ROOT HKEY = 0x8000_0000 HKEY_CURRENT_USER HKEY = 0x8000_0001 HKEY_LOCAL_MACHINE HKEY = 0x8000_0002 HKEY_USERS HKEY = 0x8000_0003 HKEY_PERFORMANCE_DATA HKEY = 0x8000_0004 HKEY_PERFORMANCE_TEXT HKEY = 0x8000_0050 HKEY_PERFORMANCE_NLSTEXT HKEY = 0x8000_0060 HKEY_CURRENT_CONFIG HKEY = 0x8000_0005 )
Predefined registry key.
func (HKEY) RegDeleteKey ¶
RegDeleteKey function.
func (HKEY) RegDeleteKeyEx ¶
RegDeleteKeyEx function.
samDesired must be KEY_WOW64_32KEY or KEY_WOW64_64KEY.
func (HKEY) RegDeleteKeyValue ¶
RegDeleteKeyValue function.
func (HKEY) RegDeleteTree ¶
RegDeleteTree function.
func (HKEY) RegEnumKeyEx ¶
RegEnumKeyEx function.
Returns the names of all subkeys within a key.
Example ¶
hKey, _ := win.HKEY_CURRENT_USER.RegOpenKeyEx( "Control Panel\\Desktop", co.REG_OPTION_NONE, co.KEY_READ|co.KEY_ENUMERATE_SUB_KEYS) defer hKey.RegCloseKey() subKeys, _ := hKey.RegEnumKeyEx() for _, subKey := range subKeys { println(subKey) }
func (HKEY) RegEnumValue ¶
RegEnumValue function.
Returns the names and types of all values within a key.
Example ¶
hKey, _ := win.HKEY_CURRENT_USER.RegOpenKeyEx( "Control Panel\\Keyboard", co.REG_OPTION_NONE, co.KEY_READ) defer hKey.RegCloseKey() values, _ := hKey.RegEnumValue() for _, value := range values { println(value.Name) }
func (HKEY) RegGetValue ¶
RegGetValue function.
Example ¶
hKey, _ := win.HKEY_CURRENT_USER.RegOpenKeyEx( "Control Panel\\Sound", co.REG_OPTION_NONE, co.KEY_READ) defer hKey.RegCloseKey() regVal, _ := hKey.RegGetValue( win.StrOptNone(), win.StrOptSome("Beep")) if val, ok := regVal.Sz(); ok { println(val) }
func (HKEY) RegOpenKeyEx ¶
func (hKey HKEY) RegOpenKeyEx( subKey string, ulOptions co.REG_OPTION, samDesired co.KEY) (HKEY, error)
RegOpenKeyEx function.
⚠️ You must defer HKEY.RegCloseKey().
Example ¶
hKey, _ := win.HKEY_CURRENT_USER.RegOpenKeyEx( "Control Panel\\Keyboard", co.REG_OPTION_NONE, co.KEY_READ) defer hKey.RegCloseKey()
func (HKEY) RegQueryInfoKey ¶
RegQueryInfoKey function.
Example ¶
hKey, _ := win.HKEY_CURRENT_USER.RegOpenKeyEx( "Control Panel\\Desktop", co.REG_OPTION_NONE, co.KEY_READ) defer hKey.RegCloseKey() nfo, _ := hKey.RegQueryInfoKey() println(nfo.NumSubKeys, nfo.NumValues, nfo.LastWriteTime.Format(time.ANSIC))
func (HKEY) RegSetKeyValue ¶
RegSetKeyValue function.
Example ¶
hKey, _ := win.HKEY_CURRENT_USER.RegOpenKeyEx( "Control Panel\\Sound", co.REG_OPTION_NONE, co.KEY_READ|co.KEY_WRITE) defer hKey.RegCloseKey() newData := win.RegValSz("yes") hKey.RegSetKeyValue( win.StrOptNone(), win.StrOptSome("Beep"), newData)
type HLOCAL ¶
type HLOCAL HANDLE
A handle to a local memory block.
func LocalAlloc ¶
LocalAlloc function.
With co.LMEM_FIXED, the handle itself is the pointer to the memory block, and it can optionally be passed to unsafe.Slice() to create a slice over the memory block.
With co.LMEM_MOVEABLE, you must call HLOCAL.LocalLock() to retrieve the pointer.
⚠️ You must defer HLOCAL.LocalFree().
Example: ¶
hMem := win.LocalAlloc(co.LMEM_FIXED|co.LMEM_ZEROINIT, 50) defer hMem.LocalFree() sliceMem := hMem.LocalLock(50) defer hMem.LocalUnlock()
func (HLOCAL) LocalLock ¶
LocalLock function.
If you called LocalAlloc() with co.LMEM_FIXED, technically you don't need to call this method, because the handle itself is the pointer to the memory block; however, this method is easier to use.
Make sure that numBytes isn't greater than the memory block size, or you'll have a segfault. The safest way is simply call HLOCAL.LocalSize().
⚠️ You must defer HLOCAL.LocalUnlock(). After that, the slice must not be used.
Example: ¶
hMem := win.LocalAlloc(co.LMEM_FIXED|co.LMEM_ZEROINIT, 50) defer hMem.LocalFree() sliceMem := hMem.LocalLock(hMem.LocalSize()) defer hMem.LocalUnlock()
type HMENU ¶
type HMENU HANDLE
A handle to a menu.
func CreateMenu ¶
func CreateMenu() HMENU
CreateMenu function.
⚠️ You must defer HMENU.DestroyMenu(), unless it's attached to a window.
func CreatePopupMenu ¶
func CreatePopupMenu() HMENU
CreatePopupMenu function.
⚠️ You must defer HMENU.DestroyMenu(), unless it's attached to a window.
func (HMENU) AddItem ¶
This helper method appends a new item to the menu, by calling HMENU.AppendMenu(). Returns the same menu, so you can chain multiple calls.
func (HMENU) AddSeparator ¶
This helper method appends a new separator to the menu, by calling HMENU.AppendMenu(). Returns the same menu, so you can chain multiple calls.
func (HMENU) AddSubmenu ¶
This helper method appends a new submenu to the menu, by calling HMENU.AppendMenu().
func (HMENU) AppendMenu ¶
AppendMenu function.
This function is rather tricky. Prefer using HMENU.AddItem(), HMENU.AddSeparator() or HMENU.AddSubmenu().
⚠️ uIDNewItem must be uint16 or HMENU.
⚠️ lpNewItem must be HBITMAP, LPARAM or string.
func (HMENU) CheckMenuItem ¶
CheckMenuItem function.
Example: ¶
var hMenu win.HMENU // initialized somewhere hMenu.CheckMenuItem(win.MenuItemPos(0), true)
func (HMENU) CheckMenuRadioItem ¶
CheckMenuRadioItem function.
Panics if the three item identifiers don't have the same variant type.
Example: ¶
var hMenu win.HMENU // initialized somewhere p.Hmenu().CheckMenuRadioItem( win.MenuItemPos(0), win.MenuItemPos(4), win.MenuItemPos(1))
func (HMENU) DeleteMenu ¶
DeleteMenu function.
Example: ¶
var hMenu win.HMENU // initialized somewhere hMenu.DeleteMenu(win.MenuItemPos(3))
func (HMENU) EnableMenuItem ¶
EnableMenuItem function.
Example: ¶
var hMenu win.HMENU // initialized somewhere hMenu.EnableMenuItem(win.MenuItemPos(0), false)
func (HMENU) GetMenuDefaultItem ¶
GetMenuDefaultItem function.
func (HMENU) GetMenuItemCount ¶
GetMenuItemCount function.
func (HMENU) GetMenuItemID ¶
GetMenuItemID function.
func (HMENU) GetMenuItemInfo ¶
func (hMenu HMENU) GetMenuItemInfo(item MenuItem, mii *MENUITEMINFO)
GetMenuItemInfo function.
func (HMENU) GetSubMenu ¶
GetSubMenu function.
func (HMENU) InsertMenuItem ¶
func (hMenu HMENU) InsertMenuItem(itemBefore MenuItem, mii *MENUITEMINFO)
InsertMenuItem function.
func (HMENU) SetMenuDefaultItem ¶
SetMenuDefaultItem function.
func (HMENU) SetMenuItemBitmaps ¶
SetMenuItemBitmaps function.
func (HMENU) SetMenuItemInfo ¶
func (hMenu HMENU) SetMenuItemInfo(item MenuItem, info *MENUITEMINFO)
SetMenuItemInfo function.
func (HMENU) ShowAtPoint ¶
This helper method shows the popup menu anchored at the given coordinates, using HMENU.TrackPopupMenu().
If hCoordsRelativeTo is zero, coordinates must be relative to hParent.
This function will block until the menu disappears.
func (HMENU) TrackPopupMenu ¶
TrackPopupMenu function.
This function will block until the menu disappears. If TPM_RETURNCMD is passed, returns the selected command ID.
type HMONITOR ¶
type HMONITOR HANDLE
Handle to a display monitor.
func MonitorFromPoint ¶
MonitorFromPoint function.
func MonitorFromRect ¶
MonitorFromRect function.
func (HMONITOR) GetMonitorInfo ¶
func (hMon HMONITOR) GetMonitorInfo(mi *MONITORINFOEX) error
GetMonitorInfo function.
type HPEN ¶
type HPEN HGDIOBJ
A handle to a pen.
type HPIPE ¶
type HPIPE HANDLE
A handle to a pipe.
func CreateNamedPipe ¶
func CreateNamedPipe( name string, dwOpenMode co.PIPE_ACCESS, dwPipeMode co.PIPE, nMaxInstances uint, nOutBufferSize uint, nInBufferSize uint, nDefaultTimeOut uint, securityAttributes *SECURITY_ATTRIBUTES) (HPIPE, error)
CreateNamedPipe function.
⚠️ You must defer HPIPE.CloseHandle().
func (HPIPE) ConnectNamedPipe ¶
ConnectNamedPipe function.
func (HPIPE) DisconnectNamedPipe ¶
DisconnectNamedPipe function.
func (HPIPE) GetNamedPipeInfo ¶
GetNamedPipeInfo function.
func (HPIPE) PeekNamedPipe ¶
PeekNamedPipe function.
type HPROCESS ¶
type HPROCESS HANDLE
Handle to a process.
func GetCurrentProcess ¶
func GetCurrentProcess() HPROCESS
GetCurrentProcess function.
⚠️ You must defer HPROCESS.CloseHandle().
func (HPROCESS) EnumProcessModules ¶
EnumProcessModules function.
func (HPROCESS) GetExitCodeProcess ¶
GetExitCodeProcess function.
func (HPROCESS) GetModuleBaseName ¶
GetModuleBaseName function.
func (HPROCESS) GetProcessId ¶
GetProcessId function.
func (HPROCESS) GetProcessTimes ¶
func (hProcess HPROCESS) GetProcessTimes() ( creationTime, exitTime, kernelTime, userTime FILETIME, e error)
GetProcessTimes function.
func (HPROCESS) OpenProcessToken ¶
func (hProcess HPROCESS) OpenProcessToken( desiredAccess co.TOKEN) (HACCESSTOKEN, error)
OpenProcessToken function.
⚠️ You must defer HACCESSTOKEN.CloseHandle().
Example ¶
hProcess := GetCurrentProcess() hToken, _ := hProcess.OpenProcessToken(co.TOKEN_EXECUTE) defer hToken.CloseHandle()
func (HPROCESS) ReadProcessMemory ¶
func (hProcess HPROCESS) ReadProcessMemory( baseAddress uintptr, buffer []byte) (numBytesRead uint64, e error)
ReadProcessMemory function.
func (HPROCESS) SetUserObjectInformation ¶
func (hProcess HPROCESS) SetUserObjectInformation( index co.UOI, info unsafe.Pointer, infoLen uintptr) error
SetUserObjectInformation function.
func (HPROCESS) TerminateProcess ¶
TerminateProcess function.
func (HPROCESS) WaitForSingleObject ¶
WaitForSingleObject function.
func (HPROCESS) WriteProcessMemory ¶
func (hProcess HPROCESS) WriteProcessMemory( baseAddress uintptr, data []byte) (numBytesWritten uint64, e error)
WriteProcessMemory function.
type HPROCSNAPSHOT ¶
type HPROCSNAPSHOT HANDLE
Handle to a process snapshot.
func CreateToolhelp32Snapshot ¶
func CreateToolhelp32Snapshot( flags co.TH32CS, processId uint32) (HPROCSNAPSHOT, error)
CreateToolhelp32Snapshot function.
⚠️ You must defer HPROCSNAPSHOT.CloseHandle().
func (HPROCSNAPSHOT) CloseHandle ¶
func (hProcSnap HPROCSNAPSHOT) CloseHandle() error
CloseHandle function.
func (HPROCSNAPSHOT) EnumModules ¶
func (hProcSnap HPROCSNAPSHOT) EnumModules( callback func(me32 *MODULEENTRY32) bool) error
This helper method enumerates all modules.
To continue enumeration, the callback function must return true; to stop enumeration, return false.
func (HPROCSNAPSHOT) EnumProcesses ¶
func (hProcSnap HPROCSNAPSHOT) EnumProcesses( callback func(me32 *PROCESSENTRY32) bool) error
This helper method enumerates all processes.
To continue enumeration, the callback function must return true; to stop enumeration, return false.
func (HPROCSNAPSHOT) EnumThreads ¶
func (hProcSnap HPROCSNAPSHOT) EnumThreads( callback func(me32 *THREADENTRY32) bool) error
This helper method enumerates all threads.
To continue enumeration, the callback function must return true; to stop enumeration, return false.
func (HPROCSNAPSHOT) Module32First ¶
func (hProcSnap HPROCSNAPSHOT) Module32First(buf *MODULEENTRY32) (bool, error)
Module32First function.
This function is rather tricky. Prefer using HPROCSNAPSHOT.EnumModules().
func (HPROCSNAPSHOT) Module32Next ¶
func (hProcSnap HPROCSNAPSHOT) Module32Next(buf *MODULEENTRY32) (bool, error)
Module32Next function.
This function is rather tricky. Prefer using HPROCSNAPSHOT.EnumModules().
func (HPROCSNAPSHOT) Process32First ¶
func (hProcSnap HPROCSNAPSHOT) Process32First( buf *PROCESSENTRY32) (bool, error)
Process32First function.
This function is rather tricky. Prefer using HPROCSNAPSHOT.EnumProcesses().
func (HPROCSNAPSHOT) Process32Next ¶
func (hProcSnap HPROCSNAPSHOT) Process32Next( buf *PROCESSENTRY32) (bool, error)
Process32Next function.
This function is rather tricky. Prefer using HPROCSNAPSHOT.EnumProcesses().
func (HPROCSNAPSHOT) Thread32First ¶
func (hProcSnap HPROCSNAPSHOT) Thread32First(buf *THREADENTRY32) (bool, error)
Thread32First function.
This function is rather tricky. Prefer using HPROCSNAPSHOT.EnumThreads().
func (HPROCSNAPSHOT) Thread32Next ¶
func (hProcSnap HPROCSNAPSHOT) Thread32Next(buf *THREADENTRY32) (bool, error)
Thread32Next function.
This function is rather tricky. Prefer using HPROCSNAPSHOT.EnumThreads().
type HRGN ¶
type HRGN HGDIOBJ
A handle to a region.
func (HRGN) CombineRgn ¶
CombineRgn function.
Combines the two regions and stores the result in current region.
type HSTDHANDLE ¶
type HSTDHANDLE HANDLE
A handle to a standard device – standard input, standard output, or standard error.
func (HSTDHANDLE) GetCurrentConsoleFont ¶
func (hStd HSTDHANDLE) GetCurrentConsoleFont( maximumWindow bool, info *CONSOLE_FONT_INFO) error
GetCurrentConsoleFont function.
func (HSTDHANDLE) ReadConsole ¶
func (hStd HSTDHANDLE) ReadConsole( maxChars int, inputControl *CONSOLE_READCONSOLE_CONTROL) (string, error)
ReadConsole function.
func (HSTDHANDLE) SetConsoleCursorInfo ¶
func (hStd HSTDHANDLE) SetConsoleCursorInfo(info *CONSOLE_CURSOR_INFO) error
SetConsoleCursorInfo function.
func (HSTDHANDLE) SetConsoleCursorPosition ¶
func (hStd HSTDHANDLE) SetConsoleCursorPosition(x, y int) error
SetConsoleCursorPosition function.
func (HSTDHANDLE) SetConsoleDisplayMode ¶
func (hStd HSTDHANDLE) SetConsoleDisplayMode(mode co.CONSOLE) (SIZE, error)
SetConsoleDisplayMode function.
func (HSTDHANDLE) SetConsoleMode ¶
func (hStd HSTDHANDLE) SetConsoleMode(mode co.ENABLE) error
SetConsoleMode function.
func (HSTDHANDLE) SetConsoleScreenBufferSize ¶
func (hStd HSTDHANDLE) SetConsoleScreenBufferSize(x, y int) error
SetConsoleScreenBufferSize function.
func (HSTDHANDLE) WriteConsole ¶
func (hStd HSTDHANDLE) WriteConsole(text string) (numCharsWritten int, e error)
WriteConsole function.
type HTASKMEM ¶
type HTASKMEM HANDLE
Handle to an OLE block of memory.
type HTHEME ¶
type HTHEME HANDLE
Handle to a theme.
func (HTHEME) DrawThemeBackground ¶
DrawThemeBackground function.
func (HTHEME) GetThemeColor ¶
GetThemeColor function.
func (HTHEME) GetThemeInt ¶
GetThemeInt function.
func (HTHEME) GetThemeMetric ¶
GetThemeMetric function.
func (HTHEME) GetThemePosition ¶
GetThemePosition function.
func (HTHEME) GetThemePropertyOrigin ¶
GetThemePropertyOrigin function.
func (HTHEME) GetThemeRect ¶
GetThemeRect function.
func (HTHEME) GetThemeString ¶
GetThemeString function.
func (HTHEME) GetThemeSysColorBrush ¶
GetThemeSysColorBrush function.
⚠️ You must defer HBRUSH.DeleteObject().
func (HTHEME) GetThemeSysFont ¶
GetThemeSysFont function.
func (HTHEME) GetThemeTextMetrics ¶
func (hTheme HTHEME) GetThemeTextMetrics( hdc HDC, partStateId co.VS, tm *TEXTMETRIC)
GetThemeTextMetrics function.
func (HTHEME) IsThemeBackgroundPartiallyTransparent ¶
IsThemeBackgroundPartiallyTransparent function.
func (HTHEME) IsThemePartDefined ¶
IsThemePartDefined function.
type HTHREAD ¶
type HTHREAD HANDLE
Handle to a thread.
func GetCurrentThread ¶
func GetCurrentThread() HTHREAD
GetCurrentThread function.
⚠️ You must defer HTHREAD.CloseHandle().
func (HTHREAD) GetExitCodeThread ¶
GetExitCodeThread function.
func (HTHREAD) GetProcessIdOfThread ¶
GetProcessIdOfThread function.
func (HTHREAD) GetThreadId ¶
GetThreadId function.
func (HTHREAD) GetThreadTimes ¶
func (hThread HTHREAD) GetThreadTimes() ( creationTime, exitTime, kernelTime, userTime FILETIME, e error)
GetThreadTimes function.
func (HTHREAD) ResumeThread ¶
ResumeThread function.
func (HTHREAD) SuspendThread ¶
SuspendThread function.
func (HTHREAD) TerminateThread ¶
TerminateThread function.
func (HTHREAD) WaitForSingleObject ¶
WaitForSingleObject function.
type HTREEITEM ¶
type HTREEITEM HANDLE
A handle to a tree view control item.
const ( HTREEITEM_ROOT HTREEITEM = 0x1_0000 HTREEITEM_FIRST HTREEITEM = 0x0_ffff HTREEITEM_LAST HTREEITEM = 0x0_fffe HTREEITEM_SORT HTREEITEM = 0x0_fffd )
Predefined tree view control item handle.
type HWND ¶
type HWND HANDLE
A handle to a window.
func CreateWindowEx ¶
func CreateWindowEx( exStyle co.WS_EX, className ClassName, title StrOpt, style co.WS, x, y, width, height int32, parent HWND, menu HMENU, instance HINSTANCE, param LPARAM) HWND
CreateWindowEx function.
func FindWindow ¶
FindWindow function.
func (HWND) BeginPaint ¶
func (hWnd HWND) BeginPaint(ps *PAINTSTRUCT) HDC
BeginPaint function.
⚠️ You must defer HWND.EndPaint().
func (HWND) ChildWindowFromPoint ¶
ChildWindowFromPoint function.
func (HWND) ChildWindowFromPointEx ¶
ChildWindowFromPointEx function.
func (HWND) ClientToScreenPt ¶
ClientToScreenPt function.
func (HWND) ClientToScreenRc ¶
ClientToScreenRc function.
func (HWND) DefDlgProc ¶
DefDlgProc function.
func (HWND) DefSubclassProc ¶
DefSubclassProc function.
func (HWND) DefWindowProc ¶
DefWindowProc function.
func (HWND) DestroyWindow ¶
DestroyWindow function.
Note: don't call this function to close a window. The correct way to close a window is calling SendMessage with WM_CLOSE.
func (HWND) DragAcceptFiles ¶
DragAcceptFiles function.
func (HWND) DwmExtendFrameIntoClientArea ¶
DwmExtendFrameIntoClientArea function.
func (HWND) DwmGetWindowAttribute ¶
DwmGetWindowAttribute function.
Example ¶
var hwnd win.HWND // initialized somewhere isEnabled := hwnd.DwmGetWindowAttribute( co.DWMWA_GET_NCRENDERING_ENABLED).(bool) rect := hwnd.DwmGetWindowAttribute( co.DWMWA_GET_CAPTION_BUTTON_BOUNDS).(win.RECT)
func (HWND) DwmInvalidateIconicBitmaps ¶
func (hWnd HWND) DwmInvalidateIconicBitmaps()
DwmInvalidateIconicBitmaps function.
func (HWND) DwmSetIconicLivePreviewBitmap ¶
DwmSetIconicLivePreviewBitmap function.
func (HWND) DwmSetIconicThumbnail ¶
DwmSetIconicThumbnail function.
func (HWND) DwmSetWindowAttribute ¶
DwmSetWindowAttribute function.
Example ¶
var hwnd win.HWND // initialized somewhere hwnd.DwmSetWindowAttribute( co.DWMWA_SET_NCRENDERING_POLICY, co.DWMNCRP_DISABLED) hwnd.DwmSetWindowAttribute( co.DWMWA_SET_TRANSITIONS_FORCEDISABLED, true)
func (HWND) EnumChildWindows ¶
EnumChildWindows function.
To continue enumeration, the callback function must return true; to stop enumeration, it must return false.
func (HWND) GetClassLongPtr ¶
GetClassLongPtr function.
func (HWND) GetDC ¶
GetDC function.
Call HWND(0).GetDC() to retrieve the DC for the entire screen.
⚠️ You must defer HDC.ReleaseDC().
func (HWND) GetLastActivePopup ¶
GetLastActivePopup function.
func (HWND) GetNextDlgGroupItem ¶
GetNextDlgGroupItem function.
func (HWND) GetNextDlgTabItem ¶
GetNextDlgTabItem function.
func (HWND) GetScrollInfo ¶
func (hWnd HWND) GetScrollInfo(bar co.SB_TYPE, si *SCROLLINFO)
GetScrollInfo function.
func (HWND) GetSystemMenu ¶
GetSystemMenu function.
func (HWND) GetWindowLongPtr ¶
GetWindowLongPtr function.
func (HWND) GetWindowText ¶
GetWindowText function.
Calls GetWindowTextLength to allocate the memory block.
func (HWND) GetWindowTextLength ¶
GetWindowTextLength function.
You usually don't need to call this function since GetWindowText already calls it to allocate the memory block.
func (HWND) GetWindowThreadProcessId ¶
GetWindowThreadProcessId function.
func (HWND) HiliteMenuItem ¶
HiliteMenuItem function.
func (HWND) InvalidateRect ¶
InvalidateRect function.
func (HWND) IsDialogMessage ¶
IsDialogMessage function.
func (HWND) IsDlgButtonChecked ¶
IsDlgButtonChecked function.
func (HWND) IsThemeDialogTextureEnabled ¶
IsThemeDialogTextureEnabled function.
func (HWND) IsTopLevelWindow ¶
Allegedly undocumented Win32 function.
func (HWND) LogicalToPhysicalPoint ¶
LogicalToPhysicalPoint function.
func (HWND) MapWindowPoints ¶
MapWindowPoints function.
Returns the number of pixels added horizontally and vertically to the passed points.
func (HWND) MenuItemFromPoint ¶
MenuItemFromPoint function.
func (HWND) MessageBox ¶
MessageBox function.
func (HWND) MonitorFromWindow ¶
MonitorFromWindow function.
func (HWND) MoveWindow ¶
MoveWindow function.
func (HWND) OpenClipboard ¶
func (hWnd HWND) OpenClipboard() HCLIPBOARD
OpenClipboard function.
⚠️ You must defer HCLIPBOARD.CloseClipboard().
func (HWND) PhysicalToLogicalPoint ¶
PhysicalToLogicalPoint function.
func (HWND) PostMessage ¶
PostMessage function.
func (HWND) RealChildWindowFromPoint ¶
RealChildWindowFromPoint function.
func (HWND) RealGetWindowClass ¶
RealGetWindowClass function.
func (HWND) RemoveWindowSubclass ¶
RemoveWindowSubclass function.
func (HWND) ScreenToClientPt ¶
ScreenToClientPt function.
func (HWND) ScreenToClientRc ¶
ScreenToClientRc function.
func (HWND) SendMessage ¶
SendMessage function.
func (HWND) SendMessageTimeout ¶
func (hWnd HWND) SendMessageTimeout( msg co.WM, wParam WPARAM, lParam LPARAM, flags co.SMTO, msTimeout int) (uintptr, error)
SendMessageTimeout function.
func (HWND) SetForegroundWindow ¶
SetForegroundWindow function.
Returns true if the window was brought to the foreground.
func (HWND) SetLayeredWindowAttributes ¶
func (hWnd HWND) SetLayeredWindowAttributes( transparencyColorKey COLORREF, alpha uint8, flags co.LWA)
SetLayeredWindowAttributes function.
func (HWND) SetScrollPos ¶
SetScrollPos function.
func (HWND) SetScrollRange ¶
SetScrollRange function.
func (HWND) SetTimer ¶
SetTimer function.
This method will create a timer that will post WM_TIMER messages, instead of running a callback.
The method returns the timer ID.
⚠️ You must call HWND.KillTimer() to stop the timer.
func (HWND) SetTimerCallback ¶
Creates a timer with SetTimer, which runs the given callback instead of posting WM_TIMER messages.
The method returns the timer ID, which is also sent to the callback.
⚠️ You must call HWND.KillTimer() to stop the timer and free the allocated resources.
Example ¶
var hWnd HWND // initialized somewhere hWnd.SetTimerCallback(2000, func(timerId uintptr) { hWnd.KillTimer(timerId) println("This callback will run once.") })
func (HWND) SetWindowDisplayAffinity ¶
SetWindowDisplayAffinity function.
func (HWND) SetWindowLongPtr ¶
SetWindowLongPtr function.
func (HWND) SetWindowPos ¶
SetWindowPos function.
You can pass HWND or HWND_IA in hwndInsertAfter argument.
func (HWND) SetWindowRgn ¶
SetWindowRgn function.
func (HWND) SetWindowSubclass ¶
func (hWnd HWND) SetWindowSubclass( subclassProc uintptr, idSubclass uint32, refData unsafe.Pointer)
SetWindowSubclass function.
func (HWND) TaskDialog ¶
func (hWnd HWND) TaskDialog( hInstance HINSTANCE, windowTitle, mainInstruction, content StrOpt, commonButtons co.TDCBF, icon co.TD_ICON) co.ID
TaskDialog function.
func (HWND) TranslateAccelerator ¶
TranslateAccelerator function.
type ICONINFO ¶
type ICONINFO struct { XHotspot uint32 YHotspot uint32 HbmMask HBITMAP HbmColor HBITMAP // contains filtered or unexported fields }
ICONINFO struct.
type ICONINFOEX ¶
type ICONINFOEX struct { XHotspot uint32 YHotspot uint32 HbmMask HBITMAP HbmColor HBITMAP WResID uint16 // contains filtered or unexported fields }
ICONINFOEX struct.
⚠️ You must call SetCbSize() to initialize the struct.
func (*ICONINFOEX) FIcon ¶
func (iix *ICONINFOEX) FIcon() bool
func (*ICONINFOEX) SetCbSize ¶
func (iix *ICONINFOEX) SetCbSize()
func (*ICONINFOEX) SetFIcon ¶
func (iix *ICONINFOEX) SetFIcon(val bool)
func (*ICONINFOEX) SetSzModName ¶
func (iix *ICONINFOEX) SetSzModName(val string)
func (*ICONINFOEX) SetSzResName ¶
func (iix *ICONINFOEX) SetSzResName(val string)
func (*ICONINFOEX) SzModName ¶
func (iix *ICONINFOEX) SzModName() string
func (*ICONINFOEX) SzResName ¶
func (iix *ICONINFOEX) SzResName() string
type IMAGELISTDRAWPARAMS ¶
type IMAGELISTDRAWPARAMS struct { Himl HIMAGELIST I int32 HdcDst HDC X, Y, Cx, Cy int32 XBitmap int32 YBitmap int32 RgbBk COLORREF RgbFg COLORREF FStyle co.ILD DwRop co.ROP FState co.ILS Frame uint32 CrEffect COLORREF // contains filtered or unexported fields }
IMAGELISTDRAWPARAMS struct.
⚠️ You must call SetCbSize() to initialize the struct.
Example: ¶
idp := &IMAGELISTDRAWPARAMS{} idp.SetCbSize()
func (*IMAGELISTDRAWPARAMS) SetCbSize ¶
func (idp *IMAGELISTDRAWPARAMS) SetCbSize()
type INITCOMMONCONTROLSEX ¶
INITCOMMONCONTROLSEX struct.
⚠️ You must call SetDwSize() to initialize the struct.
Example: ¶
var icx INITCOMMONCONTROLSEX icx.SetDwSize()
func (*INITCOMMONCONTROLSEX) SetDwSize ¶
func (icx *INITCOMMONCONTROLSEX) SetDwSize()
type IconRes ¶
type IconRes struct {
// contains filtered or unexported fields
}
Variant type for an icon resource identifier.
Example: ¶
icoId := win.IconResIdi(co.IDI_HAND) if idi, ok := icoId.Idi(); ok { println(idi) }
func IconResIdi ¶
Creates a new IconRes variant with a co.IDI value.
func IconResStr ¶
Creates a new IconRes variant with a string value.
type Ini ¶
type Ini struct { Sections []IniSection // All sections of this .ini file. // contains filtered or unexported fields }
High-level abstraction to a .ini file.
Contains a slice of sections, which can be freely modified.
Created with IniLoad().
func (*Ini) SaveToFile ¶
Saves the contents to a .ini file.
func (*Ini) Section ¶
func (me *Ini) Section(name string) (*IniSection, bool)
Returns the IniSection with the given name, if any.
func (*Ini) SourcePath ¶
Returns the latest source path of the .ini file.
When IniLoad() is called, this path is stored. When Ini.SaveToFile() is called, this new path is stored.
This is useful when you load an .ini file, and you need to update it later. When you first open, you pass the file path; on subsequent saves, you just call Ini.SourcePath() to retrieve the path, instead of manually saving it somewhere.
Example ¶
ini, _ := win.IniLoad("C:\\Temp\\foo.ini") // modify ini... ini.SaveToFile(ini.SourcePath())
func (*Ini) Value ¶
Returns the specific value, if existing.
Note that a pointer to the string is returned, so that the value can be directly modified.
Example ¶
ini, _ := win.IniLoad("C:\\Temp\\foo.ini") if val, ok := ini.Value("my section", "my value"); ok { fmt.Printf("Old value: %s\n", *val) *val = "new value" }
type IniSection ¶
type IniSection struct { Name string // The name of this section. Values []IniKey // All values of this section. }
A single section of an Ini.
Contains a slice of keys, which can be freely modified.
type LANGID ¶
type LANGID uint16
Language and sublanguage identifier.
const ( LANGID_SYSTEM_DEFAULT LANGID = LANGID((uint16(co.SUBLANG_SYS_DEFAULT) << 10) | uint16(co.LANG_NEUTRAL)) LANGID_USER_DEFAULT LANGID = LANGID((uint16(co.SUBLANG_DEFAULT) << 10) | uint16(co.LANG_NEUTRAL)) )
Predefined language identifier.
type LCID ¶
type LCID uint32
Locale identifier.
const ( LCID_SYSTEM_DEFAULT LCID = LCID((uint32(co.SORT_DEFAULT) << 16) | uint32(LANGID_SYSTEM_DEFAULT)) LCID_USER_DEFAULT LCID = LCID((uint32(co.SORT_DEFAULT) << 16) | uint32(LANGID_USER_DEFAULT)) )
Predefined locale identifier.
type LITEM ¶
type LITEM struct { Mask co.LIF ILink int32 State co.LIS StateMask co.LIS // contains filtered or unexported fields }
LITEM struct.
type LOGFONT ¶
type LOGFONT struct { LfHeight int32 LfWidth int32 LfEscapement int32 LfOrientation int32 LfWeight co.FW LfItalic uint8 LfUnderline uint8 LfStrikeOut uint8 LfCharSet uint8 LfOutPrecision uint8 LfClipPrecision uint8 LfQuality uint8 LfPitchAndFamily uint8 // contains filtered or unexported fields }
LOGFONT struct.
func (*LOGFONT) LfFaceName ¶
func (*LOGFONT) SetLfFaceName ¶
type LVCOLUMN ¶
type LVCOLUMN struct { Mask co.LVCF Fmt co.LVCFMT_C Cx int32 ISubItem int32 IImage int32 IOrder int32 CxMin int32 CxDefault int32 CxIdeal int32 // contains filtered or unexported fields }
LVCOLUMN struct.
func (*LVCOLUMN) SetPszText ¶
type LVFINDINFO ¶
type LVFINDINFO struct { Flags co.LVFI Psz *uint16 LParam LPARAM Pt POINT // contains filtered or unexported fields }
LVFINDINFO struct.
func (*LVFINDINFO) SetVkDirection ¶
func (fi *LVFINDINFO) SetVkDirection(val co.VK)
func (*LVFINDINFO) VkDirection ¶
func (fi *LVFINDINFO) VkDirection() co.VK
type LVHITTESTINFO ¶
type LVHITTESTINFO struct { Pt POINT // Coordinates relative to list view. Flags co.LVHT IItem int32 // -1 if no item. ISubItem int32 IGroup int32 }
LVHITTESTINFO struct.
type LVITEM ¶
type LVITEM struct { Mask co.LVIF IItem int32 ISubItem int32 State co.LVIS StateMask co.LVIS IImage int32 LParam LPARAM IIndent int32 IGroupId co.LVI_GROUPID CColumns uint32 PuColumns *uint32 PiColFmt *co.LVCFMT_I IGroup int32 // contains filtered or unexported fields }
LVITEM struct.
func (*LVITEM) SetPszText ¶
type MANAGEDAPPLICATION ¶
type MANAGEDAPPLICATION struct { DwVersionHi uint32 DwVersionLo uint32 DwRevision uint32 GpoId GUID ProductId GUID Language LANGID DwPathType uint32 // contains filtered or unexported fields }
MANAGEDAPPLICATION struct.
func GetManagedApplications ¶
func GetManagedApplications(category *GUID) ([]MANAGEDAPPLICATION, error)
GetManagedApplications function.
func (*MANAGEDAPPLICATION) BInstalled ¶
func (ma *MANAGEDAPPLICATION) BInstalled() bool
func (*MANAGEDAPPLICATION) PszComments ¶
func (ma *MANAGEDAPPLICATION) PszComments() string
func (*MANAGEDAPPLICATION) PszCompany ¶
func (ma *MANAGEDAPPLICATION) PszCompany() string
func (*MANAGEDAPPLICATION) PszContact ¶
func (ma *MANAGEDAPPLICATION) PszContact() string
func (*MANAGEDAPPLICATION) PszOwner ¶
func (ma *MANAGEDAPPLICATION) PszOwner() string
func (*MANAGEDAPPLICATION) PszPackageName ¶
func (ma *MANAGEDAPPLICATION) PszPackageName() string
func (*MANAGEDAPPLICATION) PszPolicyName ¶
func (ma *MANAGEDAPPLICATION) PszPolicyName() string
func (*MANAGEDAPPLICATION) PszPublisher ¶
func (ma *MANAGEDAPPLICATION) PszPublisher() string
func (*MANAGEDAPPLICATION) PszSupportUrl ¶
func (ma *MANAGEDAPPLICATION) PszSupportUrl() string
type MENUGETOBJECTINFO ¶
type MENUGETOBJECTINFO struct { DwFlags co.MNGOF UPos uint32 Riid uintptr // PVOID PvObj uintptr // PVOID }
MENUGETOBJECTINFO struct.
type MENUINFO ¶
type MENUINFO struct { FMask co.MIM DwStyle co.MNS CyMax uint32 HbrBack HBRUSH DwContextHelpID uint32 DwMenuData uintptr // ULONG_PTR // contains filtered or unexported fields }
MENUINFO struct.
⚠️ You must call SetCbSize() to initialize the struct.
type MENUITEMINFO ¶
type MENUITEMINFO struct { FMask co.MIIM FType co.MFT FState co.MFS WId uint32 HSubMenu HMENU HBmpChecked HBITMAP HBmpUnchecked HBITMAP DwItemData uintptr // ULONG_PTR DwTypeData *uint16 // content changes according to fType Cch uint32 HBmpItem HBITMAP // contains filtered or unexported fields }
MENUITEMINFO struct.
⚠️ You must call SetCbSize() to initialize the struct.
func (*MENUITEMINFO) SetCbSize ¶
func (mii *MENUITEMINFO) SetCbSize()
type MINMAXINFO ¶
type MINMAXINFO struct { PtMaxSize POINT PtMaxPosition POINT PtMinTrackSize POINT PtMaxTrackSize POINT // contains filtered or unexported fields }
MINMAXINFO struct.
type MODULEENTRY32 ¶
type MODULEENTRY32 struct { Th32ModuleID uint32 Th32ProcessID uint32 GlblcntUsage uint32 ProccntUsage uint32 ModBaseAddr uintptr ModBaseSize uint32 HModule HINSTANCE // contains filtered or unexported fields }
MODULEENTRY32 struct.
⚠️ You must call SetDwSize() to initialize the struct.
func (*MODULEENTRY32) SetDwSize ¶
func (me *MODULEENTRY32) SetDwSize()
func (*MODULEENTRY32) SetSzExePath ¶
func (me *MODULEENTRY32) SetSzExePath(val string)
func (*MODULEENTRY32) SetSzModule ¶
func (me *MODULEENTRY32) SetSzModule(val string)
func (*MODULEENTRY32) SzExePath ¶
func (me *MODULEENTRY32) SzExePath() string
func (*MODULEENTRY32) SzModule ¶
func (me *MODULEENTRY32) SzModule() string
type MONITORINFOEX ¶
type MONITORINFOEX struct { RcMonitor RECT RcWork RECT DwFlags co.MONITORINFOF // contains filtered or unexported fields }
MONITORINFOEX struct.
⚠️ You must call SetCbSize() to initialize the struct.
func (*MONITORINFOEX) SetCbSize ¶
func (mi *MONITORINFOEX) SetCbSize()
func (*MONITORINFOEX) SetSzDevice ¶
func (dtf *MONITORINFOEX) SetSzDevice(val string)
func (*MONITORINFOEX) SzDevice ¶
func (dtf *MONITORINFOEX) SzDevice() string
type MenuItem ¶
type MenuItem struct {
// contains filtered or unexported fields
}
Variant type for a menu item identifier, which can be specified by command ID or zero-based position.
Example: ¶
item := win.MenuItemPos(2) if pos, ok := item.Pos(); ok { println(pos) }
func MenuItemCmd ¶
Creates a new MenuItem variant with a command ID.
func MenuItemPos ¶
Creates a new MenuItem variant with a zero-based item index.
type NCCALCSIZE_PARAMS ¶
NCCALCSIZE_PARAMS struct.
type NMCUSTOMDRAW ¶
type NMCUSTOMDRAW struct { Hdr NMHDR DwDrawStage co.CDDS Hdc HDC Rc RECT DwItemSpec uintptr // DWORD_PTR UItemState co.CDIS LItemlParam LPARAM }
NMCUSTOMDRAW struct;
type NMDATETIMECHANGE ¶
type NMDATETIMECHANGE struct { Nmhdr NMHDR DwFlags co.GDT St SYSTEMTIME }
NMDATETIMECHANGE struct.
type NMDATETIMEFORMAT ¶
type NMDATETIMEFORMAT struct { Nmhdr NMHDR PszFormat *uint16 St SYSTEMTIME PszDisplay *uint16 // contains filtered or unexported fields }
NMDATETIMEFORMAT struct.
func (*NMDATETIMEFORMAT) SetSzDisplay ¶
func (dtf *NMDATETIMEFORMAT) SetSzDisplay(val string)
func (*NMDATETIMEFORMAT) SzDisplay ¶
func (dtf *NMDATETIMEFORMAT) SzDisplay() string
type NMDATETIMEFORMATQUERY ¶
NMDATETIMEFORMATQUERY struct.
type NMDATETIMESTRING ¶
type NMDATETIMESTRING struct { Nmhdr NMHDR PszUserString *uint16 St SYSTEMTIME DwFlags co.GDT }
NMDATETIMESTRING struct.
type NMDATETIMEWMKEYDOWN ¶
type NMDATETIMEWMKEYDOWN struct { Nmhdr NMHDR PszFormat *uint16 St SYSTEMTIME // contains filtered or unexported fields }
NMDATETIMEWMKEYDOWN struct.
func (*NMDATETIMEWMKEYDOWN) NVirtKey ¶
func (dtk *NMDATETIMEWMKEYDOWN) NVirtKey() co.VK
func (*NMDATETIMEWMKEYDOWN) SetNVirtKey ¶
func (dtk *NMDATETIMEWMKEYDOWN) SetNVirtKey(val co.VK)
type NMDAYSTATE ¶
type NMDAYSTATE struct { Nmhdr NMHDR StStart SYSTEMTIME CDayState int32 PrgDayState *uint32 // *MONTHDAYSTATE }
NMDAYSTATE struct.
type NMHDR ¶
type NMHDR struct { HWndFrom HWND IdFrom uintptr // UINT_PTR, actually it's a simple control ID Code uint32 // in fact it should be int32 }
NMHDR struct.
type NMITEMACTIVATE ¶
type NMITEMACTIVATE struct { Hdr NMHDR IItem int32 ISubItem int32 UNewState co.LVIS UOldState co.LVIS UChanged co.LVIF PtAction POINT LParam LPARAM UKeyFlags co.LVKF }
NMITEMACTIVATE struct.
type NMKEY ¶
type NMKEY struct { Hdr NMHDR // contains filtered or unexported fields }
NMKEY struct.
func (*NMKEY) ContextCode ¶
func (*NMKEY) IsExtendedKey ¶
func (*NMKEY) IsKeyDownBeforeSend ¶
func (*NMKEY) SetContextCode ¶
func (*NMKEY) SetIsExtendedKey ¶
func (*NMKEY) SetIsKeyDownBeforeSend ¶
func (*NMKEY) SetScanCode ¶
func (*NMKEY) SetTransitionState ¶
func (*NMKEY) TransitionState ¶
type NMLISTVIEW ¶
type NMLISTVIEW struct { Hdr NMHDR IItem int32 ISubItem int32 UNewState co.LVIS UOldState co.LVIS UChanged co.LVIF PtAction POINT LParam LPARAM }
NMLISTVIEW struct.
type NMLVCACHEHINT ¶
NMLVCACHEHINT struct.
type NMLVCUSTOMDRAW ¶
type NMLVCUSTOMDRAW struct { Nmcd NMCUSTOMDRAW ClrText COLORREF ClrTextBk COLORREF ISubItem int32 DwItemType co.LVCDI ClrFace COLORREF IIconEffect int32 IIconPhase int32 RcText RECT UAlign co.LVGA_HEADER // contains filtered or unexported fields }
NMLVCUSTOMDRAW struct.
func (*NMLVCUSTOMDRAW) PartStateId ¶
func (lcd *NMLVCUSTOMDRAW) PartStateId() co.VS
func (*NMLVCUSTOMDRAW) SetPartStateId ¶
func (lcd *NMLVCUSTOMDRAW) SetPartStateId(val co.VS)
type NMLVEMPTYMARKUP ¶
NMLVEMPTYMARKUP struct.
func (*NMLVEMPTYMARKUP) SetSzMarkup ¶
func (lve *NMLVEMPTYMARKUP) SetSzMarkup(val string)
func (*NMLVEMPTYMARKUP) SzMarkup ¶
func (lve *NMLVEMPTYMARKUP) SzMarkup() string
type NMLVFINDITEM ¶
type NMLVFINDITEM struct { Hdr NMHDR IStart int32 Lvfi LVFINDINFO }
NMLVFINDITEM struct.
type NMLVGETINFOTIP ¶
type NMLVGETINFOTIP struct { Hdr NMHDR DwFlags co.LVGIT IItem int32 ISubItem int32 LParam LPARAM // contains filtered or unexported fields }
NMLVGETINFOTIP struct.
func (*NMLVGETINFOTIP) PszText ¶
func (git *NMLVGETINFOTIP) PszText() []uint16
func (*NMLVGETINFOTIP) SetPszText ¶
func (git *NMLVGETINFOTIP) SetPszText(val []uint16)
type NMLVKEYDOWN ¶
NMLVKEYDOWN struct.
type NMLVODSTATECHANGE ¶
type NMLVODSTATECHANGE struct { Hdr NMHDR IFrom int32 ITo int32 UNewState co.LVIS UOldState co.LVIS }
NMLVODSTATECHANGE struct.
type NMMOUSE ¶
type NMMOUSE struct { Hdr NMHDR DwItemSpec uintptr // DWORD_PTR DwItemData uintptr // DWORD_PTR Pt POINT DwHitInfo LPARAM }
NMMOUSE struct.
type NMOBJECTNOTIFY ¶
type NMOBJECTNOTIFY struct { Hdr NMHDR IItem int32 Piid *GUID PObject uintptr // *IUnknown HResult errco.ERROR DwFlags uint32 }
NMOBJECTNOTIFY struct.
type NMSELCHANGE ¶
type NMSELCHANGE struct { Nmhdr NMHDR StSelStart SYSTEMTIME StSelEnd SYSTEMTIME }
NMSELCHANGE struct.
type NMTBCUSTOMDRAW ¶
type NMTBCUSTOMDRAW struct { Nmcd NMCUSTOMDRAW HbrMonoDither HBRUSH HbrLines HBRUSH HpenLines HPEN ClrText COLORREF ClrMark COLORREF ClrTextHighlight COLORREF ClrBtnFace COLORREF ClrBtnHighlight COLORREF ClrHighlightHotTrack COLORREF RcText RECT NStringBkMode co.BKMODE NHLStringBkMode co.BKMODE IListGap int32 }
NMTBCUSTOMDRAW struct.
type NMTBDISPINFO ¶
type NMTBDISPINFO struct { Hdr NMHDR DwMask co.TBNF IdCommand int32 LParam LPARAM IImage int32 // contains filtered or unexported fields }
NMTBDISPINFO struct.
func (*NMTBDISPINFO) PszText ¶
func (tdi *NMTBDISPINFO) PszText() []uint16
func (*NMTBDISPINFO) SetPszText ¶
func (tdi *NMTBDISPINFO) SetPszText(val []uint16)
type NMTBDUPACCELERATOR ¶
NMTBDUPACCELERATOR struct.
func (*NMTBDUPACCELERATOR) FDup ¶
func (da *NMTBDUPACCELERATOR) FDup() bool
func (*NMTBDUPACCELERATOR) SetFDup ¶
func (da *NMTBDUPACCELERATOR) SetFDup(val bool)
type NMTBGETINFOTIP ¶
type NMTBGETINFOTIP struct { Hdr NMHDR IItem int32 LParam LPARAM // contains filtered or unexported fields }
NMTBGETINFOTIP struct.
func (*NMTBGETINFOTIP) PszText ¶
func (git *NMTBGETINFOTIP) PszText() []uint16
func (*NMTBGETINFOTIP) SetPszText ¶
func (git *NMTBGETINFOTIP) SetPszText(val []uint16)
type NMTBHOTITEM ¶
NMTBHOTITEM struct.
type NMTBRESTORE ¶
type NMTBRESTORE struct { Hdr NMHDR PData *uint32 PCurrent *uint32 CbData uint32 IItem int32 CButtons int32 CbBytesPerRecord int32 TbButton TBBUTTON }
NMTBRESTORE struct.
type NMTBSAVE ¶
type NMTBSAVE struct { Hdr NMHDR PData *uint32 PCurrent *uint32 CbData uint32 IItem int32 CButtons int32 TbButton TBBUTTON }
NMTBSAVE struct.
type NMTBWRAPACCELERATOR ¶
NMTBWRAPACCELERATOR struct.
type NMTBWRAPHOTITEM ¶
NMTBWRAPHOTITEM struct.
type NMTOOLBAR ¶
type NMTOOLBAR struct { Hdr NMHDR IItem int32 TbButton TBBUTTON RcButton RECT // contains filtered or unexported fields }
NMTOOLBAR struct.
func (*NMTOOLBAR) SetPszText ¶
type NMTOOLTIPSCREATED ¶
NMTOOLTIPSCREATED struct.
type NMTRBTHUMBPOSCHANGING ¶
NMTRBTHUMBPOSCHANGING struct.
type NMTREEVIEW ¶
type NMTREEVIEW struct { Hdr NMHDR Action uint32 // co.TVE | co.TVC ItemOld TVITEM ItemNew TVITEM PtDrag POINT }
NMTREEVIEW struct.
type NMTVASYNCDRAW ¶
type NMTVASYNCDRAW struct { Hdr NMHDR Pimldp *IMAGELISTDRAWPARAMS Hr errco.ERROR // HRESULT Hitem HTREEITEM LParam LPARAM DwRetFlags co.ADRF IRetImageIndex int32 }
NMTVASYNCDRAW struct.
type NMTVCUSTOMDRAW ¶
type NMTVCUSTOMDRAW struct { Nmcd NMCUSTOMDRAW ClrText COLORREF ClrTextBk COLORREF ILevel int32 }
NMTVCUSTOMDRAW struct.
type NMTVGETINFOTIP ¶
type NMTVGETINFOTIP struct { Hdr NMHDR HItem HTREEITEM LParam LPARAM // contains filtered or unexported fields }
NMTVGETINFOTIP struct.
func (*NMTVGETINFOTIP) PszText ¶
func (git *NMTVGETINFOTIP) PszText() []uint16
func (*NMTVGETINFOTIP) SetPszText ¶
func (git *NMTVGETINFOTIP) SetPszText(val []uint16)
type NMTVITEMCHANGE ¶
type NMTVITEMCHANGE struct { Hdr NMHDR UChanged co.TVIF HItem HTREEITEM UStateNew co.TVIS UStateOld co.TVIS LParam LPARAM }
NMTVITEMCHANGE struct.
type NMTVKEYDOWN ¶
NMTVKEYDOWN struct.
type NMVIEWCHANGE ¶
NMVIEWCHANGE struct.
type NONCLIENTMETRICS ¶
type NONCLIENTMETRICS struct { IBorderWidth int32 IScrollWidth int32 IScrollHeight int32 ICaptionWidth int32 ICaptionHeight int32 LfCaptionFont LOGFONT ISmCaptionWidth int32 ISmCaptionHeight int32 LfSmCaptionFont LOGFONT IMenuWidth int32 IMenuHeight int32 LfMenuFont LOGFONT LfStatusFont LOGFONT LfMessageFont LOGFONT IPaddedBorderWidth int32 // contains filtered or unexported fields }
NONCLIENTMETRICS struct.
⚠️ You must call SetCbSize() to initialize the struct.
func (*NONCLIENTMETRICS) CbSize ¶
func (ncm *NONCLIENTMETRICS) CbSize() uint32
func (*NONCLIENTMETRICS) SetCbSize ¶
func (ncm *NONCLIENTMETRICS) SetCbSize()
type NOTIFYICONDATA ¶
type NOTIFYICONDATA struct { Hwnd HWND UID uint32 UFlags co.NIF UCallbackMessage co.WM HIcon HICON DwState co.NIS DwStateMask co.NIS UTimeoutVersion uint32 // union DwInfoFlags co.NIIF GuidItem GUID HBalloonIcon HICON // contains filtered or unexported fields }
NOTIFYICONDATA struct.
⚠️ You must call SetCbSize() to initialize the struct.
Example ¶
nic := &NOTIFYICONDATA{} nic.SetCbSize()
func (*NOTIFYICONDATA) SetCbSize ¶
func (nid *NOTIFYICONDATA) SetCbSize()
func (*NOTIFYICONDATA) SetSzInfo ¶
func (nid *NOTIFYICONDATA) SetSzInfo(val string)
func (*NOTIFYICONDATA) SetSzInfoTitle ¶
func (nid *NOTIFYICONDATA) SetSzInfoTitle(val string)
func (*NOTIFYICONDATA) SetSzTip ¶
func (nid *NOTIFYICONDATA) SetSzTip(val string)
func (*NOTIFYICONDATA) SzInfo ¶
func (nid *NOTIFYICONDATA) SzInfo() string
func (*NOTIFYICONDATA) SzInfoTitle ¶
func (nid *NOTIFYICONDATA) SzInfoTitle() string
func (*NOTIFYICONDATA) SzTip ¶
func (nid *NOTIFYICONDATA) SzTip() string
type NumInf ¶
type NumInf struct {
// contains filtered or unexported fields
}
Variant type for a number which can be INFINITE (defined in Windows headers as -1).
Example: ¶
num := win.NumInfNumeric(100) inf := win.NumInfInfinite()
func NumInfInfinite ¶
func NumInfInfinite() NumInf
Creates a new NumInf variant with an INFINITE value.
func NumInfNumeric ¶
Creates a new NumInf variant with a numeric value.
func (*NumInf) IsInfinite ¶
Returns true if the current value is INFINITE.
type OSVERSIONINFOEX ¶
type OSVERSIONINFOEX struct { DwMajorVersion uint32 DwMinorVersion uint32 DwBuildNumber uint32 DWPlatformId uint32 WServicePackMajor uint16 WServicePackMinor uint16 WSuiteMask co.VER_SUITE WProductType uint8 // contains filtered or unexported fields }
OSVERSIONINFOEX struct.
⚠️ You must call SetDwOsVersionInfoSize() to initialize the struct.
func (*OSVERSIONINFOEX) SetDwOsVersionInfoSize ¶
func (osv *OSVERSIONINFOEX) SetDwOsVersionInfoSize()
func (*OSVERSIONINFOEX) SetSzCSDVersion ¶
func (osv *OSVERSIONINFOEX) SetSzCSDVersion(val string)
func (*OSVERSIONINFOEX) SzCSDVersion ¶
func (osv *OSVERSIONINFOEX) SzCSDVersion() string
type OVERLAPPED ¶
OVERLAPPED struct.
type PAINTSTRUCT ¶
PAINTSTRUCT struct.
func (*PAINTSTRUCT) FErase ¶
func (ps *PAINTSTRUCT) FErase() bool
func (*PAINTSTRUCT) SetFErase ¶
func (ps *PAINTSTRUCT) SetFErase(val bool)
type POINT ¶
type POINT struct {
X, Y int32
}
POINT struct.
Basic point structure, with x and y coordinates.
type POWERBROADCAST_SETTING ¶
type POWERBROADCAST_SETTING struct { PowerSetting GUID DataLength uint32 // contains filtered or unexported fields }
POWERBROADCAST_SETTING struct.
func (*POWERBROADCAST_SETTING) Data ¶
func (pbs *POWERBROADCAST_SETTING) Data(i int) *uint8
type PROCESSENTRY32 ¶
type PROCESSENTRY32 struct { Th32ProcessID uint32 CntThreads uint32 Th32ParentProcessID uint32 PcPriClassBase int32 // contains filtered or unexported fields }
PROCESSENTRY32 struct.
⚠️ You must call SetDwSize() to initialize the struct.
func (*PROCESSENTRY32) SetDwSize ¶
func (pe *PROCESSENTRY32) SetDwSize()
func (*PROCESSENTRY32) SetSzExeFile ¶
func (me *PROCESSENTRY32) SetSzExeFile(val string)
func (*PROCESSENTRY32) SzExeFile ¶
func (me *PROCESSENTRY32) SzExeFile() string
type PROCESS_INFORMATION ¶
type PROCESS_INFORMATION struct { HProcess HPROCESS HThread HTHREAD DwProcessId uint32 DwThreadId uint32 }
PROCESS_INFORMATION struct.
type RECT ¶
type RECT struct {
Left, Top, Right, Bottom int32
}
RECT struct.
Basic rectangle structure, with left, top, right and bottom values.
type RGBQUAD ¶
type RGBQUAD struct {
// contains filtered or unexported fields
}
RGBQUAD struct.
func (*RGBQUAD) ToColorref ¶
type RegVal ¶
type RegVal struct {
// contains filtered or unexported fields
}
Variant type for a Registry value.
Example ¶
regVal := RegValSz("Some text") if val, ok := regVal.Sz(); ok { println(val) }
func RegValBinary ¶
Creates a new RegVal variant with a co.REG_BINARY value.
func RegValDword ¶
Creates a new RegVal variant with a co.REG_DWORD value.
func RegValExpandSz ¶
Creates a new RegVal variant with a co.REG_EXPAND_SZ value.
When the value is retrieved, the environment variables should be expanded with ExpandEnvironmentStrings function.
func RegValQword ¶
Creates a new RegVal variant with a co.REG_QWORD value.
func (*RegVal) Binary ¶
If the current value is co.REG_BINARY, returns it and true; otherwise nil and false.
Example: ¶
regVal := win.RegValBinary([]byte{0x10, 0x44}) if val, ok := regVal.Binary(); ok { println(len(val)) }
func (*RegVal) Dword ¶
If the current value is co.REG_DWORD, returns it and true; otherwise 0 and false.
Example: ¶
regVal := RegValDword(0x8000_1001) if val, ok := regVal.Dword(); ok { println(val) }
func (*RegVal) ExpandSz ¶
If the current value is co.REG_EXPAND_SZ, returns it and true; otherwise "" and false.
Environment variables can be expanded with ExpandEnvironmentStrings function.
Example: ¶
regVal := RegValExpandSz("Some text") if val, ok := regVal.ExpandSz(); ok { println(ExpandEnvironmentStrings(val)) }
func (*RegVal) Qword ¶
If the current value is co.REG_QWORD, returns it and true; otherwise 0 and false.
Example: ¶
regVal := RegValQword(0x8000_3303_0000_1001) if val, ok := regVal.Qword(); ok { println(val) }
type ResId ¶
type ResId struct {
// contains filtered or unexported fields
}
Variant type for a resource identifier.
Example: ¶
resId := win.ResIdInt(0x400) if id, ok := resId.Id(); ok { println(id) }
type ResourceInfo ¶
type ResourceInfo struct {
// contains filtered or unexported fields
}
High-level abstraction to an embedded resource, which can be loaded from an executable of DLL file.
Created with ResourceInfoLoad().
func ResourceInfoLoad ¶
func ResourceInfoLoad(exePath string) (*ResourceInfo, error)
Reads and stores an embedded resource from an executable or DLL file.
Example ¶
resNfo, _ := win.ResourceInfoLoad(win.HINSTANCE(0).GetModuleFileName()) verNfo, _ := resNfo.FixedFileInfo() vMaj, vMin, vPat, _ := verNfo.ProductVersion() // like 1.0.0 blocks := resNfo.Blocks() // each block contains one language productName, _ := blocks[0].ProductName() companyName, _ := blocks[0].CompanyName()
func (*ResourceInfo) Blocks ¶
func (me *ResourceInfo) Blocks() []ResourceInfoBlock
Returns the string information blocks, one per language and code page, which contain several strings.
func (*ResourceInfo) FixedFileInfo ¶
func (me *ResourceInfo) FixedFileInfo() (*VS_FIXEDFILEINFO, bool)
Returns the VS_FIXEDFILEINFO struct, which contains version information.
func (*ResourceInfo) ProductVersion ¶
func (me *ResourceInfo) ProductVersion() (major, minor, patch, build uint16)
Calls ResourceInfo.FixedFileInfo() and automatically retrieves the product version, or all zeros if not available.
type ResourceInfoBlock ¶
type ResourceInfoBlock struct {
// contains filtered or unexported fields
}
A block of information retrieved by ResourceInfo.
func (*ResourceInfoBlock) CodePage ¶
func (me *ResourceInfoBlock) CodePage() co.CP
func (*ResourceInfoBlock) Comments ¶
func (me *ResourceInfoBlock) Comments() (string, bool)
func (*ResourceInfoBlock) CompanyName ¶
func (me *ResourceInfoBlock) CompanyName() (string, bool)
func (*ResourceInfoBlock) FileDescription ¶
func (me *ResourceInfoBlock) FileDescription() (string, bool)
func (*ResourceInfoBlock) FileVersion ¶
func (me *ResourceInfoBlock) FileVersion() (string, bool)
func (*ResourceInfoBlock) InternalName ¶
func (me *ResourceInfoBlock) InternalName() (string, bool)
func (*ResourceInfoBlock) LangId ¶
func (me *ResourceInfoBlock) LangId() LANGID
func (*ResourceInfoBlock) LegalCopyright ¶
func (me *ResourceInfoBlock) LegalCopyright() (string, bool)
func (*ResourceInfoBlock) LegalTrademarks ¶
func (me *ResourceInfoBlock) LegalTrademarks() (string, bool)
func (*ResourceInfoBlock) OriginalFilename ¶
func (me *ResourceInfoBlock) OriginalFilename() (string, bool)
func (*ResourceInfoBlock) PrivateBuild ¶
func (me *ResourceInfoBlock) PrivateBuild() (string, bool)
func (*ResourceInfoBlock) ProductName ¶
func (me *ResourceInfoBlock) ProductName() (string, bool)
func (*ResourceInfoBlock) ProductVersion ¶
func (me *ResourceInfoBlock) ProductVersion() (string, bool)
func (*ResourceInfoBlock) SpecialBuild ¶
func (me *ResourceInfoBlock) SpecialBuild() (string, bool)
type RsrcType ¶
type RsrcType struct {
// contains filtered or unexported fields
}
Variant type for a resource type.
Example: ¶
rsrcTy := win.RsrcTypeRt(co.RT_ACCELERATOR)
func RsrcTypeRt ¶
Creates a new RsrcType variant with a co.RT value.
func RsrcTypeStr ¶
Creates a new RsrcType variant with a string value.
type SCROLLINFO ¶
type SCROLLINFO struct { FMask co.SIF NMin uint32 NMax uint32 NPage uint32 NPos int32 NTrackPos int32 // contains filtered or unexported fields }
SCROLLINFO struct.
⚠️ You must call SetCbSize() to initialize the struct.
func (*SCROLLINFO) SetCbSize ¶
func (si *SCROLLINFO) SetCbSize()
type SECURITY_ATTRIBUTES ¶
type SECURITY_ATTRIBUTES struct { LpSecurityDescriptor uintptr // LPVOID // contains filtered or unexported fields }
SECURITY_ATTRIBUTES struct.
⚠️ You must call SetNLength() to initialize the struct.
func (*SECURITY_ATTRIBUTES) BInheritHandle ¶
func (sa *SECURITY_ATTRIBUTES) BInheritHandle() bool
func (*SECURITY_ATTRIBUTES) SetBInheritHandle ¶
func (sa *SECURITY_ATTRIBUTES) SetBInheritHandle(val bool)
func (*SECURITY_ATTRIBUTES) SetNLength ¶
func (sa *SECURITY_ATTRIBUTES) SetNLength()
type SECURITY_QUALITY_OF_SERVICE ¶
type SECURITY_QUALITY_OF_SERVICE struct { ImpersonationLevel co.SECURITY_IMPERSONATION_LEVEL // contains filtered or unexported fields }
SECURITY_QUALITY_OF_SERVICE struct.
⚠️ You must call SetLength() to initialize the struct.
func (*SECURITY_QUALITY_OF_SERVICE) ContextTrackingMode ¶
func (qs *SECURITY_QUALITY_OF_SERVICE) ContextTrackingMode() bool
func (*SECURITY_QUALITY_OF_SERVICE) EffectiveOnly ¶
func (qs *SECURITY_QUALITY_OF_SERVICE) EffectiveOnly() bool
func (*SECURITY_QUALITY_OF_SERVICE) SetContextTrackingMode ¶
func (qs *SECURITY_QUALITY_OF_SERVICE) SetContextTrackingMode(val bool)
func (*SECURITY_QUALITY_OF_SERVICE) SetEffectiveOnly ¶
func (qs *SECURITY_QUALITY_OF_SERVICE) SetEffectiveOnly(val bool)
func (*SECURITY_QUALITY_OF_SERVICE) SetLength ¶
func (qs *SECURITY_QUALITY_OF_SERVICE) SetLength()
type SHFILEINFO ¶
type SHFILEINFO struct { HIcon HICON IIcon int32 DwAttributes co.SFGAO // contains filtered or unexported fields }
SHFILEINFO struct.
func (*SHFILEINFO) SetSzDisplayName ¶
func (shf *SHFILEINFO) SetSzDisplayName(val string)
func (*SHFILEINFO) SetSzTypeName ¶
func (shf *SHFILEINFO) SetSzTypeName(val string)
func (*SHFILEINFO) SzDisplayName ¶
func (shf *SHFILEINFO) SzDisplayName() string
func (*SHFILEINFO) SzTypeName ¶
func (shf *SHFILEINFO) SzTypeName() string
type SIZE ¶
type SIZE struct {
Cx, Cy int32
}
SIZE struct.
Basic area size structure, with cx and cy values.
type STARTUPINFO ¶
type STARTUPINFO struct { LpDesktop *uint16 LpTitle *uint16 DwX uint32 DwY uint32 DwXSize uint32 DwYSize uint32 DwXCountChars uint32 DwYCountChars uint32 DwFillAttribute uint32 DwFlags co.STARTF WShowWindow uint16 // co.SW, should be uint16. HStdInput uintptr HStdOutput uintptr HStdError uintptr // contains filtered or unexported fields }
STARTUPINFO struct.
⚠️ You must call SetCb() to initialize the struct.
func (*STARTUPINFO) SetCb ¶
func (si *STARTUPINFO) SetCb()
type STYLESTRUCT_WS ¶
STYLESTRUCT for WS styles.
type STYLESTRUCT_WSEX ¶
STYLESTRUCT for WS_EX styles.
type SYSTEMTIME ¶
type SYSTEMTIME struct { WYear uint16 WMonth uint16 WDayOfWeek uint16 WDay uint16 WHour uint16 WMinute uint16 WSecond uint16 WMilliseconds uint16 }
SYSTEMTIME struct.
Can be converted to FILETIME with SystemTimeToFileTime function.
func (*SYSTEMTIME) FromDuration ¶
func (st *SYSTEMTIME) FromDuration(dur time.Duration)
Decomposes a time.Duration into this SYSTEMTIME fields.
func (*SYSTEMTIME) FromTime ¶
func (st *SYSTEMTIME) FromTime(val time.Time)
Fills this SYSTEMTIME with the value of a time.Time.
func (*SYSTEMTIME) ToTime ¶
func (st *SYSTEMTIME) ToTime() time.Time
Converts this SYSTEMTIME to time.Time.
type SYSTEM_INFO ¶
type SYSTEM_INFO struct { WProcessorArchitecture co.PROCESSOR_ARCHITECTURE DwPageSize uint32 LpMinimumApplicationAddress uintptr LpMaximumApplicationAddress uintptr DwActiveProcessorMask uintptr DwNumberOfProcessors uint32 DwProcessorType co.PROCESSOR DwAllocationGranularity uint32 WProcessorLevel uint16 WProcessorRevision uint16 // contains filtered or unexported fields }
SYSTEM_INFO struct.
type StrOpt ¶
type StrOpt struct {
// contains filtered or unexported fields
}
Variant type for an optional string value.
Example: ¶
realStr := win.StrOptSome("foo") if s, ok := realStr.Str(); ok { println(s) } fakeStr := win.StrOptNone()
type TASKDIALOGCONFIG ¶
type TASKDIALOGCONFIG struct { HwndParent HWND HInstance HINSTANCE DwFlags co.TDF DwCommonButtons co.TDCBF PszWindowTitle string HMainIcon TdcIcon // Union PCWSTR + HICON, but string resource won't be considered. PszMainInstruction string PszContent string PButtons []TASKDIALOG_BUTTON NDefaultButton int32 PRadioButtons []TASKDIALOG_BUTTON NDefaultRadioButton int32 PszVerificationText string PszExpandedInformation string PszExpandedControlText string PszCollapsedControlText string PfCallback uintptr LpCallbackData uintptr CxWidth uint32 }
TASKDIALOGCONFIG struct.
Note that this struct is originally packed, so we must serialized it before using it.
type TASKDIALOG_BUTTON ¶
TASKDIALOG_BUTTON struct.
Note that this struct is originally packed, so we must serialized it before using it.
type TBBUTTON ¶
type TBBUTTON struct { IdCommand int32 FsState co.TBSTATE FsStyle co.BTNS DwData uintptr IString *uint16 // can also be the index in the string list // contains filtered or unexported fields }
TBBUTTON struct.
func (*TBBUTTON) SetIBitmap ¶
type TBBUTTONINFO ¶
type TBBUTTONINFO struct { DwMask co.TBIF IdCommand int32 IImage int32 FsState co.TBSTATE FsStyle co.BTNS Cx uint16 LParam LPARAM // DWORD_PTR // contains filtered or unexported fields }
TBBUTTONINFO struct.
⚠️ You must call SetCbSize() to initialize the struct.
Example: ¶
tbbi := &TBBUTTONINFO{} tbbi.SetCbSize()
func (*TBBUTTONINFO) PszText ¶
func (tbi *TBBUTTONINFO) PszText() []uint16
func (*TBBUTTONINFO) SetCbSize ¶
func (tbi *TBBUTTONINFO) SetCbSize()
func (*TBBUTTONINFO) SetPszText ¶
func (tbi *TBBUTTONINFO) SetPszText(val []uint16)
type TEXTMETRIC ¶
type TEXTMETRIC struct { TmHeight uint32 TmAscent uint32 TmDescent uint32 TmInternalLeading uint32 TmExternalLeading uint32 TmAveCharWidth uint32 TmMaxCharWidth uint32 TmWeight uint32 TmOverhang uint32 TmDigitizedAspectX uint32 TmDigitizedAspectY uint32 TmFirstChar uint16 TmLastChar uint16 TmDefaultChar uint16 TmBreakChar uint16 TmItalic uint8 TmUnderlined uint8 TmStruckOut uint8 TmPitchAndFamily uint8 TmCharSet co.CHARSET }
TEXTMETRIC struct.
type THREADENTRY32 ¶
type THREADENTRY32 struct { Th32ThreadID uint32 Th32OwnerProcessID uint32 TpBasePri int32 // contains filtered or unexported fields }
THREADENTRY32 struct.
⚠️ You must call SetDwSize() to initialize the struct.
func (*THREADENTRY32) SetDwSize ¶
func (te *THREADENTRY32) SetDwSize()
type TIME_ZONE_INFORMATION ¶
type TIME_ZONE_INFORMATION struct { Bias int32 StandardDate SYSTEMTIME StandardBias int32 DaylightDate SYSTEMTIME DaylightBias int32 // contains filtered or unexported fields }
TIME_ZONE_INFORMATION struct.
func (*TIME_ZONE_INFORMATION) DaylightName ¶
func (tzi *TIME_ZONE_INFORMATION) DaylightName() string
func (*TIME_ZONE_INFORMATION) SetDaylightName ¶
func (tzi *TIME_ZONE_INFORMATION) SetDaylightName(val string)
func (*TIME_ZONE_INFORMATION) SetStandardName ¶
func (tzi *TIME_ZONE_INFORMATION) SetStandardName(val string)
func (*TIME_ZONE_INFORMATION) StandardName ¶
func (tzi *TIME_ZONE_INFORMATION) StandardName() string
type TITLEBARINFOEX ¶
type TITLEBARINFOEX struct { RcTitleBar RECT Rgstate [_CCHILDREN_TITLEBAR + 1]uint32 Rgrect [_CCHILDREN_TITLEBAR + 1]RECT // contains filtered or unexported fields }
TITLEBARINFOEX struct.
⚠️ You must call SetCbSize() to initialize the struct.
func (*TITLEBARINFOEX) SetCbSize ¶
func (tix *TITLEBARINFOEX) SetCbSize()
type TOKEN_ELEVATION ¶
type TOKEN_ELEVATION struct {
// contains filtered or unexported fields
}
TOKEN_ELEVATION struct.
func (*TOKEN_ELEVATION) TokenIsElevated ¶
func (te *TOKEN_ELEVATION) TokenIsElevated() bool
type TOKEN_LINKED_TOKEN ¶
type TOKEN_LINKED_TOKEN struct {
LinkedToken HACCESSTOKEN
}
TOKEN_LINKED_TOKEN struct.
type TOKEN_MANDATORY_POLICY ¶
type TOKEN_MANDATORY_POLICY struct {
Policy co.TOKEN_POLICY
}
TOKEN_MANDATORY_POLICY struct.
type TVINSERTSTRUCT ¶
TVINSERTSTRUCT struct.
type TVITEM ¶
type TVITEM struct { Mask co.TVIF HItem HTREEITEM State co.TVIS StateMask co.TVIS IImage int32 ISelectedImage int32 CChildren co.TVI_CHILDREN LParam LPARAM // contains filtered or unexported fields }
TVITEM struct.
func (*TVITEM) SetPszText ¶
type TVITEMEX ¶
type TVITEMEX struct { Mask co.TVIF HItem HTREEITEM State co.TVIS StateMask co.TVIS IImage int32 ISelectedImage int32 CChildren co.TVI_CHILDREN LParam LPARAM IIntegral int32 UStateEx co.TVIS_EX Hwnd HWND IExpandedImage int32 // contains filtered or unexported fields }
TVITEMEX struct.
func (*TVITEMEX) SetPszText ¶
type TdcIcon ¶
type TdcIcon struct {
// contains filtered or unexported fields
}
Variant type for an icon identifier for TASKDIALOGCONFIG.
Example ¶
ico := TdcIconTdi(co.TD_ICON_ERROR) if tdi, ok := ico.Tdi(); ok { println(tdi) }
func TdcIconHicon ¶
Creates a new TdcIcon variant with an HICON value.
func TdcIconTdi ¶
Creates a new TdcIcon variant with a co.TD_ICON value.
type VS_FIXEDFILEINFO ¶
type VS_FIXEDFILEINFO struct { DwSignature uint32 DwStrucVersion uint32 DwFileFlagsMask co.VS_FF DwFileFlags co.VS_FF DwFileOS co.VOS DwFileType co.VFT DwFileSubtype co.VFT2 // contains filtered or unexported fields }
VS_FIXEDFILEINFO struct.
func (*VS_FIXEDFILEINFO) FileDate ¶
func (ffi *VS_FIXEDFILEINFO) FileDate() uint64
func (*VS_FIXEDFILEINFO) FileVersion ¶
func (ffi *VS_FIXEDFILEINFO) FileVersion() (major, minor, patch, build uint16)
func (*VS_FIXEDFILEINFO) ProductVersion ¶
func (ffi *VS_FIXEDFILEINFO) ProductVersion() (major, minor, patch, build uint16)
func (*VS_FIXEDFILEINFO) SetFileDate ¶
func (ffi *VS_FIXEDFILEINFO) SetFileDate(val uint64)
func (*VS_FIXEDFILEINFO) SetFileVersion ¶
func (ffi *VS_FIXEDFILEINFO) SetFileVersion(major, minor, patch, build uint16)
func (*VS_FIXEDFILEINFO) SetProductVersion ¶
func (ffi *VS_FIXEDFILEINFO) SetProductVersion(major, minor, patch, build uint16)
type WIN32_FIND_DATA ¶
type WIN32_FIND_DATA struct { DwFileAttributes co.FILE_ATTRIBUTE FtCreationTime FILETIME FtLastAccessTime FILETIME FtLastWriteTime FILETIME NFileSizeHigh uint32 NFileSizeLow uint32 DwFileType uint32 DwCreatorType uint32 WFinderFlags uint16 // contains filtered or unexported fields }
WIN32_FIND_DATA struct.
func (*WIN32_FIND_DATA) CAlternateFileName ¶
func (wfd *WIN32_FIND_DATA) CAlternateFileName() string
func (*WIN32_FIND_DATA) CFileName ¶
func (wfd *WIN32_FIND_DATA) CFileName() string
func (*WIN32_FIND_DATA) SetCAlternateFileName ¶
func (wfd *WIN32_FIND_DATA) SetCAlternateFileName(val string)
func (*WIN32_FIND_DATA) SetCFileName ¶
func (wfd *WIN32_FIND_DATA) SetCFileName(val string)
type WNDCLASSEX ¶
type WNDCLASSEX struct { Style co.CS LpfnWndProc uintptr // WNDPROC CbClsExtra int32 CbWndExtra int32 HInstance HINSTANCE HIcon HICON HCursor HCURSOR HbrBackground HBRUSH LpszMenuName uintptr LpszClassName *uint16 HIconSm HICON // contains filtered or unexported fields }
WNDCLASSEX struct.
⚠️ You must call SetCbSize() to initialize the struct.
func (*WNDCLASSEX) SetCbSize ¶
func (wcx *WNDCLASSEX) SetCbSize()
Source Files ¶
- abst_File.go
- abst_FileMapped.go
- abst_Ini.go
- abst_Path.go
- abst_ResourceInfo.go
- abst_Str.go
- funcs_advapi.go
- funcs_comctl.go
- funcs_comdlg.go
- funcs_dwmapi.go
- funcs_gdi.go
- funcs_kernel.go
- funcs_kernel_amd64.go
- funcs_shell.go
- funcs_user.go
- funcs_uxtheme.go
- funcs_version.go
- haccel_user.go
- haccesstoken_advapi.go
- hbitmap_gdi.go
- hbrush__hlp.go
- hbrush_gdi.go
- hclipboard__hlp.go
- hclipboard_user.go
- hcursor_user.go
- hdc__hlp.go
- hdc_gdi.go
- hdc_user.go
- hdde_user.go
- hdrop__hlp.go
- hdrop_shell.go
- hdwp_user.go
- hfile_kernel.go
- hfind_kernel.go
- hfont_gdi.go
- hgdiobj_gdi.go
- hgdiobj_user.go
- hglobal__hlp.go
- hglobal_kernel.go
- hheap_kernel.go
- hhook_user.go
- hicon_shell.go
- hicon_user.go
- himagelist__hlp.go
- himagelist_comctl.go
- hinstance_kernel.go
- hinstance_shell.go
- hinstance_user.go
- hkey_advapi.go
- hlocal_kernel.go
- hmenu__hlp.go
- hmenu_user.go
- hmonitor_user.go
- hpen_gdi.go
- hpipe_kernel.go
- hprocess_advapi.go
- hprocess_kernel.go
- hprocess_user.go
- hprocsnapshot__hlp.go
- hprocsnapshot_kernel.go
- hrgn_gdi.go
- hstdhandle_kernel.go
- htaskmem_ole.go
- htheme_uxtheme.go
- hthread_kernel.go
- hwnd__hlp.go
- hwnd_comctl.go
- hwnd_dwmapi.go
- hwnd_shell.go
- hwnd_user.go
- hwnd_uxtheme.go
- privs.go
- structs_advapi.go
- structs_comctl.go
- structs_comdlgs.go
- structs_gdi.go
- structs_kernel.go
- structs_ole.go
- structs_shell.go
- structs_user.go
- structs_uxtheme.go
- structs_version.go
- types_kernel.go
- types_user.go
- variants_advapi.go
- variants_comctl.go
- variants_kernel.go
- variants_user.go