func NewIconFromResourceId(id uintptr) (*Icon, error) { hInst := win.GetModuleHandle(nil) if hInst == 0 { return nil, lastError("GetModuleHandle") } hIcon := win.LoadIcon(hInst, win.MAKEINTRESOURCE(id)) if hIcon == 0 { return nil, lastError("LoadIcon") } return &Icon{hIcon: hIcon}, nil }
func CursorHelp() Cursor { return stockCursor{win.LoadCursor(0, win.MAKEINTRESOURCE(win.IDC_HELP))} }
func CursorAppStarting() Cursor { return stockCursor{win.LoadCursor(0, win.MAKEINTRESOURCE(win.IDC_APPSTARTING))} }
func CursorHand() Cursor { return stockCursor{win.LoadCursor(0, win.MAKEINTRESOURCE(win.IDC_HAND))} }
func CursorNo() Cursor { return stockCursor{win.LoadCursor(0, win.MAKEINTRESOURCE(win.IDC_NO))} }
func CursorUpArrow() Cursor { return stockCursor{win.LoadCursor(0, win.MAKEINTRESOURCE(win.IDC_UPARROW))} }
func CursorCross() Cursor { return stockCursor{win.LoadCursor(0, win.MAKEINTRESOURCE(win.IDC_CROSS))} }
func IconError() *Icon { return &Icon{win.LoadIcon(0, win.MAKEINTRESOURCE(win.IDI_ERROR)), true} }
func CursorIBeam() Cursor { return stockCursor{win.LoadCursor(0, win.MAKEINTRESOURCE(win.IDC_IBEAM))} }
func IconWinLogo() *Icon { return &Icon{win.LoadIcon(0, win.MAKEINTRESOURCE(win.IDI_WINLOGO)), true} }
func IconShield() *Icon { return &Icon{win.LoadIcon(0, win.MAKEINTRESOURCE(win.IDI_SHIELD)), true} }
func IconInformation() *Icon { return &Icon{win.LoadIcon(0, win.MAKEINTRESOURCE(win.IDI_INFORMATION)), true} }
func IconWarning() *Icon { return &Icon{win.LoadIcon(0, win.MAKEINTRESOURCE(win.IDI_WARNING)), true} }
func IconQuestion() *Icon { return &Icon{win.LoadIcon(0, win.MAKEINTRESOURCE(win.IDI_QUESTION)), true} }
func CursorIcon() Cursor { return stockCursor{win.LoadCursor(0, win.MAKEINTRESOURCE(win.IDC_ICON))} }
func CursorWait() Cursor { return stockCursor{win.LoadCursor(0, win.MAKEINTRESOURCE(win.IDC_WAIT))} }
func CursorSize() Cursor { return stockCursor{win.LoadCursor(0, win.MAKEINTRESOURCE(win.IDC_SIZE))} }
func IconApplication() *Icon { return &Icon{win.LoadIcon(0, win.MAKEINTRESOURCE(win.IDI_APPLICATION)), true} }