mirror of
https://github.com/wavetermdev/wails.git
synced 2026-08-05 13:53:43 -07:00
[windows] Fix dialog icon
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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),
|
||||
|
||||
Reference in New Issue
Block a user