From 10c9b1598089c428bc236eabac87066a0da43061 Mon Sep 17 00:00:00 2001 From: ehouse Date: Mon, 31 Mar 2008 00:23:07 +0000 Subject: [PATCH] Remove params from ceDlgSetup and ceDoDlgFocusScroll --- xwords4/wince/ceblank.c | 2 +- xwords4/wince/cecondlg.c | 4 ++-- xwords4/wince/ceginfo.c | 31 +++++++++++++++++-------------- xwords4/wince/cehntlim.c | 2 +- xwords4/wince/ceprefs.c | 12 ++++++++---- xwords4/wince/cestrbx.c | 4 ++-- 6 files changed, 31 insertions(+), 24 deletions(-) diff --git a/xwords4/wince/ceblank.c b/xwords4/wince/ceblank.c index fcd62b239..151a55c88 100755 --- a/xwords4/wince/ceblank.c +++ b/xwords4/wince/ceblank.c @@ -103,7 +103,7 @@ BlankDlg(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) && bState->pi->thisPick > 0 ); #endif - ceDlgSetup( bState->globals, hDlg, XP_TRUE ); + ceDlgSetup( bState->globals, hDlg ); loadLettersList( hDlg, bState ); } else { diff --git a/xwords4/wince/cecondlg.c b/xwords4/wince/cecondlg.c index 51d14346c..632fda69e 100755 --- a/xwords4/wince/cecondlg.c +++ b/xwords4/wince/cecondlg.c @@ -178,7 +178,7 @@ ConnsDlg( HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam ) ceControlsFromAddrRec( hDlg, cState ); - ceDlgSetup( globals, hDlg, XP_FALSE ); + ceDlgSetup( globals, hDlg ); result = TRUE; } else { @@ -211,7 +211,7 @@ ConnsDlg( HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam ) } } else if ( message == WM_VSCROLL ) { if ( !IS_SMARTPHONE(globals) ) { - ceDoDlgScroll( globals, hDlg, wParam ); + ceDoDlgScroll( hDlg, wParam ); } } } diff --git a/xwords4/wince/ceginfo.c b/xwords4/wince/ceginfo.c index ec8a80ddc..b5c95f9d9 100755 --- a/xwords4/wince/ceginfo.c +++ b/xwords4/wince/ceginfo.c @@ -488,6 +488,7 @@ GameInfo(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) CEAppGlobals* globals; XP_U16 id; GameInfoState* giState; + LRESULT result = FALSE; /* XP_LOGF( "%s: %s(%d)", __func__, messageToStr( message ), message ); */ @@ -497,7 +498,7 @@ GameInfo(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) giState->hDlg = hDlg; globals = giState->globals; - ceDlgSetup( globals, hDlg, XP_TRUE ); + ceDlgSetup( globals, hDlg ); giState->newGameCtx = newg_make( MPPARM(globals->mpool) giState->isNewGame, @@ -516,7 +517,7 @@ GameInfo(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) if ( giState->isNewGame ) { (void)SetWindowText( hDlg, L"New game" ); } - return TRUE; + result = TRUE; } else { giState = (GameInfoState*)GetWindowLong( hDlg, GWL_USERDATA ); @@ -527,27 +528,27 @@ GameInfo(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) case WM_VSCROLL: if ( !IS_SMARTPHONE(globals) ) { - ceDoDlgScroll( globals, hDlg, wParam ); + ceDoDlgScroll( hDlg, wParam ); + result = TRUE; } break; /* WM_NEXTDLGCTL is worthless; prev obj still has focus */ -/* case WM_NEXTDLGCTL: */ -/* if ( !IS_SMARTPHONE(globals) ) { */ -/* ceDoDlgFocusScroll( globals, hDlg, wParam, lParam ); */ -/* } */ -/* break; */ + case WM_NEXTDLGCTL: + if ( !IS_SMARTPHONE(globals) ) { + ceDoDlgFocusScroll( hDlg, wParam, lParam ); + } + break; #ifdef OWNERDRAW_JUGGLE case WM_DRAWITEM: /* for BS_OWNERDRAW style */ ceDrawIconButton( globals, (DRAWITEMSTRUCT*)lParam ); - return TRUE; + result = TRUE; + break; #endif case WM_COMMAND: - if ( !IS_SMARTPHONE(globals) ) { - ceDoDlgFocusScroll( globals, hDlg ); - } + result = TRUE; id = LOWORD(wParam); switch( id ) { @@ -635,9 +636,10 @@ GameInfo(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) giState->userCancelled = id == IDCANCEL; cleanupGameInfoState( giState ); newg_destroy( giState->newGameCtx ); - return TRUE; } break; + default: + result = FALSE; /* case WM_CLOSE: */ /* EndDialog(hDlg, id); */ /* return TRUE; */ @@ -646,5 +648,6 @@ GameInfo(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) } } } - return FALSE; + + return result; } /* GameInfo */ diff --git a/xwords4/wince/cehntlim.c b/xwords4/wince/cehntlim.c index 4a776f1ba..4fca6fdc6 100755 --- a/xwords4/wince/cehntlim.c +++ b/xwords4/wince/cehntlim.c @@ -63,7 +63,7 @@ HintLimitsDlg( HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam ) hState = (HintLimitsState*)lParam; globals = hState->globals; - ceDlgSetup( globals, hDlg, XP_FALSE ); + ceDlgSetup( globals, hDlg ); return TRUE; } else { diff --git a/xwords4/wince/ceprefs.c b/xwords4/wince/ceprefs.c index 464b8b59b..f9314c284 100755 --- a/xwords4/wince/ceprefs.c +++ b/xwords4/wince/ceprefs.c @@ -260,7 +260,7 @@ PrefsDlg(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) loadControlsFromState( hDlg, pState ); adjustForChoice( hDlg, pState ); - ceDlgSetup( globals, hDlg, XP_TRUE ); + ceDlgSetup( globals, hDlg ); return TRUE; @@ -273,13 +273,17 @@ PrefsDlg(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) switch (message) { case WM_VSCROLL: if ( !IS_SMARTPHONE(globals) ) { - ceDoDlgScroll( globals, hDlg, wParam ); + ceDoDlgScroll( hDlg, wParam ); } break; - case WM_COMMAND: + + case WM_NEXTDLGCTL: if ( !IS_SMARTPHONE(globals) ) { - ceDoDlgFocusScroll( globals, hDlg ); + ceDoDlgFocusScroll( hDlg, wParam, lParam ); } + break; + + case WM_COMMAND: id = LOWORD(wParam); switch( id ) { diff --git a/xwords4/wince/cestrbx.c b/xwords4/wince/cestrbx.c index 45db69fe3..a9b136ba3 100755 --- a/xwords4/wince/cestrbx.c +++ b/xwords4/wince/cestrbx.c @@ -79,7 +79,7 @@ StrBox(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) } } - ceDlgSetup( globals, hDlg, XP_TRUE ); + ceDlgSetup( globals, hDlg ); handled = TRUE; } else { @@ -91,7 +91,7 @@ StrBox(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) case WM_VSCROLL: if ( !IS_SMARTPHONE(globals) ) { - ceDoDlgScroll( globals, hDlg, wParam ); + ceDoDlgScroll( hDlg, wParam ); } break;