Page 1 of 1

"About" dialog box with NO bell ring?

Posted: Thu Oct 14, 2004 10:53 am
by chen
Hi, is there a way to create a wxMessageBox or a modal wxDialog without having a bell ring when the window first shows up? It's okay to ring the bell if the user attempts to click outside the modal area, I just don't want it to ring by default when the window is first opened.

I am trying to create a quiet "About" dialog box. Thank you. :)

Posted: Thu Oct 14, 2004 12:05 pm
by Mampfred
I never get a bell on either showing a modal wxDialog or a wxMessageBox. Can you provide OD, wx version, compiler and some sample code of what you're doing?

Posted: Thu Oct 14, 2004 12:58 pm
by ezequielv
It may be GNOME intercepting the message box, can't it?

Posted: Thu Oct 14, 2004 2:49 pm
by geon

Code: Select all

void MainFrame::OnMenuHelpAbout(wxCommandEvent& event){
  // Display splash screen.
  wxImage bitmap;
  if(bitmap.LoadFile("splash.png")){
      new wxSplashScreen(bitmap,
        wxSPLASH_CENTRE_ON_SCREEN|wxSPLASH_TIMEOUT,
        10000, NULL, -1, wxDefaultPosition, wxDefaultSize,
        wxSIMPLE_BORDER|wxSTAY_ON_TOP);
  }
  else wxMessageBox("(c) Victor Widell 2004\nCreated with Dev-C++.", "About");
}
works perfectly...

Posted: Thu Oct 14, 2004 6:52 pm
by metalogic
A humble suggestion from a newbie.

If this is on Windows, that's an OS option to have a bell for message boxes. Look at control panel under sounds.

Also, if you had a "real" about dialog instead of a message box, this probably wouldn't be an issue.

Hope this helps.

- Santiago