Info Posted July 21, 2011 Share 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 Link to comment Share on other sites More sharing options...
tlman12 Posted July 21, 2011 Share 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) Link to comment Share on other sites More sharing options...
Info Posted July 21, 2011 Author Share Posted July 21, 2011 So MB_ICONQUESTION has no sound Link to comment Share on other sites More sharing options...
Tripredacus Posted July 21, 2011 Share Posted July 21, 2011 So MB_ICONQUESTION has no sound Do you have a sound assigned to the Question sound event? Twitter | MSFN | VGCollect Link to comment Share on other sites More sharing options...
Info Posted July 21, 2011 Author Share Posted July 21, 2011 What do you mean? Link to comment Share on other sites More sharing options...
Tripredacus Posted July 21, 2011 Share 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 Link to comment Share on other sites More sharing options...
sleepydvdr Posted July 21, 2011 Share Posted July 21, 2011 #include <ByteMe.au3> Link to comment Share on other sites More sharing options...
Info Posted July 21, 2011 Author Share Posted July 21, 2011 Okay thanks Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now