Gave message boxes on Windows the MB_TASKMODAL style, which does event modality to the other windows in the program. Does not affect resizes.
This commit is contained in:
parent
a1150fb9ea
commit
74c851754c
|
@ -21,6 +21,7 @@ func _msgBox(primarytext string, secondarytext string, uType uint32) (result int
|
||||||
if secondarytext != "" {
|
if secondarytext != "" {
|
||||||
text += "\n\n" + secondarytext
|
text += "\n\n" + secondarytext
|
||||||
}
|
}
|
||||||
|
uType |= _MB_TASKMODAL // make modal to every window in the program (they're all windows of the uitask, which is a single thread)
|
||||||
ret := make(chan uiret)
|
ret := make(chan uiret)
|
||||||
defer close(ret)
|
defer close(ret)
|
||||||
uitask <- &uimsg{
|
uitask <- &uimsg{
|
||||||
|
|
|
@ -49,6 +49,7 @@ const _LF_FACESIZE = 32
|
||||||
const _MA_ACTIVATE = 1
|
const _MA_ACTIVATE = 1
|
||||||
const _MB_ICONERROR = 16
|
const _MB_ICONERROR = 16
|
||||||
const _MB_OK = 0
|
const _MB_OK = 0
|
||||||
|
const _MB_TASKMODAL = 8192
|
||||||
const _MK_LBUTTON = 1
|
const _MK_LBUTTON = 1
|
||||||
const _MK_MBUTTON = 16
|
const _MK_MBUTTON = 16
|
||||||
const _MK_RBUTTON = 2
|
const _MK_RBUTTON = 2
|
||||||
|
|
|
@ -49,6 +49,7 @@ const _LF_FACESIZE = 32
|
||||||
const _MA_ACTIVATE = 1
|
const _MA_ACTIVATE = 1
|
||||||
const _MB_ICONERROR = 16
|
const _MB_ICONERROR = 16
|
||||||
const _MB_OK = 0
|
const _MB_OK = 0
|
||||||
|
const _MB_TASKMODAL = 8192
|
||||||
const _MK_LBUTTON = 1
|
const _MK_LBUTTON = 1
|
||||||
const _MK_MBUTTON = 16
|
const _MK_MBUTTON = 16
|
||||||
const _MK_RBUTTON = 2
|
const _MK_RBUTTON = 2
|
||||||
|
|
Loading…
Reference in New Issue