Documentation
¶
Overview ¶
Package app 程序(炫彩全局API).
Index ¶
- func AddFileSearchPath(path string)
- func AddType(hXCGUI int, nType xcc.XC_OBJECT_TYPE)
- func Alert(title string, text string)
- func AnsiToUnicode(pIn uintptr, inLen int32, pOut *string, outLen int32) int32
- func AtoUtf8(value uintptr) uintptr
- func AtoW(value uintptr) string
- func Auto(f func())
- func AutoAny(f func(data ...interface{}) int, data ...interface{}) int
- func AutoInt(f func(data int) int, data int) int
- func BindData(hXCGUI int, data int)
- func CallUT(f func())
- func CallUTAny(f func(data ...interface{}) int, data ...interface{}) int
- func CallUiThread(pCall func(data int) int, data int) int
- func CallUiThreadEx(pCall func(data int) int, data int) int
- func CallUiThreader(u xc.UiThreader, data int) int
- func CombineRect(pDest *xc.RECT, pSrc1 *xc.RECT, pSrc2 *xc.RECT)
- func DebugToFileInfo(info string)
- func DeleteDll() error
- func EnableAutoDPI(bEnable ...bool)
- func EnableAutoExitApp(bEnable ...bool)
- func EnableAutoRedrawUI(bEnable ...bool)
- func EnableDPI(bEnable ...bool) bool
- func EnableDebugFile(bEnable ...bool)
- func EnableErrorMessageBox(bEnable ...bool)
- func EnableGdiDrawText(bEnable ...bool)
- func EnableResMonitor(bEnable ...bool)
- func EnableWindowSysNc(bEnable ...bool)
- func Free(p uintptr)
- func FreeLibrary(hModule uintptr) bool
- func GetBindData(hXCGUI int) int
- func GetD2dFactory() uintptr
- func GetDWriteFactory() uintptr
- func GetDefaultFont() int
- func GetDefaultFontObj() *font.Font
- func GetHandleCount() int32
- func GetObjectByID(hWindow int, nID int32) int
- func GetObjectByIDName(hWindow int, name string) int
- func GetObjectByName(name string) int
- func GetObjectByUID(nUID int32) int
- func GetObjectByUIDName(name string) int
- func GetObjectType(hXCGUI int) xcc.XC_OBJECT_TYPE
- func GetProcAddress(hModule uintptr, procName string) uintptr
- func GetProperty(hXCGUI int, name string) string
- func GetTextShowRect(str string, length int32, hFontX int, nTextAlign xcc.TextFormatFlag_, ...)
- func GetTextShowSize(str string, length int32, hFontX int, pOutSize *xc.SIZE)
- func GetTextShowSizeEx(str string, length int32, hFontX int, nTextAlign xcc.TextFormatFlag_, ...)
- func GetTextSize(str string, length int32, hFontX int, pOutSize *xc.SIZE)
- func GetWicFactory() uintptr
- func HWindowFromHWnd(hWnd uintptr) int
- func Init() error
- func InitFont(pFont *xc.LOGFONTW, name string, size int32, bBold bool, bItalic bool, ...)
- func InitOrExit()
- func IsEnableD2D() bool
- func IsHELE(hEle int) bool
- func IsHWINDOW(hWindow int) bool
- func IsHXCGUI(hXCGUI int, nType xcc.XC_OBJECT_TYPE) bool
- func IsInit() bool
- func IsSViewExtend(hEle int) bool
- func IsShape(hShape int) bool
- func IsUiThread() bool
- func LoadDll(dllFileName string) uintptr
- func LoadItemTemplate(nType xcc.ListItemTemp_Type_, fileName string) int
- func LoadItemTemplateEx(nType xcc.ListItemTemp_Type_, fileName string, pOutTemp1 *int, pOutTemp2 *int) bool
- func LoadItemTemplateFromMem(nType xcc.ListItemTemp_Type_, data []byte) int
- func LoadItemTemplateFromMemEx(nType xcc.ListItemTemp_Type_, data []byte, pOutTemp1 *int, pOutTemp2 *int) bool
- func LoadItemTemplateFromString(nType xcc.ListItemTemp_Type_, xmlStr string) int
- func LoadItemTemplateFromStringEx(nType xcc.ListItemTemp_Type_, xmlStr string, pOutTemp1 *int, pOutTemp2 *int) bool
- func LoadItemTemplateObjEx(nType xcc.ListItemTemp_Type_, fileName string) (*tmpl.ListItemTemplate, *tmpl.ListItemTemplate)
- func LoadItemTemplateObjFromMemEx(nType xcc.ListItemTemp_Type_, data []byte) (*tmpl.ListItemTemplate, *tmpl.ListItemTemplate)
- func LoadItemTemplateObjFromStringEx(nType xcc.ListItemTemp_Type_, xmlStr string) (*tmpl.ListItemTemplate, *tmpl.ListItemTemplate)
- func LoadItemTemplateObjZipEx(nType xcc.ListItemTemp_Type_, zipFile string, fileName string, ...) (*tmpl.ListItemTemplate, *tmpl.ListItemTemplate)
- func LoadItemTemplateObjZipMemEx(nType xcc.ListItemTemp_Type_, data []byte, fileName string, password ...string) (*tmpl.ListItemTemplate, *tmpl.ListItemTemplate)
- func LoadItemTemplateObjZipResEx(nType xcc.ListItemTemp_Type_, id int32, fileName string, password string, ...) (*tmpl.ListItemTemplate, *tmpl.ListItemTemplate)
- func LoadItemTemplateZip(nType xcc.ListItemTemp_Type_, zipFile string, fileName string, ...) int
- func LoadItemTemplateZipEx(nType xcc.ListItemTemp_Type_, zipFile string, fileName string, password string, ...) bool
- func LoadItemTemplateZipMem(nType xcc.ListItemTemp_Type_, data []byte, fileName string, password ...string) int
- func LoadItemTemplateZipMemEx(nType xcc.ListItemTemp_Type_, data []byte, fileName string, password string, ...) bool
- func LoadItemTemplateZipRes(nType xcc.ListItemTemp_Type_, id int32, fileName string, password string, ...) int
- func LoadItemTemplateZipResEx(nType xcc.ListItemTemp_Type_, id int32, fileName string, password string, ...) bool
- func LoadLayout(fileName string, hParent int, hAttachWnd ...uintptr) int
- func LoadLayoutEx(fileName, prefixName string, hParent int, hParentWnd uintptr, ...) int
- func LoadLayoutFromStringW(xmlStr string, hParent int, hAttachWnd ...uintptr) int
- func LoadLayoutFromStringWEx(xmlStr, prefixName string, hParent int, hParentWnd uintptr, ...) int
- func LoadLayoutZip(zipFileName string, fileName string, password string, hParent int, ...) int
- func LoadLayoutZipEx(zipFileName string, fileName string, password, prefixName string, hParent int, ...) int
- func LoadLayoutZipMem(data []byte, fileName string, password string, hParent int, ...) int
- func LoadLayoutZipMemEx(data []byte, fileName string, password, prefixName string, hParent int, ...) int
- func LoadLayoutZipResEx(id int32, fileName string, password, prefixName string, hParent int, ...) int
- func LoadLayout_Create(data, propertylist int, uiType xcc.XC_OBJECT_TYPE, hParent int) int
- func LoadLibrary(fileName string) uintptr
- func LoadResource(fileName string) bool
- func LoadResourceFromStringW(xmlStr string, fileName string) bool
- func LoadResourceZip(zipFileName string, fileName string, password ...string) bool
- func LoadResourceZipMem(data []byte, fileName string, password ...string) bool
- func LoadResourceZipRes(id int32, fileName string, password string, hModule ...uintptr) bool
- func LoadStyle(fileName string) bool
- func LoadStyleFromStringW(fileName string, str string) bool
- func LoadStyleZip(zipFile string, fileName string, password ...string) bool
- func LoadStyleZipMem(data []byte, fileName string, password ...string) bool
- func LoadStyleZipRes(id int32, fileName string, password string, hModule ...uintptr) bool
- func Malloc(size int32) uintptr
- func MessageBox(title, text string, nFlags xcc.MessageBox_Flag_, hWndParent uintptr, ...) xcc.MessageBox_Flag_
- func Msg_Create(title, text string, nFlags xcc.MessageBox_Flag_, hWndParent uintptr, ...) int
- func Msg_CreateEx(dwExStyle xcc.WS_EX_, dwStyle xcc.WS_, className string, title, text string, ...) int
- func NewBkManager() *bkmanager.BkManager
- func NewBkManagerByHandle(handle int) *bkmanager.BkManager
- func NewBkManagerByName(name string) *bkmanager.BkManager
- func NewBkObjByHandle(handle int) *bkobj.BkObj
- func NewDraw(hWindow int) *drawx.Draw
- func NewDrawByHandle(handle int) *drawx.Draw
- func NewDrawGDI(hWindow int, hdc uintptr) *drawx.Draw
- func NewFont(size int32) *font.Font
- func NewFontByFile(fontFile string, size int32, style xcc.FontStyle_) *font.Font
- func NewFontByFont(pFont uintptr) *font.Font
- func NewFontByHFONT(hFont uintptr) *font.Font
- func NewFontByHandle(handle int) *font.Font
- func NewFontByLOGFONTW(pFontInfo *xc.LOGFONTW) *font.Font
- func NewFontByMem(data []byte, fontSize int32, style xcc.FontStyle_) *font.Font
- func NewFontByName(name string) *font.Font
- func NewFontByRes(id int32, Type string, fontSize int32, style xcc.FontStyle_, hModule uintptr) *font.Font
- func NewFontByZip(zipFileName, fileName, password string, fontSize int32, style xcc.FontStyle_) *font.Font
- func NewFontByZipMem(data []byte, fileName, password string, fontSize int32, style xcc.FontStyle_) *font.Font
- func NewFontEX(name string, size int32, style xcc.FontStyle_) *font.Font
- func NewImageByExtractIcon(fileName string) *imagex.Image
- func NewImageByFile(fileName string) *imagex.Image
- func NewImageByFileAdaptive(fileName string, leftSize, topSize, rightSize, bottomSize int32) *imagex.Image
- func NewImageByFileRect(fileName string, x, y, cx, cy int32) *imagex.Image
- func NewImageByHBITMAP(hBitmap uintptr) *imagex.Image
- func NewImageByHICON(hIcon uintptr) *imagex.Image
- func NewImageByHandle(handle int) *imagex.Image
- func NewImageByImage(pImage uintptr) *imagex.Image
- func NewImageByMem(pBuffer []byte) *imagex.Image
- func NewImageByMemAdaptive(pBuffer []byte, leftSize, topSize, rightSize, bottomSize int32) *imagex.Image
- func NewImageByMemRect(pBuffer []byte, x, y, cx, cy int32) *imagex.Image
- func NewImageByName(name string) *imagex.Image
- func NewImageByNameEx(fileName, name string) *imagex.Image
- func NewImageByRes(id int32, Type string, bStretch bool, hModule uintptr) *imagex.Image
- func NewImageByResAdaptive(id int32, Type string, leftSize, topSize, rightSize, bottomSize int32, ...) *imagex.Image
- func NewImageBySrc(hImageSrc int) *imagex.Image
- func NewImageBySvg(hSvg int) *imagex.Image
- func NewImageBySvgFile(fileName string) *imagex.Image
- func NewImageBySvgString(str string) *imagex.Image
- func NewImageBySvgStringUtf8(str string) *imagex.Image
- func NewImageBySvgStringW(str string) *imagex.Image
- func NewImageByZip(zipFileName string, fileName string, password ...string) *imagex.Image
- func NewImageByZipAdaptive(zipFileName string, fileName string, password string, x1, x2, y1, y2 int32) *imagex.Image
- func NewImageByZipMem(data []byte, fileName string, password ...string) *imagex.Image
- func NewImageByZipRect(zipFileName string, fileName string, password string, x, y, cx, cy int32) *imagex.Image
- func NewImageByZipRes(id int32, fileName string, password string, hModule ...uintptr) *imagex.Image
- func NewItemTemplate(nType xcc.ListItemTemp_Type_) *tmpl.ListItemTemplate
- func NewItemTemplateByHandle(handle int) *tmpl.ListItemTemplate
- func NewItemTemplateByString(nType xcc.ListItemTemp_Type_, xmlStr string) *tmpl.ListItemTemplate
- func NewItemTemplateByXML(nType xcc.ListItemTemp_Type_, fileName string) *tmpl.ListItemTemplate
- func NewItemTemplateByXmlMem(nType xcc.ListItemTemp_Type_, data []byte) *tmpl.ListItemTemplate
- func NewItemTemplateByZip(nType xcc.ListItemTemp_Type_, zipFile string, fileName string, ...) *tmpl.ListItemTemplate
- func NewItemTemplateByZipMem(nType xcc.ListItemTemp_Type_, data []byte, fileName string, password ...string) *tmpl.ListItemTemplate
- func NewItemTemplateByZipRes(nType xcc.ListItemTemp_Type_, id int32, fileName string, password string, ...) *tmpl.ListItemTemplate
- func NewSvgByFile(fileName string) *svg.Svg
- func NewSvgByHandle(hSvg int) *svg.Svg
- func NewSvgByRes(id int32, Type string, hModule uintptr) *svg.Svg
- func NewSvgByString(str string) *svg.Svg
- func NewSvgByStringUtf8(str string) *svg.Svg
- func NewSvgByStringW(str string) *svg.Svg
- func NewSvgByZip(zipFileName, fileName string, password ...string) *svg.Svg
- func NewSvgByZipMem(data []byte, fileName string, password ...string) *svg.Svg
- func NewSvgByZipRes(id int32, fileName, password string, hModule ...uintptr) *svg.Svg
- func NewWindow(x, y, cx, cy int32, title string, hWndParent uintptr, ...) *window.Window
- func NewWindowByAttach(hWnd uintptr, XCStyle xcc.Window_Style_) *window.Window
- func NewWindowByHandle(hWindow int) *window.Window
- func NewWindowByLayout(fileName string, hParent int, hAttachWnd ...uintptr) *window.Window
- func NewWindowByLayoutEx(fileName, prefixName string, hParent int, hParentWnd uintptr, ...) *window.Window
- func NewWindowByLayoutStringW(xmlStr string, hParent int, hAttachWnd ...uintptr) *window.Window
- func NewWindowByLayoutStringWEx(xmlStr, prefixName string, hParent int, hParentWnd uintptr, ...) *window.Window
- func NewWindowByLayoutZip(zipFileName string, fileName string, password string, hParent int, ...) *window.Window
- func NewWindowByLayoutZipEx(zipFileName string, fileName string, password, prefixName string, hParent int, ...) *window.Window
- func NewWindowByLayoutZipMem(data []byte, fileName string, password string, hParent int, ...) *window.Window
- func NewWindowByLayoutZipMemEx(data []byte, fileName string, password, prefixName string, hParent int, ...) *window.Window
- func NewWindowByLayoutZipResEx(id int32, fileName, password, prefixName string, hParent int, ...) *window.Window
- func NewWindowByName(name string) *window.Window
- func NewWindowByUID(nUID int32) *window.Window
- func NewWindowByUIDName(name string) *window.Window
- func NewWindowEx(dwExStyle xcc.WS_EX_, dwStyle xcc.WS_, className string, x, y, cx, cy int32, ...) *window.Window
- func PostMessage(hWindow int, msg uint32, wParam, lParam uintptr) bool
- func PostQuitMessage(nExitCode int32)
- func Print(level int32, info string)
- func PropertyList_GetSize(propertylist int) int32
- func PropertyList_GetString(propertylist int, name string) string
- func RectInRect(pRect1 *xc.RECT, pRect2 *xc.RECT) bool
- func RegisterWindowClassName(className string) bool
- func RemoveCallback_LoadLayout()
- func SendMessage(hWindow int, msg uint32, wParam, lParam uintptr) uintptr
- func SetActivateTopWindow() bool
- func SetCallback_LoadLayout(callback xc.FunLoadLayout)
- func SetD2dTextAntialiasMode(mode int32)
- func SetD2dTextRenderingMode(mode xcc.XC_DWRITE_RENDERING_MODE_)
- func SetDefaultFont(hFontX int)
- func SetLayoutFrameColor(color uint32)
- func SetPaintFrequency(nMilliseconds int32)
- func SetProperty(hXCGUI int, name string, value string) bool
- func SetTextRenderingHint(nType int32)
- func SetType(hXCGUI int, nType xcc.XC_OBJECT_TYPE)
- func SetWindowIcon(hImage int)
- func ShowLayoutFrame(bShow ...bool)
- func ShowSvgFrame(bShow ...bool)
- func Sys_ShellExecute(hwnd uintptr, operation string, filePath string, parameters string, ...) uintptr
- func UI(f func())
- func UnicodeToAnsi(in string, inLen int32, pOut uintptr, outLen int32) int32
- func Utf8toA(pUtf8 uintptr) uintptr
- func Utf8toW(pUtf8 uintptr) string
- func Utf8toWEx(pUtf8 uintptr, length int32) string
- func WtoA(value string) uintptr
- func WtoUtf8(value string) uintptr
- func WtoUtf8Ex(value string, length int32) uintptr
- type App
- func (a *App) AddFileSearchPath(path string) *App
- func (a *App) AddType(hXCGUI int, nType xcc.XC_OBJECT_TYPE) *App
- func (a *App) Alert(title string, text string) *App
- func (a *App) AnsiToUnicode(pIn uintptr, inLen int32, pOut *string, outLen int32) int32
- func (a *App) AtoUtf8(value uintptr) uintptr
- func (a *App) AtoW(value uintptr) string
- func (a *App) BindData(hXCGUI int, data int) *App
- func (a *App) CallUT(f func()) *App
- func (a *App) CallUiThread(pCall func(data int) int, data int) int
- func (a *App) CallUiThreadEx(pCall func(data int) int, data int) int
- func (a *App) CallUiThreader(u xc.UiThreader, data int) int
- func (a *App) CombineRect(pDest *xc.RECT, pSrc1 *xc.RECT, pSrc2 *xc.RECT) *App
- func (a *App) DebugToFileInfo(info string) *App
- func (a *App) EnableAutoDPI(bEnable ...bool) *App
- func (a *App) EnableAutoExitApp(bEnable ...bool) *App
- func (a *App) EnableAutoRedrawUI(bEnable ...bool) *App
- func (a *App) EnableDPI(bEnable ...bool) bool
- func (a *App) EnableDebugFile(bEnable ...bool) *App
- func (a *App) EnableErrorMessageBox(bEnable ...bool) *App
- func (a *App) EnableGdiDrawText(bEnable ...bool) *App
- func (a *App) EnableResMonitor(bEnable ...bool) *App
- func (a *App) EnableWindowSysNc(bEnable ...bool) *App
- func (a *App) Exit() *App
- func (a *App) Free(p uintptr) *App
- func (a *App) FreeLibrary(hModule uintptr) bool
- func (a *App) GetBindData(hXCGUI int) int
- func (a *App) GetD2dFactory() uintptr
- func (a *App) GetDWriteFactory() uintptr
- func (a *App) GetDefaultFont() int
- func (a *App) GetDefaultFontObj() *font.Font
- func (a *App) GetHandleCount() int32
- func (a *App) GetObjectByID(hWindow int, nID int32) int
- func (a *App) GetObjectByIDName(hWindow int, name string) int
- func (a *App) GetObjectByName(name string) int
- func (a *App) GetObjectByUID(nUID int32) int
- func (a *App) GetObjectByUIDName(name string) int
- func (a *App) GetObjectType(hXCGUI int) xcc.XC_OBJECT_TYPE
- func (a *App) GetProcAddress(hModule uintptr, procName string) uintptr
- func (a *App) GetProperty(hXCGUI int, name string) string
- func (a *App) GetTextShowRect(str string, length int32, hFontX int, nTextAlign xcc.TextFormatFlag_, ...) *App
- func (a *App) GetTextShowSize(str string, length int32, hFontX int, pOutSize *xc.SIZE) *App
- func (a *App) GetTextShowSizeEx(str string, length int32, hFontX int, nTextAlign xcc.TextFormatFlag_, ...) *App
- func (a *App) GetTextSize(str string, length int32, hFontX int, pOutSize *xc.SIZE) *App
- func (a *App) GetWicFactory() uintptr
- func (a *App) HWindowFromHWnd(hWnd uintptr) int
- func (a *App) InitFont(pFont *xc.LOGFONTW, name string, size int32, bBold bool, bItalic bool, ...) *App
- func (a *App) IsEnableD2D() bool
- func (a *App) IsHELE(hEle int) bool
- func (a *App) IsHWINDOW(hWindow int) bool
- func (a *App) IsHXCGUI(hXCGUI int, nType xcc.XC_OBJECT_TYPE) bool
- func (a *App) IsInit() bool
- func (a *App) IsSViewExtend(hEle int) bool
- func (a *App) IsShape(hShape int) bool
- func (a *App) IsUiThread() bool
- func (a *App) LoadDll(dllFileName string) uintptr
- func (a *App) LoadLayout(fileName string, hParent int, hAttachWnd ...uintptr) int
- func (a *App) LoadLayoutEx(fileName, prefixName string, hParent int, hParentWnd uintptr, ...) int
- func (a *App) LoadLayoutFromStringW(xmlStr string, hParent int, hAttachWnd ...uintptr) int
- func (a *App) LoadLayoutFromStringWEx(xmlStr, prefixName string, hParent int, hParentWnd uintptr, ...) int
- func (a *App) LoadLayoutZip(zipFileName string, fileName string, password string, hParent int, ...) int
- func (a *App) LoadLayoutZipEx(zipFileName string, fileName string, password, prefixName string, hParent int, ...) int
- func (a *App) LoadLayoutZipMem(data []byte, fileName string, password string, hParent int, ...) int
- func (a *App) LoadLayoutZipMemEx(data []byte, fileName string, password, prefixName string, hParent int, ...) int
- func (a *App) LoadLayoutZipResEx(id int32, fileName string, password, prefixName string, hParent int, ...) int
- func (a *App) LoadLayout_Create(data, propertylist int, uiType xcc.XC_OBJECT_TYPE, hParent int) int
- func (a *App) LoadLibrary(fileName string) uintptr
- func (a *App) LoadResource(fileName string) bool
- func (a *App) LoadResourceFromStringW(xmlStr string, fileName string) bool
- func (a *App) LoadResourceZip(zipFileName string, fileName string, password ...string) bool
- func (a *App) LoadResourceZipMem(data []byte, fileName string, password ...string) bool
- func (a *App) LoadResourceZipRes(id int32, fileName string, password string, hModule ...uintptr) bool
- func (a *App) LoadStyle(fileName string) bool
- func (a *App) LoadStyleFromStringW(fileName string, str string) bool
- func (a *App) LoadStyleZip(zipFile string, fileName string, password ...string) bool
- func (a *App) LoadStyleZipMem(data []byte, fileName string, password ...string) bool
- func (a *App) LoadStyleZipRes(id int32, fileName string, password string, hModule ...uintptr) bool
- func (a *App) Malloc(size int32) uintptr
- func (a *App) MessageBox(title, text string, nFlags xcc.MessageBox_Flag_, hWndParent uintptr, ...) xcc.MessageBox_Flag_
- func (a *App) Msg_Create(title, text string, nFlags xcc.MessageBox_Flag_, hWndParent uintptr, ...) int
- func (a *App) Msg_CreateEx(dwExStyle xcc.WS_EX_, dwStyle xcc.WS_, className string, title, text string, ...) int
- func (a *App) NotifyMsg_Popup(position xcc.Position_Flag_, title, text string, hIcon int, ...) int
- func (a *App) NotifyMsg_PopupEx(position xcc.Position_Flag_, title, text string, hIcon int, ...) int
- func (a *App) NotifyMsg_SetBorderSize(hWindow int, left, top, right, bottom int32) *App
- func (a *App) NotifyMsg_SetCaptionHeight(hWindow int, nHeight int32) *App
- func (a *App) NotifyMsg_SetDuration(hWindow int, duration uint32) *App
- func (a *App) NotifyMsg_SetParentMargin(hWindow int, left, top, right, bottom int32) *App
- func (a *App) NotifyMsg_SetSpace(hWindow int, nSpace int32) *App
- func (a *App) NotifyMsg_SetWidth(hWindow int, nWidth int32) *App
- func (a *App) PostMessage(hWindow int, msg uint32, wParam, lParam uintptr) bool
- func (a *App) PostQuitMessage(nExitCode int32) *App
- func (a *App) Print(level int32, info string) *App
- func (a *App) PropertyList_GetSize(propertylist int) int32
- func (a *App) PropertyList_GetString(propertylist int, name string) string
- func (a *App) RectInRect(pRect1 *xc.RECT, pRect2 *xc.RECT) bool
- func (a *App) RegisterWindowClassName(className string) bool
- func (a *App) RemoveCallback_LoadLayout() *App
- func (a *App) Run() *App
- func (a *App) SendMessage(hWindow int, msg uint32, wParam, lParam uintptr) uintptr
- func (a *App) SetActivateTopWindow() bool
- func (a *App) SetCallback_LoadLayout(callback xc.FunLoadLayout) *App
- func (a *App) SetD2dTextAntialiasMode(mode int32) *App
- func (a *App) SetD2dTextRenderingMode(mode xcc.XC_DWRITE_RENDERING_MODE_) *App
- func (a *App) SetDefaultFont(hFontX int) *App
- func (a *App) SetLayoutFrameColor(color uint32) *App
- func (a *App) SetPaintFrequency(nMilliseconds int32) *App
- func (a *App) SetProperty(hXCGUI int, name string, value string) bool
- func (a *App) SetTextRenderingHint(nType int32) *App
- func (a *App) SetType(hXCGUI int, nType xcc.XC_OBJECT_TYPE) *App
- func (a *App) SetWindowIcon(hImage int) *App
- func (a *App) ShowAndRun(hWindow int) *App
- func (a *App) ShowLayoutFrame(bShow ...bool) *App
- func (a *App) ShowSvgFrame(bShow ...bool) *App
- func (a *App) Sys_ShellExecute(hwnd uintptr, operation string, filePath string, parameters string, ...) uintptr
- func (a *App) UI(f func()) *App
- func (a *App) UnicodeToAnsi(in string, inLen int32, pOut uintptr, outLen int32) int32
- func (a *App) Utf8toA(pUtf8 uintptr) uintptr
- func (a *App) Utf8toW(pUtf8 uintptr) string
- func (a *App) Utf8toWEx(pUtf8 uintptr, length int32) string
- func (a *App) WtoA(value string) uintptr
- func (a *App) WtoUtf8(value string) uintptr
- func (a *App) WtoUtf8Ex(value string, length int32) uintptr
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddFileSearchPath ¶ added in v1.3.395
func AddFileSearchPath(path string)
炫彩_添加搜索路径, 添加文件搜索路径, 默认路径为exe目录和程序当前运行目录.
path: 文件夹.
func AddType ¶ added in v1.4.0
func AddType(hXCGUI int, nType xcc.XC_OBJECT_TYPE)
AddType 炫彩_添加类型.
hXCGUI: 炫彩对象句柄.
nType: 类型, XC_OBJECT_TYPE, 以XC_开头的常量.
func AnsiToUnicode ¶ added in v1.3.395
炫彩_A2U, 返回写入接收缓冲区字符数量.
pIn: 指向待转换的Ansi字符串指针.
inLen: pIn字符数量.
pOut: 指向接收转换后的Unicode字符串缓冲区指针.
outLen: pOut缓冲区大小,字符wchar_t单位.
func Auto ¶ added in v1.3.395
func Auto(f func())
Auto 用于在UI线程操作UI.
- 会自动判断当前是否在UI线程, 如果在UI线程则直接执行, 如果不在UI线程则会调用 CallUT.
func AutoAny ¶ added in v1.3.395
AutoAny 用于在UI线程操作UI.
- 会自动判断当前是否在UI线程, 如果在UI线程则直接执行, 如果不在UI线程则会调用 CallUTAny.
func AutoInt ¶ added in v1.3.395
AutoInt 用于在UI线程操作UI.
- 会自动判断当前是否在UI线程, 如果在UI线程则直接执行, 如果不在UI线程则会调用 CallUiThreadEx.
func CallUT ¶ added in v1.3.395
func CallUT(f func())
CallUT 炫彩_调用界面线程, 调用UI线程, 设置回调函数, 在回调函数里操作UI.
- 与 CallUiThread 的区别是: 本函数没有2000个回调上限的限制, 回调函数可以直接使用匿名函数.
- 回调函数没有参数也没有返回值.
f: 回调函数, 没有参数也没有返回值, 可以直接使用匿名函数.
func CallUTAny ¶ added in v1.3.395
CallUTAny 炫彩_调用界面线程, 调用UI线程, 设置回调函数, 在回调函数里操作UI.
- 与 XC_CallUiThread 的区别是: 本函数没有2000个回调上限的限制, 回调函数可以直接使用匿名函数.
- 可以传入任意参数.
f: 回调函数.
data: 传进回调函数的用户自定义数据.
func CallUiThread ¶ added in v1.3.395
CallUiThread 炫彩_调用界面线程, 调用UI线程, 设置回调函数, 在回调函数里操作UI.
- 回调函数尽量不要使用匿名函数, 使用匿名函数意味着你每次都在创建1个新的回调, 超过2000个时, 程序必将panic.
- 如果使用 CallUiThreadEx, CallUiThreader, CallUT, CallUTAny 则没有上述限制.
pCall: 回调函数.
data: 传进回调函数的用户自定义数据.
func CallUiThreadEx ¶ added in v1.3.395
CallUiThreadEx 炫彩_调用界面线程, 调用UI线程, 设置回调函数, 在回调函数里操作UI.
- 与 CallUiThread 的区别是: 本函数没有2000个回调上限的限制, 回调函数可以直接使用匿名函数.
f: 回调函数.
data: 传进回调函数的用户自定义数据.
func CallUiThreader ¶ added in v1.3.395
func CallUiThreader(u xc.UiThreader, data int) int
CallUiThreader 炫彩_调用界面线程, 调用UI线程, 设置回调函数, 在回调函数里操作UI.
- 与 CallUiThread 的区别是: 本函数没有2000个回调上限的限制, 回调函数可以直接使用匿名函数.
u: xc.UiThreader.
data: 传进回调函数的用户自定义数据.
func DebugToFileInfo ¶ added in v1.3.395
func DebugToFileInfo(info string)
DebugToFileInfo 炫彩_输出调试信息到文件, 打印调试信息到文件xcgui_debug.txt.
info: 文本.
func EnableAutoDPI ¶ added in v1.3.395
func EnableAutoDPI(bEnable ...bool)
炫彩_启用自动DPI. 当启用后, 创建窗口时自动检测DPI调整UI缩放, 处理DPI改变消息; 禁用后,当DPI改变,需要手动设置窗口DPI.
bEnable: 是否启用, 不填默认为 true.
func EnableAutoExitApp ¶ added in v1.3.395
func EnableAutoExitApp(bEnable ...bool)
炫彩_启用自动退出程序, 启动或禁用自动退出程序, 当检测到所有用户创建的窗口都关闭时, 自动退出程序; 可调用 XC_PostQuitMessage() 手动退出程序.
bEnable: 是否启用, 不填默认为 true.
func EnableAutoRedrawUI ¶ added in v1.3.395
func EnableAutoRedrawUI(bEnable ...bool)
炫彩_启用自动重绘UI. 当修改UI后将自动调用重绘函数更新UI.
- 例如改变了按钮标题后, 将自动调用 xc.XEle_Redraw 更新UI, 默认不启用, 手动和自动各有优势.
bEnable: 是否启用, 不填默认为 true.
func EnableDPI ¶ added in v1.3.395
炫彩_启用DPI.
为go程序启用DPI的几种方式:
- 调用此函数.
- 使用程序清单文件, Windows 文档里更推荐此方式.
- 自行调用 Windows DPI 命令.
bEnable: 是否启用, 不填默认为 true.
func EnableDebugFile ¶ added in v1.3.395
func EnableDebugFile(bEnable ...bool)
炫彩_启用debug文件.
bEnable: 是否启用, 不填默认为 true.
func EnableErrorMessageBox ¶ added in v1.3.395
func EnableErrorMessageBox(bEnable ...bool)
炫彩_启用错误弹窗, 启用错误弹出, 通过该接口可以设置遇到严重错误时不弹出消息提示框.
bEnable: 是否启用, 不填默认为 true.
func EnableGdiDrawText ¶ added in v1.3.395
func EnableGdiDrawText(bEnable ...bool)
炫彩_启用GDI绘制文本, 将影响到以下函数: XDraw_TextOut, XDraw_TextOutEx, XDraw_TextOutA.
bEnable: 是否启用, 不填默认为 true.
func EnableResMonitor ¶ added in v1.3.395
func EnableResMonitor(bEnable ...bool)
炫彩_启用资源监视器.
bEnable: 是否启用, 不填默认为 true.
func EnableWindowSysNc ¶ added in v1.4.0
func EnableWindowSysNc(bEnable ...bool)
炫彩_启用窗口系统非客户区. 当启用后拥有系统非客户区样式, 替代模拟非客户区.
bEnable: 是否启用, 不填默认为 true.
func GetD2dFactory ¶ added in v1.3.395
func GetD2dFactory() uintptr
炫彩_取D2D工厂, 开启D2D有效, 返回 *ID2D1Factory.
func GetDWriteFactory ¶ added in v1.3.395
func GetDWriteFactory() uintptr
炫彩_取DWrite工厂, 开启D2D有效, 返回 *IDWriteFactory.
func GetDefaultFontObj ¶ added in v1.3.399
GetDefaultFontObj 炫彩_取默认字体对象. 返回字体对象, 失败返回 nil.
func GetHandleCount ¶ added in v1.3.395
func GetHandleCount() int32
炫彩_取句柄总数. 获取当前所使用的句柄总数量, 返回当前所使用的句柄总数量.
func GetObjectType ¶ added in v1.3.395
func GetObjectType(hXCGUI int) xcc.XC_OBJECT_TYPE
炫彩_取对象类型, 获取句柄类型, 返回: xcc.XC_OBJECT_TYPE, 以XC_开头的常量.
hXCGUI: 炫彩对象句柄.
func GetProcAddress ¶ added in v1.3.395
炫彩_取动态库中函数地址, 系统API GetProcAddress, 返回函数地址.
hModule: 动态库模块句柄.
procName: 函数名.
func GetTextShowRect ¶ added in v1.3.395
func GetTextShowRect(str string, length int32, hFontX int, nTextAlign xcc.TextFormatFlag_, width int32, pOutSize *xc.SIZE)
GetTextShowRect 炫彩_取文本显示矩形.
str: 字符串.
length: 字符串长度.
hFontX: 字体.
nTextAlign: 文本对齐: xcc.TextFormatFlag_.
width: 最大宽度.
pOutSize: 接收返回大小.
func GetTextShowSize ¶ added in v1.3.395
炫彩_取文本显示大小.
str: 字符串.
length: 字符串长度.
hFontX: 字体.
pOutSize: 接收返回大小.
func GetTextShowSizeEx ¶ added in v1.3.395
func GetTextShowSizeEx(str string, length int32, hFontX int, nTextAlign xcc.TextFormatFlag_, pOutSize *xc.SIZE)
炫彩_取文本显示大小扩展.
str: 字符串.
length: 字符串长度.
hFontX: 字体.
nTextAlign: 文本对齐方式, TextFormatFlag_, TextAlignFlag_, TextTrimming_.
pOutSize: 接收返回大小.
func GetTextSize ¶ added in v1.3.395
炫彩_取文本绘制大小.
str: 字符串.
length: 字符串长度.
hFontX: 字体.
pOutSize: 接收返回大小.
func GetWicFactory ¶ added in v1.3.395
func GetWicFactory() uintptr
炫彩_取WIC工厂, 开启D2D有效, 返回 *IWICImagingFactory.
func HWindowFromHWnd ¶ added in v1.3.395
炫彩_转换HWND到HWINDOW, 通过窗口HWND句柄获取HWINDOW句柄.
hWnd: 窗口真实句柄HWND.
func Init ¶ added in v1.3.395
func Init() error
Init 写出 xcgui.dll 到 windows 临时目录中 'xcgui+版本号+_编译时的目标架构+_CRC32' 文件夹里.
- 如果 dll 已存在就不会写出了.
- 使用完本函数后无需再调用 xc.SetXcguiPath(), 内部已自动操作.
- 程序退出时如果想删除 xcgui.dll 可以调用 DeleteDll() 函数.
func InitFont ¶ added in v1.3.395
func InitFont(pFont *xc.LOGFONTW, name string, size int32, bBold bool, bItalic bool, bUnderline bool, bStrikeOut bool)
炫彩_初始化字体, 初始化LOGFONTW结构体.
pFont: LOGFONTW结构体指针.
name: 字体名称.
size: 字体大小.
bBold: 是否为粗体.
bItalic: 是否为斜体.
bUnderline: 是否有下划线.
bStrikeOut: 是否有删除线.
func InitOrExit ¶ added in v1.3.395
func InitOrExit()
InitOrExit 把 xcgui.dll 写出到 windows 临时目录中 'xcgui+版本号+_编译时的目标架构+_CRC32' 文件夹里.
- 如果 dll 已存在就不会写出了.
- 使用完本函数后无需再调用 xc.SetXcguiPath(), 内部已自动操作.
- 如果出错, 会弹窗提示错误, 然后退出程序.
- 程序退出时如果想删除 xcgui.dll 可以调用 DeleteDll() 函数.
func IsHXCGUI ¶ added in v1.3.395
func IsHXCGUI(hXCGUI int, nType xcc.XC_OBJECT_TYPE) bool
炫彩_判断句柄包含类型, 判断句柄是否拥有该类型.
hXCGUI: 炫彩句柄.
nType: 句柄类型, XC_OBJECT_TYPE , 以XC_开头的常量.
func LoadDll ¶ added in v1.3.395
炫彩_加载DLL, 返回DLL模块句柄. 加载指定DLL, 并且调用DLL中函数LoadDll(), DLL中导出函数格式: int32 WINAPI LoadDll().
dllFileName: DLL文件名.
func LoadItemTemplate ¶ added in v1.3.393
func LoadItemTemplate(nType xcc.ListItemTemp_Type_, fileName string) int
LoadItemTemplate 模板_加载从文件, 项模板文件载入.
nType: 模板类型, xcc.ListItemTemp_Type_.
fileName: 文件名.
func LoadItemTemplateEx ¶ added in v1.3.393
func LoadItemTemplateEx(nType xcc.ListItemTemp_Type_, fileName string, pOutTemp1 *int, pOutTemp2 *int) bool
LoadItemTemplateEx 模板_加载从文件扩展, 加载项模板从文件.
nType: 模板类型, xcc.ListItemTemp_Type_.
fileName: 文件名.
pOutTemp1: 返回模板句柄1, 项模板.
pOutTemp2: 返回模板句柄2, 列表头模板或列表视组模板.
func LoadItemTemplateFromMem ¶ added in v1.3.393
func LoadItemTemplateFromMem(nType xcc.ListItemTemp_Type_, data []byte) int
LoadItemTemplateFromMem 项模板_加载从内存. 加载项模板文件从内存.
nType: 模板类型, xcc.ListItemTemp_Type_.
data: 模板文件数据.
func LoadItemTemplateFromMemEx ¶ added in v1.3.393
func LoadItemTemplateFromMemEx(nType xcc.ListItemTemp_Type_, data []byte, pOutTemp1 *int, pOutTemp2 *int) bool
LoadItemTemplateFromMemEx 项模板_加载从内存扩展. 加载项模板文件从内存.
nType: 模板类型, xcc.ListItemTemp_Type_.
data: 模板文件数据.
pOutTemp1: 返回模板句柄1, 项模板.
pOutTemp2: 返回模板句柄2, 列表头模板或列表视组模板.
func LoadItemTemplateFromString ¶ added in v1.3.393
func LoadItemTemplateFromString(nType xcc.ListItemTemp_Type_, xmlStr string) int
LoadItemTemplateFromString 模板_加载从字符串, 加载项模板文件从内存字符串.
nType: 模板类型, xcc.ListItemTemp_Type_.
xmlStr: 字符串.
func LoadItemTemplateFromStringEx ¶ added in v1.3.393
func LoadItemTemplateFromStringEx(nType xcc.ListItemTemp_Type_, xmlStr string, pOutTemp1 *int, pOutTemp2 *int) bool
LoadItemTemplateFromStringEx 模板_加载从字符串扩展, 加载项模板文件从内存字符串.
nType: 模板类型, xcc.ListItemTemp_Type_.
xmlStr: 字符串内容.
pOutTemp1: 返回模板句柄1, 项模板.
pOutTemp2: 返回模板句柄2, 列表头模板或列表视组模板.
func LoadItemTemplateObjEx ¶ added in v1.3.399
func LoadItemTemplateObjEx(nType xcc.ListItemTemp_Type_, fileName string) (*tmpl.ListItemTemplate, *tmpl.ListItemTemplate)
模板_加载从文件扩展, 加载项模板从文件, 返回模板对象, 失败返回 nil.
nType: 模板类型, xcc.ListItemTemp_Type_.
fileName: 文件名.
返回值:
- 项模板对象.
- 列表头模板对象或列表视组模板对象.
func LoadItemTemplateObjFromMemEx ¶ added in v1.3.399
func LoadItemTemplateObjFromMemEx(nType xcc.ListItemTemp_Type_, data []byte) (*tmpl.ListItemTemplate, *tmpl.ListItemTemplate)
项模板_加载从内存扩展. 加载项模板文件从内存, 返回模板对象, 失败返回 nil.
nType: 模板类型, xcc.ListItemTemp_Type_.
data: 内存块数据.
返回值:
- 项模板对象.
- 列表头模板对象或列表视组模板对象.
func LoadItemTemplateObjFromStringEx ¶ added in v1.3.399
func LoadItemTemplateObjFromStringEx(nType xcc.ListItemTemp_Type_, xmlStr string) (*tmpl.ListItemTemplate, *tmpl.ListItemTemplate)
模板_加载从字符串扩展, 加载项模板文件从内存字符串, 返回模板对象, 失败返回 nil.
nType: 模板类型, xcc.ListItemTemp_Type_.
xmlStr: 字符串内容.
返回值:
- 项模板对象.
- 列表头模板对象或列表视组模板对象.
func LoadItemTemplateObjZipEx ¶ added in v1.3.399
func LoadItemTemplateObjZipEx(nType xcc.ListItemTemp_Type_, zipFile string, fileName string, password ...string) (*tmpl.ListItemTemplate, *tmpl.ListItemTemplate)
模板_加载从ZIP扩展, 加载项模板从zip压缩包中, 返回模板对象, 失败返回 nil.
nType: 模板类型, xcc.ListItemTemp_Type_.
zipFile: zip文件.
fileName: 文件名.
password: zip密码, 不填默认为空.
返回值:
- 项模板对象.
- 列表头模板对象或列表视组模板对象.
func LoadItemTemplateObjZipMemEx ¶ added in v1.3.399
func LoadItemTemplateObjZipMemEx(nType xcc.ListItemTemp_Type_, data []byte, fileName string, password ...string) (*tmpl.ListItemTemplate, *tmpl.ListItemTemplate)
模板_加载从内存ZIP扩展, 加载项模板从内存zip压缩包中, 返回模板对象, 失败返回 nil.
nType: 模板类型, xcc.ListItemTemp_Type_.
data: 内存块数据.
fileName: 文件名.
password: zip密码, 不填默认为空.
返回值:
- 项模板对象.
- 列表头模板对象或列表视组模板对象.
func LoadItemTemplateObjZipResEx ¶ added in v1.3.399
func LoadItemTemplateObjZipResEx(nType xcc.ListItemTemp_Type_, id int32, fileName string, password string, hModule ...uintptr) (*tmpl.ListItemTemplate, *tmpl.ListItemTemplate)
项模板_加载从资源ZIP扩展. 加载项模板文件从RC资源ZIP, 返回模板对象, 失败返回 nil.
nType: 模板类型, xcc.ListItemTemp_Type_.
id: RC资源ID.
fileName: 模板文件名.
password: zip密码.
hModule: 模块句柄, 不填默认为0.
func LoadItemTemplateZip ¶ added in v1.3.393
func LoadItemTemplateZip(nType xcc.ListItemTemp_Type_, zipFile string, fileName string, password ...string) int
LoadItemTemplateZip 模板_加载从ZIP, 加载项模板从zip压缩包中.
nType: 模板类型, xcc.ListItemTemp_Type_.
zipFile: zip文件.
fileName: 文件名.
password: zip密码, 不填默认为空.
func LoadItemTemplateZipEx ¶ added in v1.3.393
func LoadItemTemplateZipEx(nType xcc.ListItemTemp_Type_, zipFile string, fileName string, password string, pOutTemp1 *int, pOutTemp2 *int) bool
LoadItemTemplateZipEx 模板_加载从ZIP扩展, 加载项模板从zip压缩包中.
nType: 模板类型, xcc.ListItemTemp_Type_.
zipFile: zip文件.
fileName: 文件名.
password: zip密码.
pOutTemp1: 返回模板句柄1, 项模板.
pOutTemp2: 返回模板句柄2, 列表头模板或列表视组模板.
func LoadItemTemplateZipMem ¶ added in v1.3.393
func LoadItemTemplateZipMem(nType xcc.ListItemTemp_Type_, data []byte, fileName string, password ...string) int
LoadItemTemplateZipMem 模板_加载从内存ZIP, 加载项模板从内存zip压缩包中.
nType: 模板类型, xcc.ListItemTemp_Type_.
data: 模板文件数据.
fileName: 文件名.
password: zip密码, 不填默认为空.
func LoadItemTemplateZipMemEx ¶ added in v1.3.393
func LoadItemTemplateZipMemEx(nType xcc.ListItemTemp_Type_, data []byte, fileName string, password string, pOutTemp1 *int, pOutTemp2 *int) bool
LoadItemTemplateZipMemEx 模板_加载从内存ZIP扩展, 加载项模板从内存zip压缩包中.
nType: 模板类型, xcc.ListItemTemp_Type_.
data: 模板文件数据.
fileName: 文件名.
password: zip密码.
pOutTemp1: 返回模板句柄1, 项模板.
pOutTemp2: 返回模板句柄2, 列表头模板或列表视组模板.
func LoadItemTemplateZipRes ¶ added in v1.3.393
func LoadItemTemplateZipRes(nType xcc.ListItemTemp_Type_, id int32, fileName string, password string, hModule ...uintptr) int
LoadItemTemplateZipRes 模板_加载从ZIP, 加载项模板从zip压缩包中.
nType: 模板类型, xcc.ListItemTemp_Type_.
id: RC资源ID.
fileName: 模板文件名.
password: zip密码.
hModule: 模块句柄, 不填默认为0.
func LoadItemTemplateZipResEx ¶ added in v1.3.393
func LoadItemTemplateZipResEx(nType xcc.ListItemTemp_Type_, id int32, fileName string, password string, pOutTemp1 *int, pOutTemp2 *int, hModule ...uintptr) bool
LoadItemTemplateZipResEx 项模板_加载从资源ZIP扩展. 加载项模板文件从RC资源ZIP.
nType: 模板类型, xcc.ListItemTemp_Type_.
id: RC资源ID.
fileName: 模板文件名.
password: zip密码.
pOutTemp1: 返回模板句柄1, 项模板.
pOutTemp2: 返回模板句柄2, 列表头模板或列表视组模板.
hModule: 模块句柄, 不填默认为0.
func LoadLayout ¶ added in v1.3.395
炫彩_加载布局文件, 返回窗口句柄或布局句柄或元素句柄.
fileName: 布局文件名.
hParent: 父对象句柄.
hAttachWnd: 附加窗口句柄, 附加到指定的窗口, 不填默认为0.
func LoadLayoutEx ¶ added in v1.3.395
func LoadLayoutEx(fileName, prefixName string, hParent int, hParentWnd uintptr, hAttachWnd ...uintptr) int
炫彩_加载布局文件Ex, 返回窗口句柄或布局句柄或元素句柄.
fileName: 布局文件名.
prefixName: 名称(name)前缀, 可选参数; 给当前布局文件中所有name属性增加前缀, 那么name属性值为: 前缀 + name.
hParent: 父对象句柄, 窗口句柄或UI元素句柄.
hParentWnd: 父窗口句柄HWND, 提供给第三方窗口使用.
hAttachWnd: 附加窗口句柄, 附加到指定的窗口, 不填默认为0.
func LoadLayoutFromStringW ¶ added in v1.3.395
炫彩_加载布局文件从字符串W, 加载布局文件从内存字符串, 返回窗口句柄或布局句柄或元素句柄.
xmlStr: 字符串.
hParent: 父对象.
hAttachWnd: 附加窗口句柄, 附加到指定的窗口, 不填默认为0.
func LoadLayoutFromStringWEx ¶ added in v1.3.395
func LoadLayoutFromStringWEx(xmlStr, prefixName string, hParent int, hParentWnd uintptr, hAttachWnd ...uintptr) int
炫彩_加载布局文件从字符串WEx, 加载布局文件从内存字符串, 返回窗口句柄或布局句柄或元素句柄.
xmlStr: 字符串.
prefixName: 名称(name)前缀, 可选参数; 给当前布局文件中所有name属性增加前缀, 那么name属性值为: 前缀 + name.
hParent: 父对象句柄, 窗口句柄或UI元素句柄.
hParentWnd: 父窗口句柄HWND, 提供给第三方窗口使用.
hAttachWnd: 附加窗口句柄, 附加到指定的窗口, 不填默认为0.
func LoadLayoutZip ¶ added in v1.3.395
func LoadLayoutZip(zipFileName string, fileName string, password string, hParent int, hAttachWnd ...uintptr) int
炫彩_加载布局文件ZIP, 加载布局文件从zip压缩包中, 返回窗口句柄或布局句柄或元素句柄.
zipFileName: zip文件名.
fileName: 布局文件名.
password: zip密码.
hParent: 父对象句柄.
hAttachWnd: 附加窗口句柄, 附加到指定的窗口, 不填默认为0.
func LoadLayoutZipEx ¶ added in v1.3.395
func LoadLayoutZipEx(zipFileName string, fileName string, password, prefixName string, hParent int, hParentWnd uintptr, hAttachWnd ...uintptr) int
炫彩_加载布局文件ZIPEx, 加载布局文件从zip压缩包中, 返回窗口句柄或布局句柄或元素句柄.
zipFileName: zip文件名.
fileName: 布局文件名.
password: zip密码.
prefixName: 名称(name)前缀, 可选参数; 给当前布局文件中所有name属性增加前缀, 那么name属性值为: 前缀 + name.
hParent: 父对象句柄, 窗口句柄或UI元素句柄.
hParentWnd: 父窗口句柄HWND, 提供给第三方窗口使用.
hAttachWnd: 附加窗口句柄, 附加到指定的窗口, 不填默认为0.
func LoadLayoutZipMem ¶ added in v1.3.395
func LoadLayoutZipMem(data []byte, fileName string, password string, hParent int, hAttachWnd ...uintptr) int
炫彩_加载布局文件内存ZIP, 加载布局文件从zip压缩包中, 返回窗口句柄或布局句柄或元素句柄.
data: 内存块指针.
fileName: 布局文件名.
password: zip密码.
hParent: 父对象句柄.
hAttachWnd: 附加窗口句柄, 附加到指定的窗口, 不填默认为0.
func LoadLayoutZipMemEx ¶ added in v1.3.395
func LoadLayoutZipMemEx(data []byte, fileName string, password, prefixName string, hParent int, hParentWnd uintptr, hAttachWnd ...uintptr) int
炫彩_加载布局文件内存ZIPEx, 加载布局文件从zip压缩包中, 返回窗口句柄或布局句柄或元素句柄.
data: 布局文件数据.
fileName: 布局文件名.
password: zip密码.
prefixName: 名称(name)前缀, 可选参数; 给当前布局文件中所有name属性增加前缀, 那么name属性值为: 前缀 + name.
hParent: 父对象句柄, 窗口句柄或UI元素句柄.
hParentWnd: 父窗口句柄HWND, 提供给第三方窗口使用.
hAttachWnd: 附加窗口句柄, 附加到指定的窗口, 不填默认为0.
func LoadLayoutZipResEx ¶ added in v1.3.395
func LoadLayoutZipResEx(id int32, fileName string, password, prefixName string, hParent int, hParentWnd, hAttachWnd uintptr, hModule ...uintptr) int
炫彩_加载布局文件资源ZIP扩展. 加载布局文件从RC资源zip压缩包中, 返回窗口句柄或元素句柄.
id: RC资源ID.
fileName: 布局文件名.
password: zip密码.
prefixName: 名称(name)前缀, 可选参数; 给当前布局文件中所有name属性增加前缀, 那么name属性值为: 前缀 + name.
hParent: 父对象句柄, 窗口句柄或UI元素句柄, 可填0.
hParentWnd: 父窗口句柄HWND, 提供给第三方窗口使用, 可填0.
hAttachWnd: 附加窗口句柄, 附加到指定的窗口, 可填0.
hModule: 模块句柄, 不填默认为0.
func LoadLayout_Create ¶ added in v1.4.0
func LoadLayout_Create(data, propertylist int, uiType xcc.XC_OBJECT_TYPE, hParent int) int
LoadLayout_Create 炫彩_加载布局文件_创建, 返回创建的UI对象句柄.
- 当调用 xc.XC_LoadLayout 时遇到扩展对象, 用户可在回调函数中创建内置UI对象.
data: 内部使用, 包含布局文件相关信息.
propertylist: 属性列表.
uiType: UI类型, xcc.XC_OBJECT_TYPE.
hParent: 父句柄.
func LoadResourceZip ¶ added in v1.3.395
炫彩_加载资源文件ZIP.
zipFileName: zip文件名.
fileName: 资源文件名.
password: zip压缩包密码, 不填默认为空.
func LoadResourceZipMem ¶ added in v1.3.395
炫彩_加载资源文件内存ZIP.
data: 资源文件数据.
fileName: 资源文件名.
password: zip压缩包密码, 不填默认为空.
func LoadResourceZipRes ¶ added in v1.3.395
炫彩_加载资源文件资源ZIP. 加载资源文件从RC资源zip压缩包中.
id: RC资源ID.
fileName: 资源文件名.
password: zip压缩包密码.
hModule: 模块句柄, 不填默认为0.
func LoadStyleZip ¶ added in v1.3.395
炫彩_加载样式文件ZIP.
zipFile: ZIP文件名.
fileName: 文件名.
password: 密码, 不填默认为空.
func LoadStyleZipMem ¶ added in v1.3.395
炫彩_加载样式文件从内存ZIP.
data: 样式文件数据.
fileName: 文件名.
password: 密码, 不填默认为空.
func LoadStyleZipRes ¶ added in v1.3.395
炫彩_加载样式文件从资源ZIP. 从RC资源中的ZIP包中, 加载样式文件.
id: RC资源ID.
fileName: 文件名.
password: 密码.
hModule: 模块句柄, 不填默认为0.
func MessageBox ¶ added in v1.3.395
func MessageBox(title, text string, nFlags xcc.MessageBox_Flag_, hWndParent uintptr, XCStyle xcc.Window_Style_) xcc.MessageBox_Flag_
MessageBox 炫彩_消息框. 返回值如下: xcc.MessageBox_Flag_Ok: 点击确定按钮退出. xcc.MessageBox_Flag_Cancel: 点击取消按钮退出. xcc.MessageBox_Flag_Other: 其他方式退出.
title: 标题.
text: 内容文本.
nFlags: 标识: xcc.MessageBox_Flag_.
hWndParent: 父窗口句柄(真实的窗口句柄).
XCStyle: xcc.Window_Style_.
func Msg_Create ¶ added in v1.4.0
func Msg_Create(title, text string, nFlags xcc.MessageBox_Flag_, hWndParent uintptr, XCStyle xcc.Window_Style_) int
Msg_Create 消息框_创建, 返回消息框窗口句柄.
title: 标题.
text: 内容文本.
nFlags: 标识: xcc.MessageBox_Flag_.
hWndParent: 父窗口句柄(真实的窗口句柄).
XCStyle: xcc.Window_Style_.
func Msg_CreateEx ¶ added in v1.4.0
func Msg_CreateEx(dwExStyle xcc.WS_EX_, dwStyle xcc.WS_, className string, title, text string, nFlags xcc.MessageBox_Flag_, hWndParent uintptr, XCStyle xcc.Window_Style_) int
Msg_CreateEx 消息框_创建扩展, 返回消息框窗口句柄.
dwExStyle: 窗口扩展样式, xcc.WS_EX_ 常量组合.
dwStyle: 窗口样式, xcc.WS_ 常量组合.
className: 窗口类名.
title: 标题.
text: 内容文本.
nFlags: 标识: xcc.MessageBox_Flag_.
hWndParent: 父窗口句柄(真实的窗口句柄).
XCStyle: xcc.Window_Style_.
func NewBkManager ¶ added in v1.3.393
NewBkManager 背景_创建, 创建背景管理器, 失败返回 nil.
func NewBkManagerByHandle ¶ added in v1.3.393
NewBkManagerByHandle 从句柄创建背景管理器对象, 失败返回 nil.
func NewBkManagerByName ¶ added in v1.3.393
NewBkManagerByName 从name创建背景管理器对象, 失败返回 nil.
func NewBkObjByHandle ¶ added in v1.3.393
NewBkObjByHandle 从 BkObj 句柄创建 bkobj.BkObj 对象.
func NewDrawByHandle ¶ added in v1.3.393
NewDrawByHandle 从图形绘制模块实例句柄创建对象, 失败返回 nil.
func NewDrawGDI ¶ added in v1.3.393
NewDrawGDI 绘制_创建GDI, 创建图形绘制模块实例, 失败返回 nil.
hWindow: 窗口句柄.
hdc: hdc 句柄.
func NewFont ¶ added in v1.3.393
NewFont 字体_创建, 创建炫彩字体. 当字体句柄与元素关联后, 会自动释放, 失败返回 nil.
size: 字体大小,单位(pt, 磅).
func NewFontByFile ¶ added in v1.3.393
NewFontByFile 字体_创建从文件. 创建字体从文件, 失败返回 nil.
fontFile: 字体文件名.
size: 字体大小, 单位(pt, 磅).
style: 字体样式, xcc.FontStyle_ .
func NewFontByFont ¶ added in v1.3.393
NewFontByFont 字体_创建从Font. 创建炫彩字体从GDI+字体, 失败返回 nil.
pFont: GDI+ 字体指针.
func NewFontByHFONT ¶ added in v1.3.393
NewFontByHFONT 字体_创建从HFONT. 创建炫彩字体从现有HFONT字体, 失败返回 nil.
hFont: 字体句柄.
func NewFontByLOGFONTW ¶ added in v1.3.393
NewFontByLOGFONTW 字体_创建从LOGFONT. 创建炫彩字体, 失败返回 nil.
pFontInfo: 字体信息.
func NewFontByMem ¶ added in v1.3.393
NewFontByMem 字体_创建从内存. 创建炫彩字体从内存, 失败返回 nil.
data: 字体文件数据.
fontSize: 字体大小, 单位(pt, 磅).
style: 字体样式, xcc.FontStyle_ .
func NewFontByRes ¶ added in v1.3.393
func NewFontByRes(id int32, Type string, fontSize int32, style xcc.FontStyle_, hModule uintptr) *font.Font
NewFontByRes 字体_创建从资源. 创建字体从资源, 失败返回 nil.
id: xx.
Type: xx.
fontSize: 字体大小, 单位(pt, 磅).
style: 字体样式, xcc.FontStyle_ .
hModule: xx.
func NewFontByZip ¶ added in v1.3.393
func NewFontByZip(zipFileName, fileName, password string, fontSize int32, style xcc.FontStyle_) *font.Font
NewFontByZip 字体_创建从ZIP, 失败返回 nil.
zipFileName: zip文件名.
fileName: 字体文件名.
password: zip密码.
fontSize: 字体大小, 单位(pt, 磅).
style: 字体样式: xcc.FontStyle_ .
func NewFontByZipMem ¶ added in v1.3.393
func NewFontByZipMem(data []byte, fileName, password string, fontSize int32, style xcc.FontStyle_) *font.Font
NewFontByZipMem 字体_创建从内存ZIP, 失败返回 nil.
data: zip数据.
fileName: 字体文件名.
password: zip密码.
fontSize: 字体大小, 单位(pt, 磅).
style: 字体样式: xcc.FontStyle_ .
func NewFontEX ¶ added in v1.3.393
NewFontEX 字体_创建扩展. 创建炫彩字体, 失败返回 nil.
name: 字体名称.
size: 字体大小, 单位(pt, 磅).
style: 字体样式, xcc.FontStyle_ .
func NewImageByExtractIcon ¶ added in v1.3.393
图片_加载文件图标, 加载文件图标, 从一个EXE文件或DLL文件或图标文件; 例如:*.exe文件的图标, 失败返回 nil.
fileName: 文件名.
func NewImageByFileAdaptive ¶ added in v1.3.393
func NewImageByFileAdaptive(fileName string, leftSize, topSize, rightSize, bottomSize int32) *imagex.Image
图片_加载从文件自适应, 加载图片从文件, 自适应图片, 失败返回 nil.
fileName: 图片文件.
leftSize: 坐标.
topSize: 坐标.
rightSize: 坐标.
bottomSize: 坐标.
func NewImageByFileRect ¶ added in v1.3.393
图片_加载从文件指定区域, 加载图片, 指定区位置及大小, 失败返回 nil.
fileName: 图片文件.
x: 坐标.
y: 坐标.
cx: 宽度.
cy: 高度.
func NewImageByHBITMAP ¶ added in v1.3.393
图片_加载从HBITMAP, 创建一个炫彩图片句柄, 从一个现有的位图句柄 HBITMAP, 失败返回 nil.
hBitmap: 位图句柄.
func NewImageByHICON ¶ added in v1.3.393
图片_加载从HICON, 创建一个炫彩图片句柄, 从一个现有的图标句柄HICON, 失败返回 nil.
hIcon: 图标句柄.
func NewImageByHandle ¶ added in v1.3.393
从句柄创建图片对象, 失败返回 nil.
func NewImageByImage ¶ added in v1.3.393
图片_加载从Image, 加载图片从GDI+的Image对象, 失败返回 nil.
pImage: GDI图片对象指针Image*.
func NewImageByMemAdaptive ¶ added in v1.3.393
func NewImageByMemAdaptive(pBuffer []byte, leftSize, topSize, rightSize, bottomSize int32) *imagex.Image
图片_加载从内存自适应, 加载流图片压缩包, 自适应图片(九宫格), 失败返回 nil.
pBuffer: 图片数据.
leftSize: 坐标.
topSize: 坐标.
rightSize: 坐标.
bottomSize: 坐标.
func NewImageByMemRect ¶ added in v1.3.393
图片_加载从内存指定区域, 加载流图片, 指定区位置及大小, 失败返回 nil.
pBuffer: 图片数据.
x: 坐标.
y: 坐标.
cx: 宽度.
cy: 高度.
func NewImageByNameEx ¶ added in v1.3.393
从指定的资源文件中, 根据 name 创建对象, 失败返回 nil.
fileName: 资源文件名.
name: 资源名称.
func NewImageByRes ¶ added in v1.3.393
图片_加载从资源, 失败返回 nil.
id: 资源ID.
Type: 资源类型.
bStretch: 是否拉伸图片.
hModule: 从指定模块加载, 例如:DLL, EXE; 如果为空, 从当前EXE加载.
func NewImageByResAdaptive ¶ added in v1.3.393
func NewImageByResAdaptive(id int32, Type string, leftSize, topSize, rightSize, bottomSize int32, hModule uintptr) *imagex.Image
图片_加载从资源自适应, 加载图片从资源, 自适应图片, 失败返回 nil.
id: 资源ID.
Type: 资源类型.
leftSize: 坐标.
topSize: 坐标.
rightSize: 坐标.
bottomSize: 坐标.
hModule: 从指定模块加载, 例如:DLL, EXE; 如果为空, 从当前EXE加载.
func NewImageByZip ¶ added in v1.3.393
图片_加载从ZIP, 加载图片从ZIP压缩包, 失败返回 nil.
zipFileName: ZIP压缩包文件名.
fileName: 图片文件名.
password: ZIP压缩包密码, 不填默认为空.
func NewImageByZipAdaptive ¶ added in v1.3.393
func NewImageByZipAdaptive(zipFileName string, fileName string, password string, x1, x2, y1, y2 int32) *imagex.Image
图片_加载从ZIP自适应, 加载图片从ZIP压缩包, 自适应图片, 失败返回 nil.
zipFileName: ZIP压缩包文件名.
fileName: 图片文件名.
password: ZIP压缩包密码.
x1: 坐标.
x2: 坐标.
y1: 坐标.
y2: 坐标.
func NewImageByZipMem ¶ added in v1.3.393
图片_加载从内存ZIP, 失败返回 nil.
data: 图片数据.
fileName: 图片名称.
password: zip压缩包密码, 不填默认为空.
func NewImageByZipRect ¶ added in v1.3.393
func NewImageByZipRect(zipFileName string, fileName string, password string, x, y, cx, cy int32) *imagex.Image
图片_加载从ZIP指定区域, 加载ZIP图片, 指定区位置及大小, 失败返回 nil.
zipFileName: ZIP文件.
fileName: 图片名称.
password: 密码.
x: 坐标.
y: 坐标.
cx: 宽度.
cy: 高度.
func NewImageByZipRes ¶ added in v1.3.393
图片_加载从资源ZIP, 失败返回 nil.
id: RC资源ID.
fileName: 图片文件名.
password: ZIP压缩包密码.
hModule: 模块句柄, 不填默认为0.
func NewItemTemplate ¶ added in v1.3.393
func NewItemTemplate(nType xcc.ListItemTemp_Type_) *tmpl.ListItemTemplate
NewItemTemplate 模板_创建, 创建项模板对象, 失败返回 nil.
nType: 模板类型, xcc.ListItemTemp_Type_.
func NewItemTemplateByHandle ¶ added in v1.3.393
func NewItemTemplateByHandle(handle int) *tmpl.ListItemTemplate
NewItemTemplateByHandle 从句柄创建对象, 失败返回 nil.
func NewItemTemplateByString ¶ added in v1.3.393
func NewItemTemplateByString(nType xcc.ListItemTemp_Type_, xmlStr string) *tmpl.ListItemTemplate
NewItemTemplateByString 模板_加载从字符串, 加载项模板文件从内存字符串, 失败返回 nil.
nType: 模板类型, xcc.ListItemTemp_Type_.
xmlStr: 字符串.
func NewItemTemplateByXML ¶ added in v1.3.393
func NewItemTemplateByXML(nType xcc.ListItemTemp_Type_, fileName string) *tmpl.ListItemTemplate
NewItemTemplateByXML 模板_加载从文件, 项模板文件载入, 失败返回 nil.
nType: 模板类型, xcc.ListItemTemp_Type_.
fileName: 文件名.
func NewItemTemplateByXmlMem ¶ added in v1.3.393
func NewItemTemplateByXmlMem(nType xcc.ListItemTemp_Type_, data []byte) *tmpl.ListItemTemplate
NewItemTemplateByXmlMem 项模板_加载从内存. 加载项模板文件从内存, 失败返回 nil.
nType: 模板类型, xcc.ListItemTemp_Type_.
data: 模板文件数据.
func NewItemTemplateByZip ¶ added in v1.3.393
func NewItemTemplateByZip(nType xcc.ListItemTemp_Type_, zipFile string, fileName string, password ...string) *tmpl.ListItemTemplate
NewItemTemplateByZip 模板_加载从ZIP, 加载项模板从zip压缩包中, 失败返回 nil.
nType: 模板类型, xcc.ListItemTemp_Type_.
zipFile: zip文件.
fileName: 文件名.
password: zip密码, 不填默认为空.
func NewItemTemplateByZipMem ¶ added in v1.3.393
func NewItemTemplateByZipMem(nType xcc.ListItemTemp_Type_, data []byte, fileName string, password ...string) *tmpl.ListItemTemplate
NewItemTemplateByZipMem 模板_加载从内存ZIP, 加载项模板从内存zip压缩包中, 失败返回 nil.
nType: 模板类型, xcc.ListItemTemp_Type_.
data: 模板文件数据.
fileName: 文件名.
password: zip密码, 不填默认为空.
func NewItemTemplateByZipRes ¶ added in v1.3.393
func NewItemTemplateByZipRes(nType xcc.ListItemTemp_Type_, id int32, fileName string, password string, hModule ...uintptr) *tmpl.ListItemTemplate
NewItemTemplateByZipRes 模板_加载从ZIP, 加载项模板从zip压缩包中, 失败返回 nil.
nType: 模板类型, xcc.ListItemTemp_Type_.
id: RC资源ID.
fileName: 模板文件名.
password: zip密码.
hModule: 模块句柄, 不填默认为0.
func NewSvgByRes ¶ added in v1.3.393
NewSvgByRes SVG_加载从资源, 返回 Svg 对象, 失败返回 nil.
id: 资源 ID.
Type: 资源类型. 在 rc 资源文件中.
hModule: 从指定模块加载.
func NewSvgByZip ¶ added in v1.3.393
NewSvgByZip SVG_加载从ZIP, 返回 Svg 对象, 失败返回 nil.
zipFileName: zip 文件名.
fileName: svg 文件名.
password: zip 密码, 不填默认为空.
func NewSvgByZipMem ¶ added in v1.3.393
NewSvgByZipMem SVG_加载从内存ZIP, 返回 Svg 对象, 失败返回 nil.
data: zip 数据.
fileName: svg 文件名.
password: zip 密码, 不填默认为空.
func NewSvgByZipRes ¶ added in v1.3.393
NewSvgByZipRes SVG_加载从资源ZIP, 返回 Svg 对象, 失败返回 nil.
id: 资源 ID.
fileName: svg 文件名.
password: zip 密码.
hModule: 模块句柄, 不填默认为0.
func NewWindow ¶ added in v1.3.391
func NewWindow(x, y, cx, cy int32, title string, hWndParent uintptr, XCStyle xcc.Window_Style_) *window.Window
NewWindow 窗口_创建.
x: 窗口左上角x坐标.
y: 窗口左上角y坐标.
cx: 窗口宽度.
cy: 窗口高度.
title: 窗口标题.
hWndParent: 父窗口.
XCStyle: 窗口样式: xcc.Window_Style_.
func NewWindowByAttach ¶ added in v1.3.391
func NewWindowByAttach(hWnd uintptr, XCStyle xcc.Window_Style_) *window.Window
NewWindowByAttach 窗口_附加窗口, 返回窗口对象.
hWnd: 要附加的外部窗口句柄.
XCStyle: 窗口样式: xcc.Window_Style_.
func NewWindowByLayout ¶ added in v1.3.391
NewWindowByLayout 从布局文件创建窗口对象, 失败返回nil.
fileName: 布局文件名.
hParent: 父对象句柄.
hAttachWnd: 附加窗口句柄, 附加到指定的窗口, 不填默认为0.
func NewWindowByLayoutEx ¶ added in v1.3.391
func NewWindowByLayoutEx(fileName, prefixName string, hParent int, hParentWnd uintptr, hAttachWnd ...uintptr) *window.Window
NewWindowByLayoutEx 从布局文件创建窗口对象, 失败返回nil.
fileName: 布局文件名.
prefixName: 名称(name)前缀, 可选参数; 给当前布局文件中所有name属性增加前缀, 那么name属性值为: 前缀 + name.
hParent: 父对象句柄.
hParentWnd: 父窗口句柄HWND, 提供给第三方窗口使用.
hAttachWnd: 附加窗口句柄, 附加到指定的窗口, 不填默认为0.
func NewWindowByLayoutStringW ¶ added in v1.3.391
NewWindowByLayoutStringW 从布局文件字符串W创建窗口对象, 失败返回nil.
xmlStr: 字符串.
hParent: 父对象.
hAttachWnd: 附加窗口句柄, 附加到指定的窗口, 不填默认为0.
func NewWindowByLayoutStringWEx ¶ added in v1.3.391
func NewWindowByLayoutStringWEx(xmlStr, prefixName string, hParent int, hParentWnd uintptr, hAttachWnd ...uintptr) *window.Window
NewWindowByLayoutStringWEx 从布局文件字符串W创建窗口对象, 失败返回nil.
xmlStr: 字符串.
prefixName: 名称(name)前缀, 可选参数; 给当前布局文件中所有name属性增加前缀, 那么name属性值为: 前缀 + name.
hParent: 父对象.
hParentWnd: 父窗口句柄HWND, 提供给第三方窗口使用.
hAttachWnd: 附加窗口句柄, 附加到指定的窗口, 不填默认为0.
func NewWindowByLayoutZip ¶ added in v1.3.391
func NewWindowByLayoutZip(zipFileName string, fileName string, password string, hParent int, hAttachWnd ...uintptr) *window.Window
NewWindowByLayoutZip 从压缩包中的布局文件创建窗口对象, 失败返回nil.
zipFileName: zip文件名.
fileName: 布局文件名.
password: zip密码.
hParent: 父对象句柄.
hAttachWnd: 附加窗口句柄, 附加到指定的窗口, 不填默认为0.
func NewWindowByLayoutZipEx ¶ added in v1.3.391
func NewWindowByLayoutZipEx(zipFileName string, fileName string, password, prefixName string, hParent int, hParentWnd uintptr, hAttachWnd ...uintptr) *window.Window
NewWindowByLayoutZipEx 从压缩包中的布局文件创建窗口对象, 失败返回nil.
zipFileName: zip文件名.
fileName: 布局文件名.
password: zip密码.
prefixName: 名称(name)前缀, 可选参数; 给当前布局文件中所有name属性增加前缀, 那么name属性值为: 前缀 + name.
hParent: 父对象句柄.
hParentWnd: 父窗口句柄HWND, 提供给第三方窗口使用.
hAttachWnd: 附加窗口句柄, 附加到指定的窗口, 不填默认为0.
func NewWindowByLayoutZipMem ¶ added in v1.3.391
func NewWindowByLayoutZipMem(data []byte, fileName string, password string, hParent int, hAttachWnd ...uintptr) *window.Window
NewWindowByLayoutZipMem 从内存压缩包中的布局文件创建窗口对象, 失败返回nil.
data: 布局文件数据.
fileName: 布局文件名.
password: zip密码.
hParent: 父对象句柄.
hAttachWnd: 附加窗口句柄, 附加到指定的窗口, 不填默认为0.
func NewWindowByLayoutZipMemEx ¶ added in v1.3.391
func NewWindowByLayoutZipMemEx(data []byte, fileName string, password, prefixName string, hParent int, hParentWnd uintptr, hAttachWnd ...uintptr) *window.Window
NewWindowByLayoutZipMemEx 从内存压缩包中的布局文件创建窗口对象, 失败返回nil.
data: 布局文件数据.
fileName: 布局文件名.
password: zip密码.
prefixName: 名称(name)前缀, 可选参数; 给当前布局文件中所有name属性增加前缀, 那么name属性值为: 前缀 + name.
hParent: 父对象句柄.
hParentWnd: 父窗口句柄HWND, 提供给第三方窗口使用.
hAttachWnd: 附加窗口句柄, 附加到指定的窗口, 不填默认为0.
func NewWindowByLayoutZipResEx ¶ added in v1.3.391
func NewWindowByLayoutZipResEx(id int32, fileName, password, prefixName string, hParent int, hParentWnd, hAttachWnd uintptr, hModule ...uintptr) *window.Window
NewWindowByLayoutZipResEx 从RC资源zip压缩包中的布局文件创建窗口对象, 失败返回nil.
id: RC资源ID.
fileName: 布局文件名.
password: zip密码.
prefixName: 名称(name)前缀, 可选参数; 给当前布局文件中所有name属性增加前缀, 那么name属性值为: 前缀 + name.
hParent: 父对象句柄.
hParentWnd: 父窗口句柄HWND, 提供给第三方窗口使用.
hAttachWnd: 附加窗口句柄, 附加到指定的窗口, 可填0.
hModule: 模块句柄, 不填默认为0.
func NewWindowEx ¶ added in v1.3.391
func NewWindowEx(dwExStyle xcc.WS_EX_, dwStyle xcc.WS_, className string, x, y, cx, cy int32, title string, hWndParent uintptr, XCStyle xcc.Window_Style_) *window.Window
NewWindowEx 窗口_创建扩展.
dwExStyle: 窗口扩展样式. xcc.WS_EX_ .
dwStyle: 窗口样式. xcc.WS_ .
className: 窗口类名.
x: 窗口左上角x坐标.
y: 窗口左上角y坐标.
cx: 窗口宽度.
cy: 窗口高度.
title: 窗口名.
hWndParent: 父窗口.
XCStyle: 窗口样式, xcc.Window_Style_.
func PostQuitMessage ¶ added in v1.3.395
func PostQuitMessage(nExitCode int32)
炫彩_PostQuitMessage, 发送WM_QUIT消息退出消息循环.
nExitCode: 退出码.
func PropertyList_GetString ¶ added in v1.4.0
属性列表_取文本. 从属性列表中, 获取指定属性名称的值.
propertylist: 属性列表.
name: 属性名.
func RegisterWindowClassName ¶ added in v1.3.395
炫彩_注册窗口类名, 如果是在DLL中使用, 那么DLL卸载时需要注销窗口类名, 否则DLL卸载后, 类名所指向的窗口过程地址失效.
className: 类名.
func RemoveCallback_LoadLayout ¶ added in v1.4.0
func RemoveCallback_LoadLayout()
RemoveCallback_LoadLayout 炫彩_移除布局加载回调.
func SetActivateTopWindow ¶ added in v1.3.395
func SetActivateTopWindow() bool
SetActivateTopWindow 炫彩_激活窗口, 激活当前进程最上层窗口.
func SetCallback_LoadLayout ¶ added in v1.4.0
func SetCallback_LoadLayout(callback xc.FunLoadLayout)
SetCallback_LoadLayout 炫彩_置回调_加载布局文件.
- 为加载布局文件设置回调函数, 当调用 xc.XC_LoadLayout 时遇到扩展对象, 回调用户设置的回调函数, 让用户在回调函数中创建扩展对象.
callback: 回调函数.
func SetD2dTextAntialiasMode ¶ added in v1.3.395
func SetD2dTextAntialiasMode(mode int32)
炫彩_置D2D文本抗锯齿模式.
mode: 模式.
func SetD2dTextRenderingMode ¶ added in v1.3.395
func SetD2dTextRenderingMode(mode xcc.XC_DWRITE_RENDERING_MODE_)
炫彩_置D2D文本渲染模式.
mode: 渲染模式, XC_DWRITE_RENDERING_MODE_ .
func SetLayoutFrameColor ¶ added in v1.3.395
func SetLayoutFrameColor(color uint32)
炫彩_置布局边界颜色.
color: xc.RGBA 颜色值.
func SetPaintFrequency ¶ added in v1.3.395
func SetPaintFrequency(nMilliseconds int32)
炫彩_置绘制频率, 设置UI的最小重绘频率.
nMilliseconds: 重绘最小时间间隔, 单位毫秒.
func SetTextRenderingHint ¶ added in v1.3.395
func SetTextRenderingHint(nType int32)
炫彩_置文本渲染质量, 设置文本渲染质量.
nType: 参见GDI+ TextRenderingHint 定义.
func SetType ¶ added in v1.4.0
func SetType(hXCGUI int, nType xcc.XC_OBJECT_TYPE)
SetType 炫彩_置类型.
hXCGUI: 炫彩对象句柄.
nType: 类型, XC_OBJECT_TYPE, 以XC_开头的常量.
func SetWindowIcon ¶ added in v1.3.395
func SetWindowIcon(hImage int)
炫彩_置窗口图标. 全局窗口图标, 所有未设置图标的窗口, 都将使用此默认图标.
hImage: 图标句柄.
func ShowLayoutFrame ¶ added in v1.3.395
func ShowLayoutFrame(bShow ...bool)
炫彩_显示布局边界, 显示布局对象边界.
bShow: 是否显示, 不填默认为 true.
func ShowSvgFrame ¶ added in v1.3.395
func ShowSvgFrame(bShow ...bool)
炫彩_显示边界.
bShow: 是否显示, 不填默认为 true.
func Sys_ShellExecute ¶ added in v1.3.395
func Sys_ShellExecute(hwnd uintptr, operation string, filePath string, parameters string, directory string, nShowCmd xcc.SW_) uintptr
对指定文件执行操作. 如果函数成功,则返回大于 32 的值。如果函数失败,则返回指示失败原因的错误值.
hwnd: 用于显示 UI 或错误消息的父窗口的句柄。如果操作与窗口无关,则此值可以为0.
operation: 填“open”则打开 filePath 文档. 其它操作详见: https://docs.microsoft.com/en-us/windows/win32/api/shellapi/nf-shellapi-shellexecutew.
filePath: 想用关联的程序打印或打开的一个程序名或文件名.
parameters: 如果 filePath 是一个可执行文件,则这个字串包含了传递给执行程序的参数.
directory: 想使用的默认路径完整路径.
nShowCmd: 定义了如何显示启动程序的常数值: xcc.SW_.
func UI ¶ added in v1.3.399
func UI(f func())
UI 炫彩_调用界面线程, 调用UI线程, 设置回调函数, 在回调函数里操作UI.
- 是 CallUT 的简写.
f: 回调函数, 没有参数也没有返回值, 可以直接使用匿名函数.
func UnicodeToAnsi ¶ added in v1.3.395
炫彩_U2A, 返回写入接收缓冲区字节数量.
in: 待转换的Unicode字符串.
inLen: in字符数量.
pOut: 指向接收转换后的Ansi字符串缓冲区指针.
outLen: pOut缓冲区大小, 字节单位.
Types ¶
type App ¶
type App struct {
}
App 程序. 封装了炫彩的全局API.
func New ¶
New 炫彩_初始化, 失败返回 nil.
- 默认会在程序运行目录和系统 system32 目录寻找并加载 xcgui.dll.
- 如果你想要更改 xcgui.dll 的路径, 那么请在调用本函数之前调用 xc.SetXcguiPath().
bD2D: 是否启用D2D, 不填默认为 true.
func (*App) AddType ¶ added in v1.4.0
func (a *App) AddType(hXCGUI int, nType xcc.XC_OBJECT_TYPE) *App
AddType 炫彩_添加类型.
hXCGUI: 炫彩对象句柄.
nType: 类型, XC_OBJECT_TYPE, 以XC_开头的常量.
func (*App) AnsiToUnicode ¶ added in v1.3.360
炫彩_A2U, 返回写入接收缓冲区字符数量.
pIn: 指向待转换的Ansi字符串指针.
inLen: pIn字符数量.
pOut: 指向接收转换后的Unicode字符串缓冲区指针.
outLen: pOut缓冲区大小,字符wchar_t单位.
func (*App) CallUT ¶ added in v1.3.360
CallUT 炫彩_调用界面线程, 调用UI线程, 设置回调函数, 在回调函数里操作UI. 与 CallUiThread 的区别是: 本函数没有2000个回调上限的限制, 回调函数可以直接使用匿名函数. 回调函数没有参数也没有返回值.
f: 回调函数, 没有参数也没有返回值, 可以直接使用匿名函数.
func (*App) CallUiThread ¶
CallUiThread 炫彩_调用界面线程, 调用UI线程, 设置回调函数, 在回调函数里操作UI. 回调函数尽量不要使用匿名函数, 使用匿名函数意味着你每次都在创建1个新的回调, 超过2000个时, 程序必将panic. 如果使用 CallUiThreadEx 和 CallUiThreader 则没有此限制.
pCall: 回调函数.
data: 传进回调函数的用户自定义数据.
func (*App) CallUiThreadEx ¶ added in v1.3.352
CallUiThreadEx 炫彩_调用界面线程, 调用UI线程, 设置回调函数, 在回调函数里操作UI. 与 CallUiThread 的区别是: 本函数没有2000个回调上限的限制, 回调函数可以直接使用匿名函数.
f: 回调函数.
data: 传进回调函数的用户自定义数据.
func (*App) CallUiThreader ¶ added in v1.3.352
func (a *App) CallUiThreader(u xc.UiThreader, data int) int
CallUiThreader 炫彩_调用界面线程, 调用UI线程, 设置回调函数, 在回调函数里操作UI. 与 CallUiThread 的区别是: 本函数没有2000个回调上限的限制, 回调函数可以直接使用匿名函数.
u: xc.UiThreader.
data: 传进回调函数的用户自定义数据.
func (*App) EnableAutoDPI ¶ added in v1.3.380
炫彩_启用自动DPI. 当启用后, 创建窗口时自动检测DPI调整UI缩放, 处理DPI改变消息; 禁用后,当DPI改变,需要手动设置窗口DPI.
bEnable: 是否启用, 不填默认为 true.
func (*App) EnableAutoExitApp ¶
炫彩_启用自动退出程序, 启动或禁用自动退出程序, 当检测到所有用户创建的窗口都关闭时, 自动退出程序; 可调用 XC_PostQuitMessage() 手动退出程序.
bEnable: 是否启用, 不填默认为 true.
func (*App) EnableAutoRedrawUI ¶ added in v1.3.390
炫彩_启用自动重绘UI. 当修改UI后将自动调用重绘函数更新UI.
- 例如改变了按钮标题后, 将自动调用 xc.XEle_Redraw 更新UI, 默认不启用, 手动和自动各有优势.
bEnable: 是否启用, 不填默认为 true.
func (*App) EnableDPI ¶ added in v1.3.381
炫彩_启用DPI.
为go程序启用DPI的几种方式:
- 调用此函数.
- 使用程序清单文件, Windows 文档里更推荐此方式.
- 自行调用 Windows DPI 命令.
bEnable: 是否启用, 不填默认为 true.
func (*App) EnableErrorMessageBox ¶
炫彩_启用错误弹窗, 启用错误弹出, 通过该接口可以设置遇到严重错误时不弹出消息提示框.
bEnable: 是否启用, 不填默认为 true.
func (*App) EnableGdiDrawText ¶
炫彩_启用GDI绘制文本, 将影响到以下函数: XDraw_TextOut, XDraw_TextOutEx, XDraw_TextOutA.
bEnable: 是否启用, 不填默认为 true.
func (*App) EnableWindowSysNc ¶ added in v1.4.0
炫彩_启用窗口系统非客户区. 当启用后拥有系统非客户区样式, 替代模拟非客户区.
bEnable: 是否启用, 不填默认为 true.
func (*App) GetD2dFactory ¶ added in v1.3.12
炫彩_取D2D工厂, 开启D2D有效, 返回 *ID2D1Factory.
func (*App) GetDWriteFactory ¶ added in v1.3.12
炫彩_取DWrite工厂, 开启D2D有效, 返回 *IDWriteFactory.
func (*App) GetDefaultFontObj ¶ added in v1.3.399
GetDefaultFontObj 炫彩_取默认字体对象. 返回字体对象, 失败返回 nil.
func (*App) GetHandleCount ¶ added in v1.3.390
炫彩_取句柄总数. 获取当前所使用的句柄总数量, 返回当前所使用的句柄总数量.
func (*App) GetObjectType ¶
func (a *App) GetObjectType(hXCGUI int) xcc.XC_OBJECT_TYPE
炫彩_取对象类型, 获取句柄类型, 返回: xcc.XC_OBJECT_TYPE, 以XC_开头的常量.
hXCGUI: 炫彩对象句柄.
func (*App) GetProcAddress ¶
炫彩_取动态库中函数地址, 系统API GetProcAddress, 返回函数地址.
hModule: 动态库模块句柄.
procName: 函数名.
func (*App) GetTextShowRect ¶
func (a *App) GetTextShowRect(str string, length int32, hFontX int, nTextAlign xcc.TextFormatFlag_, width int32, pOutSize *xc.SIZE) *App
GetTextShowRect 炫彩_取文本显示矩形.
str: 字符串.
length: 字符串长度.
hFontX: 字体.
nTextAlign: 文本对齐: xcc.TextFormatFlag_.
width: 最大宽度.
pOutSize: 接收返回大小.
func (*App) GetTextShowSizeEx ¶
func (a *App) GetTextShowSizeEx(str string, length int32, hFontX int, nTextAlign xcc.TextFormatFlag_, pOutSize *xc.SIZE) *App
炫彩_取文本显示大小扩展.
str: 字符串.
length: 字符串长度.
hFontX: 字体.
nTextAlign: 文本对齐方式, TextFormatFlag_, TextAlignFlag_, TextTrimming_.
pOutSize: 接收返回大小.
func (*App) GetWicFactory ¶ added in v1.3.12
炫彩_取WIC工厂, 开启D2D有效, 返回 *IWICImagingFactory.
func (*App) InitFont ¶
func (a *App) InitFont(pFont *xc.LOGFONTW, name string, size int32, bBold bool, bItalic bool, bUnderline bool, bStrikeOut bool) *App
炫彩_初始化字体, 初始化LOGFONTW结构体.
pFont: LOGFONTW结构体指针.
name: 字体名称.
size: 字体大小.
bBold: 是否为粗体.
bItalic: 是否为斜体.
bUnderline: 是否有下划线.
bStrikeOut: 是否有删除线.
func (*App) IsHXCGUI ¶
func (a *App) IsHXCGUI(hXCGUI int, nType xcc.XC_OBJECT_TYPE) bool
炫彩_判断句柄包含类型, 判断句柄是否拥有该类型.
hXCGUI: 炫彩句柄.
nType: 句柄类型, XC_OBJECT_TYPE , 以XC_开头的常量.
func (*App) IsUiThread ¶ added in v1.3.397
IsUiThread 判断当前线程是否是 UI 线程.
func (*App) LoadDll ¶
炫彩_加载DLL, 返回DLL模块句柄. 加载指定DLL, 并且调用DLL中函数LoadDll(), DLL中导出函数格式: int32 WINAPI LoadDll().
dllFileName: DLL文件名.
func (*App) LoadLayout ¶ added in v0.0.3
炫彩_加载布局文件, 返回窗口句柄或布局句柄或元素句柄.
fileName: 布局文件名.
hParent: 父对象句柄.
hAttachWnd: 附加窗口句柄, 附加到指定的窗口, 不填默认为0.
func (*App) LoadLayoutEx ¶ added in v1.3.370
func (a *App) LoadLayoutEx(fileName, prefixName string, hParent int, hParentWnd uintptr, hAttachWnd ...uintptr) int
炫彩_加载布局文件Ex, 返回窗口句柄或布局句柄或元素句柄.
fileName: 布局文件名.
prefixName: 名称(name)前缀, 可选参数; 给当前布局文件中所有name属性增加前缀, 那么name属性值为: 前缀 + name.
hParent: 父对象句柄, 窗口句柄或UI元素句柄.
hParentWnd: 父窗口句柄HWND, 提供给第三方窗口使用.
hAttachWnd: 附加窗口句柄, 附加到指定的窗口, 不填默认为0.
func (*App) LoadLayoutFromStringW ¶ added in v1.3.340
炫彩_加载布局文件从字符串W, 加载布局文件从内存字符串, 返回窗口句柄或布局句柄或元素句柄.
xmlStr: 字符串.
hParent: 父对象.
hAttachWnd: 附加窗口句柄, 附加到指定的窗口, 不填默认为0.
func (*App) LoadLayoutFromStringWEx ¶ added in v1.3.370
func (a *App) LoadLayoutFromStringWEx(xmlStr, prefixName string, hParent int, hParentWnd uintptr, hAttachWnd ...uintptr) int
炫彩_加载布局文件从字符串WEx, 加载布局文件从内存字符串, 返回窗口句柄或布局句柄或元素句柄.
xmlStr: 字符串.
prefixName: 名称(name)前缀, 可选参数; 给当前布局文件中所有name属性增加前缀, 那么name属性值为: 前缀 + name.
hParent: 父对象句柄, 窗口句柄或UI元素句柄.
hParentWnd: 父窗口句柄HWND, 提供给第三方窗口使用.
hAttachWnd: 附加窗口句柄, 附加到指定的窗口, 不填默认为0.
func (*App) LoadLayoutZip ¶ added in v0.0.3
func (a *App) LoadLayoutZip(zipFileName string, fileName string, password string, hParent int, hAttachWnd ...uintptr) int
炫彩_加载布局文件ZIP, 加载布局文件从zip压缩包中, 返回窗口句柄或布局句柄或元素句柄.
zipFileName: zip文件名.
fileName: 布局文件名.
password: zip密码.
hParent: 父对象句柄.
hAttachWnd: 附加窗口句柄, 附加到指定的窗口, 不填默认为0.
func (*App) LoadLayoutZipEx ¶ added in v1.3.370
func (a *App) LoadLayoutZipEx(zipFileName string, fileName string, password, prefixName string, hParent int, hParentWnd uintptr, hAttachWnd ...uintptr) int
炫彩_加载布局文件ZIPEx, 加载布局文件从zip压缩包中, 返回窗口句柄或布局句柄或元素句柄.
zipFileName: zip文件名.
fileName: 布局文件名.
password: zip密码.
prefixName: 名称(name)前缀, 可选参数; 给当前布局文件中所有name属性增加前缀, 那么name属性值为: 前缀 + name.
hParent: 父对象句柄, 窗口句柄或UI元素句柄.
hParentWnd: 父窗口句柄HWND, 提供给第三方窗口使用.
hAttachWnd: 附加窗口句柄, 附加到指定的窗口, 不填默认为0.
func (*App) LoadLayoutZipMem ¶ added in v0.0.3
func (a *App) LoadLayoutZipMem(data []byte, fileName string, password string, hParent int, hAttachWnd ...uintptr) int
炫彩_加载布局文件内存ZIP, 加载布局文件从zip压缩包中, 返回窗口句柄或布局句柄或元素句柄.
data: 内存块指针.
fileName: 布局文件名.
password: zip密码.
hParent: 父对象句柄.
hAttachWnd: 附加窗口句柄, 附加到指定的窗口, 不填默认为0.
func (*App) LoadLayoutZipMemEx ¶ added in v1.3.370
func (a *App) LoadLayoutZipMemEx(data []byte, fileName string, password, prefixName string, hParent int, hParentWnd uintptr, hAttachWnd ...uintptr) int
炫彩_加载布局文件内存ZIPEx, 加载布局文件从zip压缩包中, 返回窗口句柄或布局句柄或元素句柄.
data: 布局文件数据.
fileName: 布局文件名.
password: zip密码.
prefixName: 名称(name)前缀, 可选参数; 给当前布局文件中所有name属性增加前缀, 那么name属性值为: 前缀 + name.
hParent: 父对象句柄, 窗口句柄或UI元素句柄.
hParentWnd: 父窗口句柄HWND, 提供给第三方窗口使用.
hAttachWnd: 附加窗口句柄, 附加到指定的窗口, 不填默认为0.
func (*App) LoadLayoutZipResEx ¶ added in v1.3.380
func (a *App) LoadLayoutZipResEx(id int32, fileName string, password, prefixName string, hParent int, hParentWnd, hAttachWnd uintptr, hModule ...uintptr) int
炫彩_加载布局文件资源ZIP扩展. 加载布局文件从RC资源zip压缩包中, 返回窗口句柄或元素句柄.
id: RC资源ID.
fileName: 布局文件名.
password: zip密码.
prefixName: 名称(name)前缀, 可选参数; 给当前布局文件中所有name属性增加前缀, 那么name属性值为: 前缀 + name.
hParent: 父对象句柄, 窗口句柄或UI元素句柄, 可填0.
hParentWnd: 父窗口句柄HWND, 提供给第三方窗口使用, 可填0.
hAttachWnd: 附加窗口句柄, 附加到指定的窗口, 可填0.
hModule: 模块句柄, 不填默认为0.
func (*App) LoadLayout_Create ¶ added in v1.4.0
LoadLayout_Create 炫彩_加载布局文件_创建, 返回创建的UI对象句柄.
- 当调用 xc.XC_LoadLayout 时遇到扩展对象, 用户可在回调函数中创建内置UI对象.
data: 内部使用, 包含布局文件相关信息.
propertylist: 属性列表.
uiType: UI类型, xcc.XC_OBJECT_TYPE.
hParent: 父句柄.
func (*App) LoadResourceFromStringW ¶ added in v1.3.340
炫彩_加载资源文件从字符串W.
xmlStr: 字符串.
fileName: 资源文件名.
func (*App) LoadResourceZip ¶ added in v0.0.3
炫彩_加载资源文件ZIP.
zipFileName: zip文件名.
fileName: 资源文件名.
password: zip压缩包密码, 不填默认为空.
func (*App) LoadResourceZipMem ¶ added in v0.0.3
炫彩_加载资源文件内存ZIP.
data: 资源文件数据.
fileName: 资源文件名.
password: zip压缩包密码, 不填默认为空.
func (*App) LoadResourceZipRes ¶ added in v1.3.380
func (a *App) LoadResourceZipRes(id int32, fileName string, password string, hModule ...uintptr) bool
炫彩_加载资源文件资源ZIP. 加载资源文件从RC资源zip压缩包中.
id: RC资源ID.
fileName: 资源文件名.
password: zip压缩包密码.
hModule: 模块句柄, 不填默认为0.
func (*App) LoadStyleZip ¶ added in v0.0.3
炫彩_加载样式文件ZIP.
zipFile: ZIP文件名.
fileName: 文件名.
password: 密码, 不填默认为空.
func (*App) LoadStyleZipMem ¶ added in v0.0.3
炫彩_加载样式文件从内存ZIP.
data: 样式文件数据.
fileName: 文件名.
password: 密码, 不填默认为空.
func (*App) LoadStyleZipRes ¶ added in v1.3.380
炫彩_加载样式文件从资源ZIP. 从RC资源中的ZIP包中, 加载样式文件.
id: RC资源ID.
fileName: 文件名.
password: 密码.
hModule: 模块句柄, 不填默认为0.
func (*App) MessageBox ¶
func (a *App) MessageBox(title, text string, nFlags xcc.MessageBox_Flag_, hWndParent uintptr, XCStyle xcc.Window_Style_) xcc.MessageBox_Flag_
MessageBox 炫彩_消息框. 返回值如下: xcc.MessageBox_Flag_Ok: 点击确定按钮退出. xcc.MessageBox_Flag_Cancel: 点击取消按钮退出. xcc.MessageBox_Flag_Other: 其他方式退出.
title: 标题.
text: 内容文本.
nFlags: 标识: xcc.MessageBox_Flag_.
hWndParent: 父窗口句柄(真实的窗口句柄).
XCStyle: xcc.Window_Style_.
func (*App) Msg_Create ¶ added in v1.3.12
func (a *App) Msg_Create(title, text string, nFlags xcc.MessageBox_Flag_, hWndParent uintptr, XCStyle xcc.Window_Style_) int
Msg_Create 消息框_创建, 返回消息框窗口句柄.
title: 标题.
text: 内容文本.
nFlags: 标识: xcc.MessageBox_Flag_.
hWndParent: 父窗口句柄(真实的窗口句柄).
XCStyle: xcc.Window_Style_.
func (*App) Msg_CreateEx ¶ added in v1.3.310
func (a *App) Msg_CreateEx(dwExStyle xcc.WS_EX_, dwStyle xcc.WS_, className string, title, text string, nFlags xcc.MessageBox_Flag_, hWndParent uintptr, XCStyle xcc.Window_Style_) int
Msg_CreateEx 消息框_创建扩展, 返回消息框窗口句柄.
dwExStyle: 窗口扩展样式, xcc.WS_EX_ 常量组合.
dwStyle: 窗口样式, xcc.WS_ 常量组合.
className: 窗口类名.
title: 标题.
text: 内容文本.
nFlags: 标识: xcc.MessageBox_Flag_.
hWndParent: 父窗口句柄(真实的窗口句柄).
XCStyle: xcc.Window_Style_.
func (*App) NotifyMsg_Popup ¶ added in v1.3.310
func (a *App) NotifyMsg_Popup(position xcc.Position_Flag_, title, text string, hIcon int, skin xcc.NotifyMsg_Skin_) int
通知消息_弹出, 返回窗口句柄, 未实现, 预留接口.
position: 位置, Position_Flag_.
title: 标题.
text: 内容.
hIcon: 图标.
skin: 外观类型, NotifyMsg_Skin_.
func (*App) NotifyMsg_PopupEx ¶ added in v1.3.310
func (a *App) NotifyMsg_PopupEx(position xcc.Position_Flag_, title, text string, hIcon int, skin xcc.NotifyMsg_Skin_, bBtnClose, bAutoClose bool, nWidth, nHeight int32) int
通知消息_弹出扩展, 返回窗口句柄, 未实现, 预留接口.
position: 位置, Position_Flag_.
title: 标题.
text: 内容.
hIcon: 图标.
skin: 外观类型, NotifyMsg_Skin_.
bBtnClose: 是否启用关闭按钮.
bAutoClose: 是否自动关闭.
nWidth: 自定义宽度, -1(使用默认值).
nHeight: 自定义高度, -1(使用默认值).
func (*App) NotifyMsg_SetBorderSize ¶ added in v1.3.310
通知消息_置边大小, 设置通知消息面板边大小.
hWindow: 通知消息所属窗口句柄, 如果未指定那么认为是桌面通知消息.
left: 左边.
top: 顶边.
right: 右边.
bottom: 底边.
func (*App) NotifyMsg_SetCaptionHeight ¶ added in v1.3.310
通知消息_置标题高度.
hWindow: 通知消息所属窗口句柄, 如果未指定那么认为是桌面通知消息.
nHeight: 高度.
func (*App) NotifyMsg_SetDuration ¶ added in v1.3.310
通知消息_置持续时间.
hWindow: 通知消息所属窗口句柄, 如果未指定那么认为是桌面通知消息.
duration: 持续时间.
func (*App) NotifyMsg_SetParentMargin ¶ added in v1.3.310
通知消息_置父边距 设置通知消息与父对象的四边间隔.
hWindow: 通知消息所属窗口句柄, 如果未指定那么认为是桌面通知消息.
left: 左侧间隔, 未实现, 预留功能.
top: 顶部间隔.
right: 右侧间隔.
bottom: 底部间隔, 未实现, 预留功能.
func (*App) NotifyMsg_SetSpace ¶ added in v1.3.310
通知消息_置间隔.
hWindow: 通知消息所属窗口句柄, 如果未指定那么认为是桌面通知消息.
nSpace: 间隔大小.
func (*App) NotifyMsg_SetWidth ¶ added in v1.3.310
通知消息_置宽度, 设置默认宽度.
hWindow: 通知消息所属窗口句柄, 如果未指定那么认为是桌面通知消息.
nWidth: 宽度.
func (*App) PropertyList_GetString ¶ added in v1.4.0
属性列表_取文本. 从属性列表中, 获取指定属性名称的值.
propertylist: 属性列表.
name: 属性名.
func (*App) RegisterWindowClassName ¶
炫彩_注册窗口类名, 如果是在DLL中使用, 那么DLL卸载时需要注销窗口类名, 否则DLL卸载后, 类名所指向的窗口过程地址失效.
className: 类名.
func (*App) RemoveCallback_LoadLayout ¶ added in v1.4.0
RemoveCallback_LoadLayout 炫彩_移除布局加载回调.
func (*App) SetActivateTopWindow ¶
SetActivateTopWindow 炫彩_激活窗口, 激活当前进程最上层窗口.
func (*App) SetCallback_LoadLayout ¶ added in v1.4.0
func (a *App) SetCallback_LoadLayout(callback xc.FunLoadLayout) *App
SetCallback_LoadLayout 炫彩_置回调_加载布局文件.
- 为加载布局文件设置回调函数, 当调用 xc.XC_LoadLayout 时遇到扩展对象, 回调用户设置的回调函数, 让用户在回调函数中创建扩展对象.
callback: 回调函数.
func (*App) SetD2dTextRenderingMode ¶ added in v1.3.12
func (a *App) SetD2dTextRenderingMode(mode xcc.XC_DWRITE_RENDERING_MODE_) *App
炫彩_置D2D文本渲染模式.
mode: 渲染模式, XC_DWRITE_RENDERING_MODE_ .
func (*App) SetType ¶ added in v1.4.0
func (a *App) SetType(hXCGUI int, nType xcc.XC_OBJECT_TYPE) *App
SetType 炫彩_置类型.
hXCGUI: 炫彩对象句柄.
nType: 类型, XC_OBJECT_TYPE, 以XC_开头的常量.
func (*App) SetWindowIcon ¶ added in v1.3.380
炫彩_置窗口图标. 全局窗口图标, 所有未设置图标的窗口, 都将使用此默认图标.
hImage: 图标句柄.
func (*App) Sys_ShellExecute ¶
func (a *App) Sys_ShellExecute(hwnd uintptr, operation string, filePath string, parameters string, directory string, nShowCmd xcc.SW_) uintptr
对指定文件执行操作. 如果函数成功,则返回大于 32 的值。如果函数失败,则返回指示失败原因的错误值.
hwnd: 用于显示 UI 或错误消息的父窗口的句柄。如果操作与窗口无关,则此值可以为0.
operation: 填“open”则打开 filePath 文档. 其它操作详见: https://docs.microsoft.com/en-us/windows/win32/api/shellapi/nf-shellapi-shellexecutew.
filePath: 想用关联的程序打印或打开的一个程序名或文件名.
parameters: 如果 filePath 是一个可执行文件,则这个字串包含了传递给执行程序的参数.
directory: 想使用的默认路径完整路径.
nShowCmd: 定义了如何显示启动程序的常数值: xcc.SW_.
func (*App) UI ¶ added in v1.3.399
UI 炫彩_调用界面线程, 调用UI线程, 设置回调函数, 在回调函数里操作UI.
- 是 CallUT 的简写.
f: 回调函数, 没有参数也没有返回值, 可以直接使用匿名函数.
func (*App) UnicodeToAnsi ¶ added in v1.3.360
炫彩_U2A, 返回写入接收缓冲区字节数量.
in: 待转换的Unicode字符串.
inLen: in字符数量.
pOut: 指向接收转换后的Ansi字符串缓冲区指针.
outLen: pOut缓冲区大小, 字节单位.