Jump to content

About MsgBox


Recommended Posts

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 by Info
Link to comment
Share on other sites

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...