Пример #1
0
func createIconFromResourceEx(pbIconBits *byte, cbIconBits w32.DWORD, fIcon bool, dwVersion w32.DWORD,
	cxDesired, cyDesired int32, flags uint32) (w32.HICON, error) {
	ret, _, _ := procCreateIconFromResourceEx.Call(
		uintptr(unsafe.Pointer(pbIconBits)),
		uintptr(cbIconBits),
		uintptr(w32.BoolToBOOL(fIcon)),
		uintptr(dwVersion),
		uintptr(cxDesired),
		uintptr(cyDesired),
		uintptr(flags),
	)
	if ret == 0 {
		return w32.HICON(0), syscall.GetLastError()
	}
	return w32.HICON(ret), nil
}
Пример #2
0
//Public methods
func (this *Edit) SetReadOnly(isReadOnly bool) {
	w32.SendMessage(this.hwnd, w32.EM_SETREADONLY, uintptr(w32.BoolToBOOL(isReadOnly)), 0)
}
Пример #3
0
func (this *ProgressBar) Range() (min, max uint) {
	min = uint(w32.SendMessage(this.hwnd, w32.PBM_GETRANGE, uintptr(w32.BoolToBOOL(true)), 0))
	max = uint(w32.SendMessage(this.hwnd, w32.PBM_GETRANGE, uintptr(w32.BoolToBOOL(false)), 0))
	return
}