Info 1 Posted July 21, 2011 (edited) Does the MessageBox function from the WinAPI has a built-in sound-making function or does the C++ source of AutoIt include some kind of function like PlaySound after MsgBox has been called? I'm asking this because I just used MessageBox and I heard no sound. The flags I used are MB_ICONQUESTION | MB_YESNO. Edited July 21, 2011 by Info Share this post Link to post Share on other sites
tlman12 0 Posted July 21, 2011 the sound made depends on the icon used i'm pretty sure it's built into windows. you may just not have a sound set for qustions. MsgBox(48,"Autoit","a") MsgBox(32,"Autoit","b") MsgBox(16,"Autoit","c") MsgBox(64,"Autoit","d") Global Const $MB_ICONQUESTION = 0x00000020 Global Const $MB_ICONERROR = 0x00000010 Global Const $MB_ICONINFORMATION = 0x00000040 Global Const $MB_ICONWARNING = 0x00000030 DllCall("user32.dll", "int", "MessageBox", "int", 0, "str", "a", "str", "Windows API", "uint", $MB_ICONWARNING) DllCall("user32.dll", "int", "MessageBox", "int", 0, "str", "b", "str", "Windows API", "uint", $MB_ICONQUESTION) DllCall("user32.dll", "int", "MessageBox", "int", 0, "str", "c", "str", "Windows API", "uint", $MB_ICONERROR) DllCall("user32.dll", "int", "MessageBox", "int", 0, "str", "d", "str", "Windows API", "uint", $MB_ICONINFORMATION) Share this post Link to post Share on other sites
Info 1 Posted July 21, 2011 So MB_ICONQUESTION has no sound Share this post Link to post Share on other sites
Tripredacus 35 Posted July 21, 2011 So MB_ICONQUESTION has no sound Do you have a sound assigned to the Question sound event? Twitter | MSFN | VGCollect Share this post Link to post Share on other sites
Tripredacus 35 Posted July 21, 2011 In Control Panel, in Sounds, each sound event is there. A MsgBox that is marked as question will trigger the sound set for Question in the sound panel. If you have no sound set for a Question Modal window event it won't play a sound. Twitter | MSFN | VGCollect Share this post Link to post Share on other sites
sleepydvdr 8 Posted July 21, 2011 #include <ByteMe.au3> Share this post Link to post Share on other sites