Exemple #1
0
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
}
Exemple #2
0
func CursorHelp() Cursor {
	return stockCursor{win.LoadCursor(0, win.MAKEINTRESOURCE(win.IDC_HELP))}
}
Exemple #3
0
func CursorAppStarting() Cursor {
	return stockCursor{win.LoadCursor(0, win.MAKEINTRESOURCE(win.IDC_APPSTARTING))}
}
Exemple #4
0
func CursorHand() Cursor {
	return stockCursor{win.LoadCursor(0, win.MAKEINTRESOURCE(win.IDC_HAND))}
}
Exemple #5
0
func CursorNo() Cursor {
	return stockCursor{win.LoadCursor(0, win.MAKEINTRESOURCE(win.IDC_NO))}
}
Exemple #6
0
func CursorUpArrow() Cursor {
	return stockCursor{win.LoadCursor(0, win.MAKEINTRESOURCE(win.IDC_UPARROW))}
}
Exemple #7
0
func CursorCross() Cursor {
	return stockCursor{win.LoadCursor(0, win.MAKEINTRESOURCE(win.IDC_CROSS))}
}
Exemple #8
0
func IconError() *Icon {
	return &Icon{win.LoadIcon(0, win.MAKEINTRESOURCE(win.IDI_ERROR)), true}
}
Exemple #9
0
func CursorIBeam() Cursor {
	return stockCursor{win.LoadCursor(0, win.MAKEINTRESOURCE(win.IDC_IBEAM))}
}
Exemple #10
0
func IconWinLogo() *Icon {
	return &Icon{win.LoadIcon(0, win.MAKEINTRESOURCE(win.IDI_WINLOGO)), true}
}
Exemple #11
0
func IconShield() *Icon {
	return &Icon{win.LoadIcon(0, win.MAKEINTRESOURCE(win.IDI_SHIELD)), true}
}
Exemple #12
0
func IconInformation() *Icon {
	return &Icon{win.LoadIcon(0, win.MAKEINTRESOURCE(win.IDI_INFORMATION)), true}
}
Exemple #13
0
func IconWarning() *Icon {
	return &Icon{win.LoadIcon(0, win.MAKEINTRESOURCE(win.IDI_WARNING)), true}
}
Exemple #14
0
func IconQuestion() *Icon {
	return &Icon{win.LoadIcon(0, win.MAKEINTRESOURCE(win.IDI_QUESTION)), true}
}
Exemple #15
0
func CursorIcon() Cursor {
	return stockCursor{win.LoadCursor(0, win.MAKEINTRESOURCE(win.IDC_ICON))}
}
Exemple #16
0
func CursorWait() Cursor {
	return stockCursor{win.LoadCursor(0, win.MAKEINTRESOURCE(win.IDC_WAIT))}
}
Exemple #17
0
func CursorSize() Cursor {
	return stockCursor{win.LoadCursor(0, win.MAKEINTRESOURCE(win.IDC_SIZE))}
}
Exemple #18
0
func IconApplication() *Icon {
	return &Icon{win.LoadIcon(0, win.MAKEINTRESOURCE(win.IDI_APPLICATION)), true}
}