"About" dialog box with NO bell ring?

This forum can be used to talk about general design strategies, new ideas and questions in general related to wxWidgets. If you feel your questions doesn't fit anywhere, put it here.
Post Reply
chen
In need of some credit
In need of some credit
Posts: 3
Joined: Thu Oct 14, 2004 10:38 am

"About" dialog box with NO bell ring?

Post 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. :)
Mampfred
Knows some wx things
Knows some wx things
Posts: 26
Joined: Tue Aug 31, 2004 2:28 pm
Location: Germany
Contact:

Post 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?
ezequielv
Earned a small fee
Earned a small fee
Posts: 19
Joined: Sun Oct 10, 2004 9:20 pm
Location: Berkshire, England

Post by ezequielv »

It may be GNOME intercepting the message box, can't it?
geon
I live to help wx-kind
I live to help wx-kind
Posts: 189
Joined: Tue Sep 07, 2004 4:10 pm
Location: Sweden, Uppsala

Post 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...
metalogic
Super wx Problem Solver
Super wx Problem Solver
Posts: 307
Joined: Fri Oct 08, 2004 8:21 am
Location: Area 51
Contact:

Post 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
Post Reply