[windows] Fix dialog icon

This commit is contained in:
Lea Anthony
2023-10-09 17:34:56 +11:00
parent 9ffc06d42e
commit bf13afd895
2 changed files with 6 additions and 1 deletions
+1 -1
View File
@@ -11,7 +11,7 @@ func MessageBoxWithIcon(hwnd HWND, text *uint16, caption *uint16, iconID int, fl
params := MSGBOXPARAMS{
cbSize: uint32(unsafe.Sizeof(MSGBOXPARAMS{})),
hwndOwner: hwnd,
hInstance: 0,
hInstance: GetApplicationHandle(),
lpszText: text,
lpszCaption: caption,
dwStyle: flags,
+5
View File
@@ -60,6 +60,11 @@ func GetModuleHandle(modulename string) HINSTANCE {
return HINSTANCE(ret)
}
func GetApplicationHandle() HINSTANCE {
ret, _, _ := procGetModuleHandle.Call(0)
return ret
}
func MulDiv(number, numerator, denominator int) int {
ret, _, _ := procMulDiv.Call(
uintptr(number),