From 949a67b15f20a09b42f158f46c10f74fffbcc52a Mon Sep 17 00:00:00 2001 From: ehouse Date: Sat, 27 Sep 2008 15:05:26 +0000 Subject: [PATCH] {G|S}etWindowLong -> {G|S}etWindowLongPtr as per MSDN docs --- wince/ceaskpwd.c | 4 ++-- wince/ceblank.c | 4 ++-- wince/ceclrsel.c | 8 ++++---- wince/cecondlg.c | 4 ++-- wince/ceginfo.c | 4 ++-- wince/cehntlim.c | 4 ++-- wince/ceprefs.c | 5 +++-- wince/cestrbx.c | 11 ++++++----- wince/cesvdgms.c | 8 ++++---- 9 files changed, 27 insertions(+), 25 deletions(-) diff --git a/wince/ceaskpwd.c b/wince/ceaskpwd.c index 6fbad9ae5..abebffa2d 100755 --- a/wince/ceaskpwd.c +++ b/wince/ceaskpwd.c @@ -46,7 +46,7 @@ PasswdDlg(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) XP_U16 id; if ( message == WM_INITDIALOG ) { - SetWindowLong( hDlg, GWL_USERDATA, lParam ); + SetWindowLongPtr( hDlg, GWL_USERDATA, lParam ); pState = (PasswdDialogState*)lParam; ceDlgSetup( &pState->dlgHdr, hDlg, DLG_STATE_TRAPBACK ); @@ -55,7 +55,7 @@ PasswdDlg(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) return TRUE; } else { - pState = (PasswdDialogState*)GetWindowLong( hDlg, GWL_USERDATA ); + pState = (PasswdDialogState*)GetWindowLongPtr( hDlg, GWL_USERDATA ); if ( !!pState ) { if ( ceDoDlgHandle( &pState->dlgHdr, message, wParam, lParam ) ) { diff --git a/wince/ceblank.c b/wince/ceblank.c index 71bbf6b05..658e49b6b 100755 --- a/wince/ceblank.c +++ b/wince/ceblank.c @@ -93,7 +93,7 @@ BlankDlg(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) XP_U16 id; if ( message == WM_INITDIALOG ) { - SetWindowLong( hDlg, GWL_USERDATA, lParam ); + SetWindowLongPtr( hDlg, GWL_USERDATA, lParam ); bState = (BlankDialogState*)lParam; #ifdef FEATURE_TRAY_EDIT @@ -115,7 +115,7 @@ BlankDlg(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) loadLettersList( bState ); } else { - bState = (BlankDialogState*)GetWindowLong( hDlg, GWL_USERDATA ); + bState = (BlankDialogState*)GetWindowLongPtr( hDlg, GWL_USERDATA ); if ( !!bState ) { if ( ceDoDlgHandle( &bState->dlgHdr, message, wParam, lParam) ) { diff --git a/wince/ceclrsel.c b/wince/ceclrsel.c index 4f35b32cb..692fbd122 100644 --- a/wince/ceclrsel.c +++ b/wince/ceclrsel.c @@ -138,7 +138,7 @@ EditColorsDlg( HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam ) NMTOOLBAR* nmToolP; if ( message == WM_INITDIALOG ) { - SetWindowLong( hDlg, GWL_USERDATA, lParam ); + SetWindowLongPtr( hDlg, GWL_USERDATA, lParam ); eState = (ClrEditDlgState*)lParam; eState->cancelled = XP_TRUE; @@ -162,7 +162,7 @@ EditColorsDlg( HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam ) return TRUE; } else { - eState = (ClrEditDlgState*)GetWindowLong( hDlg, GWL_USERDATA ); + eState = (ClrEditDlgState*)GetWindowLongPtr( hDlg, GWL_USERDATA ); if ( !eState ) { return FALSE; } @@ -383,7 +383,7 @@ ColorsDlg( HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam ) BOOL result = FALSE; if ( message == WM_INITDIALOG ) { - SetWindowLong( hDlg, GWL_USERDATA, lParam ); + SetWindowLongPtr( hDlg, GWL_USERDATA, lParam ); state = (ColorsDlgState*)lParam; state->cancelled = XP_TRUE; @@ -393,7 +393,7 @@ ColorsDlg( HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam ) result = TRUE; } else { - state = (ColorsDlgState*)GetWindowLong( hDlg, GWL_USERDATA ); + state = (ColorsDlgState*)GetWindowLongPtr( hDlg, GWL_USERDATA ); if ( !!state ) { XP_U16 wid; diff --git a/wince/cecondlg.c b/wince/cecondlg.c index 01b08af82..a6bc3c9e5 100755 --- a/wince/cecondlg.c +++ b/wince/cecondlg.c @@ -169,7 +169,7 @@ ConnsDlg( HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam ) CeConnDlgState* cState; if ( message == WM_INITDIALOG ) { - SetWindowLong( hDlg, GWL_USERDATA, lParam ); + SetWindowLongPtr( hDlg, GWL_USERDATA, lParam ); cState = (CeConnDlgState*)lParam; adjustForConnType( hDlg, cState ); @@ -180,7 +180,7 @@ ConnsDlg( HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam ) result = TRUE; } else { - cState = (CeConnDlgState*)GetWindowLong( hDlg, GWL_USERDATA ); + cState = (CeConnDlgState*)GetWindowLongPtr( hDlg, GWL_USERDATA ); if ( !!cState ) { CEAppGlobals* globals = cState->dlgHdr.globals; diff --git a/wince/ceginfo.c b/wince/ceginfo.c index 14601e27a..e2a500ebe 100755 --- a/wince/ceginfo.c +++ b/wince/ceginfo.c @@ -512,7 +512,7 @@ GameInfo(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) /* XP_LOGF( "%s: %s(%d)", __func__, messageToStr( message ), message ); */ if ( message == WM_INITDIALOG ) { - SetWindowLong( hDlg, GWL_USERDATA, lParam ); + SetWindowLongPtr( hDlg, GWL_USERDATA, lParam ); giState = (GameInfoState*)lParam; globals = giState->dlgHdr.globals; @@ -544,7 +544,7 @@ GameInfo(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) result = TRUE; } else { - giState = (GameInfoState*)GetWindowLong( hDlg, GWL_USERDATA ); + giState = (GameInfoState*)GetWindowLongPtr( hDlg, GWL_USERDATA ); if ( !!giState ) { globals = giState->dlgHdr.globals; diff --git a/wince/cehntlim.c b/wince/cehntlim.c index 9d1ad6820..3bdf6d313 100755 --- a/wince/cehntlim.c +++ b/wince/cehntlim.c @@ -58,7 +58,7 @@ HintLimitsDlg( HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam ) HintLimitsState* hState; if ( message == WM_INITDIALOG ) { - SetWindowLong( hDlg, GWL_USERDATA, lParam ); + SetWindowLongPtr( hDlg, GWL_USERDATA, lParam ); hState = (HintLimitsState*)lParam; ceDlgSetup( &hState->dlgHdr, hDlg, DLG_STATE_NONE ); @@ -67,7 +67,7 @@ HintLimitsDlg( HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam ) return TRUE; } else { - hState = (HintLimitsState*)GetWindowLong( hDlg, GWL_USERDATA ); + hState = (HintLimitsState*)GetWindowLongPtr( hDlg, GWL_USERDATA ); if ( !!hState ) { if ( !hState->inited ) { diff --git a/wince/ceprefs.c b/wince/ceprefs.c index c4ce3fc9f..30aeba64e 100755 --- a/wince/ceprefs.c +++ b/wince/ceprefs.c @@ -25,6 +25,7 @@ #include "ceutil.h" #include "debhacks.h" #include "cedebug.h" +#include "cefonts.h" /* Stuff the strings for phonies. Why can't I put this in the resource? */ @@ -268,7 +269,7 @@ PrefsDlg(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) CePrefsDlgState* pState; if ( message == WM_INITDIALOG ) { - SetWindowLong( hDlg, GWL_USERDATA, lParam ); + SetWindowLongPtr( hDlg, GWL_USERDATA, lParam ); pState = (CePrefsDlgState*)lParam; pState->phonComboId = LB_IF_PPC(pState->dlgHdr.globals,PHONIES_COMBO); @@ -284,7 +285,7 @@ PrefsDlg(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) return TRUE; } else { - pState = (CePrefsDlgState*)GetWindowLong( hDlg, GWL_USERDATA ); + pState = (CePrefsDlgState*)GetWindowLongPtr( hDlg, GWL_USERDATA ); if ( !!pState ) { if ( !ceDoDlgHandle( &pState->dlgHdr, message, wParam, lParam ) ) { CEAppGlobals* globals = pState->dlgHdr.globals; diff --git a/wince/cestrbx.c b/wince/cestrbx.c index 44885829c..7aa860b3b 100755 --- a/wince/cestrbx.c +++ b/wince/cestrbx.c @@ -61,7 +61,7 @@ StrBox(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) XP_U16 id; if ( message == WM_INITDIALOG ) { - SetWindowLong( hDlg, GWL_USERDATA, (long)lParam ); + SetWindowLongPtr( hDlg, GWL_USERDATA, (long)lParam ); state = (StrBoxState*)lParam; if ( !!state->title ) { @@ -71,16 +71,17 @@ StrBox(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) if ( !state->isQuery ) { ceShowOrHide( hDlg, IDCANCEL, XP_FALSE ); /* also want to expand the text box to the bottom */ - if ( !ceIsLandscape( state->dlgHdr.globals ) ) { - ceCenterCtl( hDlg, IDOK ); - } + /* ceIsLandscape() is going away.... */ +/* if ( !ceIsLandscape( state->dlgHdr.globals ) ) { */ +/* ceCenterCtl( hDlg, IDOK ); */ +/* } */ } ceDlgSetup( &state->dlgHdr, hDlg, DLG_STATE_NONE ); handled = TRUE; } else { - state = (StrBoxState*)GetWindowLong( hDlg, GWL_USERDATA ); + state = (StrBoxState*)GetWindowLongPtr( hDlg, GWL_USERDATA ); if ( !!state ) { if ( ceDoDlgHandle( &state->dlgHdr, message, wParam, lParam) ) { diff --git a/wince/cesvdgms.c b/wince/cesvdgms.c index 1bedd7877..acb2b4126 100644 --- a/wince/cesvdgms.c +++ b/wince/cesvdgms.c @@ -74,7 +74,7 @@ SaveNameDlg( HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam ) BOOL result = FALSE; if ( message == WM_INITDIALOG ) { - SetWindowLong( hDlg, GWL_USERDATA, lParam ); + SetWindowLongPtr( hDlg, GWL_USERDATA, lParam ); state = (CeSaveGameNameState*)lParam; state->cancelled = XP_TRUE; @@ -89,7 +89,7 @@ SaveNameDlg( HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam ) result = TRUE; } else { - state = (CeSaveGameNameState*)GetWindowLong( hDlg, GWL_USERDATA ); + state = (CeSaveGameNameState*)GetWindowLongPtr( hDlg, GWL_USERDATA ); if ( !!state ) { if ( !state->inited ) { state->inited = XP_TRUE; @@ -357,7 +357,7 @@ SavedGamesDlg( HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam ) BOOL result = FALSE; if ( message == WM_INITDIALOG ) { - SetWindowLong( hDlg, GWL_USERDATA, lParam ); + SetWindowLongPtr( hDlg, GWL_USERDATA, lParam ); state = (CeSavedGamesState*)lParam; state->inited = XP_FALSE; @@ -368,7 +368,7 @@ SavedGamesDlg( HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam ) result = TRUE; } else { - state = (CeSavedGamesState*)GetWindowLong( hDlg, GWL_USERDATA ); + state = (CeSavedGamesState*)GetWindowLongPtr( hDlg, GWL_USERDATA ); if ( !!state ) { if ( !state->inited ) {