{G|S}etWindowLong -> {G|S}etWindowLongPtr as per MSDN docs

This commit is contained in:
ehouse 2008-09-27 15:05:26 +00:00
parent 3ac39b1290
commit 949a67b15f
9 changed files with 27 additions and 25 deletions

View file

@ -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 ) ) {

View file

@ -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) ) {

View file

@ -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;

View file

@ -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;

View file

@ -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;

View file

@ -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 ) {

View file

@ -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;

View file

@ -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) ) {

View file

@ -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 ) {