本文整理汇总了Golang中github.com/lxn/win.LoadCursor函数的典型用法代码示例。如果您正苦于以下问题:Golang LoadCursor函数的具体用法?Golang LoadCursor怎么用?Golang LoadCursor使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了LoadCursor函数的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Golang代码示例。
示例1: MustRegisterWindowClassWithWndProcPtr
func MustRegisterWindowClassWithWndProcPtr(className string, wndProcPtr uintptr) {
if registeredWindowClasses[className] {
panic("window class already registered")
}
hInst := win.GetModuleHandle(nil)
if hInst == 0 {
panic("GetModuleHandle")
}
hIcon := win.LoadIcon(0, (*uint16)(unsafe.Pointer(uintptr(win.IDI_APPLICATION))))
if hIcon == 0 {
panic("LoadIcon")
}
hCursor := win.LoadCursor(0, (*uint16)(unsafe.Pointer(uintptr(win.IDC_ARROW))))
if hCursor == 0 {
panic("LoadCursor")
}
var wc win.WNDCLASSEX
wc.CbSize = uint32(unsafe.Sizeof(wc))
wc.LpfnWndProc = wndProcPtr
wc.HInstance = hInst
wc.HIcon = hIcon
wc.HCursor = hCursor
wc.HbrBackground = win.COLOR_BTNFACE + 1
wc.LpszClassName = syscall.StringToUTF16Ptr(className)
if atom := win.RegisterClassEx(&wc); atom == 0 {
panic("RegisterClassEx")
}
registeredWindowClasses[className] = true
}
示例2: MyRegisterClass
func MyRegisterClass(hInstance win.HINSTANCE) (atom win.ATOM) {
var wc win.WNDCLASSEX
wc.CbSize = uint32(unsafe.Sizeof(wc))
wc.Style = win.CS_HREDRAW | win.CS_VREDRAW
wc.LpfnWndProc = syscall.NewCallback(WndProc)
wc.CbClsExtra = 0
wc.CbWndExtra = 0
wc.HInstance = hInstance
wc.HbrBackground = win.GetSysColorBrush(win.COLOR_WINDOWFRAME)
wc.LpszMenuName = syscall.StringToUTF16Ptr("")
wc.LpszClassName = syscall.StringToUTF16Ptr(wndClassName)
wc.HIconSm = win.LoadIcon(0, win.MAKEINTRESOURCE(win.IDI_APPLICATION))
wc.HIcon = win.LoadIcon(0, win.MAKEINTRESOURCE(win.IDI_APPLICATION))
wc.HCursor = win.LoadCursor(0, win.MAKEINTRESOURCE(win.IDC_ARROW))
return win.RegisterClassEx(&wc)
}
示例3: CursorSize
func CursorSize() Cursor {
return stockCursor{win.LoadCursor(0, win.MAKEINTRESOURCE(win.IDC_SIZE))}
}
示例4: CursorHelp
func CursorHelp() Cursor {
return stockCursor{win.LoadCursor(0, win.MAKEINTRESOURCE(win.IDC_HELP))}
}
示例5: CursorIcon
func CursorIcon() Cursor {
return stockCursor{win.LoadCursor(0, win.MAKEINTRESOURCE(win.IDC_ICON))}
}
示例6: CursorHand
func CursorHand() Cursor {
return stockCursor{win.LoadCursor(0, win.MAKEINTRESOURCE(win.IDC_HAND))}
}
示例7: CursorAppStarting
func CursorAppStarting() Cursor {
return stockCursor{win.LoadCursor(0, win.MAKEINTRESOURCE(win.IDC_APPSTARTING))}
}
示例8: CursorNo
func CursorNo() Cursor {
return stockCursor{win.LoadCursor(0, win.MAKEINTRESOURCE(win.IDC_NO))}
}
示例9: CursorUpArrow
func CursorUpArrow() Cursor {
return stockCursor{win.LoadCursor(0, win.MAKEINTRESOURCE(win.IDC_UPARROW))}
}
示例10: CursorCross
func CursorCross() Cursor {
return stockCursor{win.LoadCursor(0, win.MAKEINTRESOURCE(win.IDC_CROSS))}
}
示例11: CursorWait
func CursorWait() Cursor {
return stockCursor{win.LoadCursor(0, win.MAKEINTRESOURCE(win.IDC_WAIT))}
}
示例12: CursorIBeam
func CursorIBeam() Cursor {
return stockCursor{win.LoadCursor(0, win.MAKEINTRESOURCE(win.IDC_IBEAM))}
}