1
0
mirror of https://github.com/Ylianst/MeshAgent synced 2025-12-16 00:03:45 +00:00

Updated user consent dialog box on windows to popup as a foreground window

This commit is contained in:
Bryan Roe
2019-08-07 17:21:43 -07:00
parent 7e5ddc6767
commit 10332b3775
2 changed files with 20 additions and 18 deletions

File diff suppressed because one or more lines are too long

View File

@@ -21,6 +21,8 @@ const MB_ABORTRETRYIGNORE = 0x00000002;
const MB_YESNOCANCEL = 0x00000003;
const MB_YESNO = 0x00000004;
const MB_RETRYCANCEL = 0x00000005;
const MB_TOPMOST = 0x00040000;
const MB_SETFOREGROUND = 0x00010000;
const MB_DEFBUTTON1 = 0x00000000;
const MB_DEFBUTTON2 = 0x00000100;
@@ -50,7 +52,7 @@ var childScript = "\
var GM = require('_GenericMarshal');\
var user32 = GM.CreateNativeProxy('user32.dll');\
user32.CreateMethod('MessageBoxA');\
user32.MessageBoxA.async(0, GM.CreateVariable(j.caption), GM.CreateVariable(j.title), " + (MB_YESNO | MB_DEFBUTTON2 | MB_ICONEXCLAMATION).toString() + ").then(\
user32.MessageBoxA.async(0, GM.CreateVariable(j.caption), GM.CreateVariable(j.title), " + (MB_YESNO | MB_DEFBUTTON2 | MB_ICONEXCLAMATION | MB_SETFOREGROUND).toString() + ").then(\
function(r)\
{\
if(r.Val == " + IDYES.toString() + ")\