Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Enlever le son d'une MessageBox

0 views
Skip to first unread message

Mamelook

unread,
May 1, 2008, 10:32:29 AM5/1/08
to
Bonjour,
Je voudrai enlever le son d'une message box (MB_ICONASTERISK) car
j'aimerai utiliser mes propres son grace a un PlaySound. Existe t-il un
tag ou une solution alternative ?

Amicalement Christophe

Christian ASTOR

unread,
May 1, 2008, 11:19:40 AM5/1/08
to
Mamelook wrote:

> Je voudrai enlever le son d'une message box (MB_ICONASTERISK) car
> j'aimerai utiliser mes propres son grace a un PlaySound. Existe t-il un
> tag ou une solution alternative ?

MessageBoxIndirect()
Pour MB_ICONASTERISK,
dwStyle = MB_USERICON | ... ;
hInstance = NULL;
lpszIcon = IDI_ASTERISK;

Mamelook

unread,
May 1, 2008, 8:49:29 PM5/1/08
to
Merci beaucoup, c'est exactement ce que je voulais !

Voici un code exploitable :

/*MessageBox informative sans son*/
void msgbox_nfo(char * titre, char * messa)
{
MSGBOXPARAMS MsgParam;
MsgParam.cbSize = sizeof(MSGBOXPARAMS);
MsgParam.dwStyle = MB_USERICON|MB_OK;
MsgParam.hInstance = NULL;
MsgParam.hwndOwner = NULL;
MsgParam.lpszIcon = IDI_ASTERISK;
MsgParam.lpszCaption = titre;
MsgParam.lpszText = messa;
MessageBoxIndirect(&MsgParam);
}

Le Thu, 01 May 2008 17:19:40 +0200, Christian ASTOR
<cast...@club-internet.fr> a écrit:

0 new messages