diff --git a/reactos/include/defines.h b/reactos/include/defines.h index 5e8bbcbe47d..f3dee23513c 100644 --- a/reactos/include/defines.h +++ b/reactos/include/defines.h @@ -2100,6 +2100,7 @@ extern "C" { #define MB_TASKMODAL (0x2000L) #define MB_YESNO (0x4L) #define MB_YESNOCANCEL (0x3L) +#define MB_CANCELTRYCONTINUE (0x6L) #define IDABORT (3) #define IDCANCEL (2) #define IDCLOSE (8) @@ -2109,6 +2110,8 @@ extern "C" { #define IDOK (1) #define IDRETRY (4) #define IDYES (6) +#define IDTRYAGAIN (10) +#define IDCONTINUE (11) /* MessageProc */ #define MSGF_DIALOGBOX (0) diff --git a/reactos/lib/user32/misc/stubs.c b/reactos/lib/user32/misc/stubs.c index b88d072e714..3bbfad6abc9 100644 --- a/reactos/lib/user32/misc/stubs.c +++ b/reactos/lib/user32/misc/stubs.c @@ -1,4 +1,4 @@ -/* $Id: stubs.c,v 1.35 2003/08/21 15:26:18 weiden Exp $ +/* $Id: stubs.c,v 1.36 2003/08/22 00:33:47 weiden Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS user32.dll @@ -235,30 +235,6 @@ LockWorkStation(VOID) } -/* - * @implemented - */ -WINBOOL -STDCALL -MessageBeep( - UINT uType) -{ - CHAR EventName[64]; - - switch(uType) - { - case 0xFFFFFFFF : return Beep(500, 100); // Beep through speaker - case MB_ICONASTERISK : strcpy(EventName, "SystemAsterisk"); break; - case MB_ICONEXCLAMATION : strcpy(EventName, "SystemExclamation"); break; - case MB_ICONHAND : strcpy(EventName, "SystemHand"); break; - case MB_ICONQUESTION : strcpy(EventName, "SystemQuestion"); break; - case MB_OK : strcpy(EventName, "SystemDefault"); break; - } -// return PlaySoundA((LPCSTR) &EventName, NULL, SND_ALIAS | SND_NOWAIT | SND_NOSTOP | SND_ASYNC); - return FALSE; -} - - /* * @unimplemented */ diff --git a/reactos/lib/user32/windows/messagebox.c b/reactos/lib/user32/windows/messagebox.c index 9b592a36176..4404ba87168 100644 --- a/reactos/lib/user32/windows/messagebox.c +++ b/reactos/lib/user32/windows/messagebox.c @@ -16,7 +16,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -/* $Id: messagebox.c,v 1.11 2003/08/09 14:25:07 chorns Exp $ +/* $Id: messagebox.c,v 1.12 2003/08/22 00:33:47 weiden Exp $ * * PROJECT: ReactOS user32.dll * FILE: lib/user32/windows/messagebox.c @@ -40,6 +40,8 @@ #include #include +typedef UINT *LPUINT; +#include /* DEFINES *******************************************************************/ @@ -67,16 +69,6 @@ #ifndef MB_DEFMASK #define MB_DEFMASK 0x00000F00 #endif -#ifndef MB_CANCELTRYCONTINUE -#define MB_CANCELTRYCONTINUE (0x6L) -#endif -#ifndef IDTRYAGAIN -#define IDTRYAGAIN 10 -#endif -#ifndef IDCONTINUE -#define IDCONTINUE 11 -#endif - /* FUNCTIONS *****************************************************************/ @@ -688,10 +680,49 @@ MessageBoxW( */ DWORD STDCALL -SoftModalMessageBox (DWORD Unknown0) +SoftModalMessageBox(DWORD Unknown0) { UNIMPLEMENTED; return 0; } + +/* + * @implemented + */ +WINBOOL +STDCALL +MessageBeep(UINT uType) +{ +#if 0 + LPWSTR EventName; + + switch(uType) + { + case 0xFFFFFFFF: + /* FIXME check if soundcard installed, else fall through to MB_OK */ + return Beep(500, 100); // Beep through speaker + case MB_OK: + EventName = L"SystemDefault"; + break; + case MB_ICONASTERISK: + EventName = L"SystemAsterisk"; + break; + case MB_ICONEXCLAMATION: + EventName = L"SystemExclamation"; + break; + case MB_ICONHAND: + EventName = L"SystemHand"; + break; + case MB_ICONQUESTION: + EventName = L"SystemQuestion"; + break; + } + DbgPrint("Playing sound: %ws\n", (LPWSTR)EventName); + return PlaySoundW(EventName, NULL, SND_ALIAS | SND_NOWAIT | SND_NOSTOP | SND_ASYNC); +#else + return Beep(500, 100); // Beep through speaker +#endif +} + /* EOF */