diff --git a/wince/cemain.c b/wince/cemain.c index 06e69e683..99e9b2d97 100755 --- a/wince/cemain.c +++ b/wince/cemain.c @@ -1103,7 +1103,7 @@ ceLoadSavedGame( CEAppGlobals* globals ) snprintf( buf, VSIZE(buf), "Unable to open dictionary: %s", dictName ); buf[VSIZE(buf)-1] = '\0'; - ceOops( globals, NULL, buf ); + ceOops( globals, buf ); } XP_FREE( globals->mpool, dictName ); @@ -1130,7 +1130,7 @@ ceLoadSavedGame( CEAppGlobals* globals ) if ( !!dict ) { dict_destroy( dict ); } - ceOops( globals, NULL, "Saved game cannot be opened." ); + ceOops( globals, "Saved game cannot be opened." ); } } @@ -2660,7 +2660,7 @@ messageBoxStream( CEAppGlobals* globals, XWStreamCtxt* stream, wchar_t* title, int result; assertOnTop( globals->hWnd ); - result = ceMessageBoxChar( globals, NULL, buf, title, buttons ); + result = ceMessageBoxChar( globals, buf, title, buttons ); XP_FREE( globals->mpool, buf ); return result; @@ -2986,7 +2986,7 @@ ce_util_userError( XW_UtilCtxt* uc, UtilErrID id ) break; } - ceOops( globals, NULL, message ); + ceOops( globals, message ); } /* ce_util_userError */ static XP_Bool @@ -3357,7 +3357,7 @@ ce_util_warnIllegalWord( XW_UtilCtxt* uc, BadWordInfo* bwi, sprintf( msgBuf, "Word[s] %s not found in dictionary.", wordsBuf ); if ( turnLost ) { - ceMessageBoxChar( globals, NULL, msgBuf, L"Illegal word", + ceMessageBoxChar( globals, msgBuf, L"Illegal word", MB_OK | MB_ICONHAND ); isOk = XP_TRUE; } else { diff --git a/wince/ceprefs.c b/wince/ceprefs.c index f3edb5b78..94da0221e 100755 --- a/wince/ceprefs.c +++ b/wince/ceprefs.c @@ -333,7 +333,7 @@ PrefsDlg(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) break; case IDC_CHECKHINTSLIMITS: if ( IS_SMARTPHONE(globals) ) { - ceMessageBoxChar( globals, hDlg, "This feature " + ceMessageBoxChar( globals, "This feature " "requires a touch screen.", L"Sorry", MB_OK | MB_ICONHAND ); ceSetChecked( hDlg, IDC_CHECKHINTSLIMITS, XP_FALSE ); diff --git a/wince/ceutil.c b/wince/ceutil.c index ae8e240e4..aab21a3e1 100755 --- a/wince/ceutil.c +++ b/wince/ceutil.c @@ -881,9 +881,10 @@ ceGetPath( CEAppGlobals* globals, CePathType typ, } /* ceGetPath */ int -ceMessageBoxChar( CEAppGlobals* XP_UNUSED(globals), HWND parent, - const XP_UCHAR* str, const wchar_t* title, XP_U16 buttons ) +ceMessageBoxChar( CEAppGlobals* XP_UNUSED(globals), const XP_UCHAR* str, + const wchar_t* title, XP_U16 buttons ) { + HWND parent; /* Get the length required, then alloc and go. This is technically correct, but everywhere else I assume a 2:1 ratio for wchar_t:char. */ XP_U16 clen = 1 + strlen(str); @@ -893,16 +894,13 @@ ceMessageBoxChar( CEAppGlobals* XP_UNUSED(globals), HWND parent, MultiByteToWideChar( CP_ACP, MB_PRECOMPOSED, str, clen, widebuf, wlen ); -/* if ( !parent ) { */ -/* parent = globals->hWnd; */ -/* } */ parent = GetForegroundWindow(); return MessageBox( parent, widebuf, title, buttons ); } /* ceMessageBoxChar */ int -ceOops( CEAppGlobals* globals, HWND parent, const XP_UCHAR* str ) +ceOops( CEAppGlobals* globals, const XP_UCHAR* str ) { - return ceMessageBoxChar( globals, parent, str, L"Oops!", + return ceMessageBoxChar( globals, str, L"Oops!", MB_OK | MB_ICONHAND ); } diff --git a/wince/ceutil.h b/wince/ceutil.h index e01c42027..d7ac2e24b 100755 --- a/wince/ceutil.h +++ b/wince/ceutil.h @@ -47,9 +47,9 @@ void ceCheckMenus( const CEAppGlobals* globals ); void ceGetItemRect( HWND hDlg, XP_U16 resID, RECT* rect ); void ceMoveItem( HWND hDlg, XP_U16 resID, XP_S16 byX, XP_S16 byY ); -int ceMessageBoxChar( CEAppGlobals* globals, HWND parent, const XP_UCHAR* str, +int ceMessageBoxChar( CEAppGlobals* globals, const XP_UCHAR* str, const wchar_t* title, XP_U16 buttons ); -int ceOops( CEAppGlobals* globals, HWND parent, const XP_UCHAR* str ); +int ceOops( CEAppGlobals* globals, const XP_UCHAR* str ); typedef enum { PREFS_FILE_PATH_L