mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-28 07:58:08 +01:00
get rid of unneeded DH()
This commit is contained in:
parent
95a3f86d85
commit
eef7b20544
5 changed files with 15 additions and 18 deletions
|
@ -113,7 +113,7 @@ WrapConnsDlg( HWND hDlg, CEAppGlobals* globals, const CommsAddrRec* addrRec,
|
||||||
|
|
||||||
XP_MEMCPY( &state->addrRec, addrRec, sizeof(state->addrRec) );
|
XP_MEMCPY( &state->addrRec, addrRec, sizeof(state->addrRec) );
|
||||||
|
|
||||||
DH(DialogBoxParam)( globals->hInst, (LPCTSTR)IDD_CONNSSDLG, hDlg,
|
DialogBoxParam( globals->hInst, (LPCTSTR)IDD_CONNSSDLG, hDlg,
|
||||||
(DLGPROC)ConnsDlg, (long)state );
|
(DLGPROC)ConnsDlg, (long)state );
|
||||||
|
|
||||||
result = !state->userCancelled;
|
result = !state->userCancelled;
|
||||||
|
|
|
@ -609,18 +609,18 @@ checkIfDictAndLegal( MPFORMAL wchar_t* path, XP_U16 pathLen,
|
||||||
static XP_Bool
|
static XP_Bool
|
||||||
locateOneDir( MPFORMAL wchar_t* path, XP_U16* which )
|
locateOneDir( MPFORMAL wchar_t* path, XP_U16* which )
|
||||||
{
|
{
|
||||||
DH(WIN32_FIND_DATA) data;
|
WIN32_FIND_DATA data;
|
||||||
HANDLE fileH;
|
HANDLE fileH;
|
||||||
XP_Bool result = XP_FALSE;
|
XP_Bool result = XP_FALSE;
|
||||||
XP_U16 startLen;
|
XP_U16 startLen;
|
||||||
|
|
||||||
#if defined TARGET_OS_WINCE
|
#if defined TARGET_OS_WINCE
|
||||||
DH(lstrcat)( path, L"\\" );
|
lstrcat( path, L"\\" );
|
||||||
#elif defined TARGET_OS_WIN32
|
#elif defined TARGET_OS_WIN32
|
||||||
DH(lstrcat)( path, L".\\" );
|
lstrcat( path, L".\\" );
|
||||||
#endif
|
#endif
|
||||||
startLen = wcslen(path); /* record where we were so can back up */
|
startLen = wcslen(path); /* record where we were so can back up */
|
||||||
DH(lstrcat)( path, L"*" );
|
lstrcat( path, L"*" );
|
||||||
|
|
||||||
XP_MEMSET( &data, 0, sizeof(data) );
|
XP_MEMSET( &data, 0, sizeof(data) );
|
||||||
|
|
||||||
|
@ -636,7 +636,7 @@ locateOneDir( MPFORMAL wchar_t* path, XP_U16* which )
|
||||||
if ((data.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) != 0){
|
if ((data.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) != 0){
|
||||||
#if defined TARGET_OS_WINCE
|
#if defined TARGET_OS_WINCE
|
||||||
/* We don't do recursive search on Win32!!! */
|
/* We don't do recursive search on Win32!!! */
|
||||||
DH(lstrcpy)( path+startLen, data.cFileName );
|
lstrcpy( path+startLen, data.cFileName );
|
||||||
result = locateOneDir( MPPARM(mpool) path, which );
|
result = locateOneDir( MPPARM(mpool) path, which );
|
||||||
if ( result ) {
|
if ( result ) {
|
||||||
break;
|
break;
|
||||||
|
@ -647,7 +647,7 @@ locateOneDir( MPFORMAL wchar_t* path, XP_U16* which )
|
||||||
data.cFileName )
|
data.cFileName )
|
||||||
&& (*which-- == 0)) {
|
&& (*which-- == 0)) {
|
||||||
/* we're done! */
|
/* we're done! */
|
||||||
DH(lstrcpy)( path+startLen, data.cFileName );
|
lstrcpy( path+startLen, data.cFileName );
|
||||||
result = XP_TRUE;
|
result = XP_TRUE;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -309,11 +309,13 @@ drawDrawTileGuts( DrawCtx* p_dctx, const XP_Rect* xprect,
|
||||||
HDC hdc = globals->hdc;
|
HDC hdc = globals->hdc;
|
||||||
wchar_t widebuf[4];
|
wchar_t widebuf[4];
|
||||||
RECT rt;
|
RECT rt;
|
||||||
|
XP_U16 index;
|
||||||
|
|
||||||
ceClearToBkground( dctx, xprect );
|
ceClearToBkground( dctx, xprect );
|
||||||
|
|
||||||
SetBkColor( hdc, dctx->globals->appPrefs.colors[TILEBACK_COLOR] );
|
SetBkColor( hdc, dctx->globals->appPrefs.colors[TILEBACK_COLOR] );
|
||||||
SetTextColor( hdc, dctx->globals->appPrefs.colors[getPlayerColor(dctx->trayOwner)] );
|
index = getPlayerColor(dctx->trayOwner);
|
||||||
|
SetTextColor( hdc, dctx->globals->appPrefs.colors[index] );
|
||||||
|
|
||||||
XPRtoRECT( &rt, xprect );
|
XPRtoRECT( &rt, xprect );
|
||||||
|
|
||||||
|
@ -490,7 +492,7 @@ formatRemText( HDC hdc, wchar_t* buf, XP_S16 nTilesLeft, SIZE* size )
|
||||||
size->cx = size->cy = 0;
|
size->cx = size->cy = 0;
|
||||||
} else {
|
} else {
|
||||||
swprintf( buf, format, nTilesLeft );
|
swprintf( buf, format, nTilesLeft );
|
||||||
DH(GetTextExtentPoint32)( hdc, buf, wcslen(buf), size );
|
GetTextExtentPoint32( hdc, buf, wcslen(buf), size );
|
||||||
}
|
}
|
||||||
} /* formatRemText */
|
} /* formatRemText */
|
||||||
|
|
||||||
|
@ -553,7 +555,7 @@ ceWidthAndText( HDC hdc, wchar_t* buf, const DrawScoreInfo* dsi,
|
||||||
len = MultiByteToWideChar( CP_ACP, MB_PRECOMPOSED, tbuf, -1,
|
len = MultiByteToWideChar( CP_ACP, MB_PRECOMPOSED, tbuf, -1,
|
||||||
buf, 10 );
|
buf, 10 );
|
||||||
|
|
||||||
DH(GetTextExtentPoint32)( hdc, buf, len, &size );
|
GetTextExtentPoint32( hdc, buf, len, &size );
|
||||||
*widthP = (XP_U16)size.cx;
|
*widthP = (XP_U16)size.cx;
|
||||||
*heightP = (XP_U16)size.cy;
|
*heightP = (XP_U16)size.cy;
|
||||||
} /* ceWidthAndText */
|
} /* ceWidthAndText */
|
||||||
|
@ -740,7 +742,7 @@ ce_draw_measureMiniWText( DrawCtx* p_dctx, const XP_UCHAR* str,
|
||||||
MultiByteToWideChar( CP_ACP, MB_PRECOMPOSED, str, len,
|
MultiByteToWideChar( CP_ACP, MB_PRECOMPOSED, str, len,
|
||||||
widebuf, sizeof(widebuf)/sizeof(widebuf[0]) );
|
widebuf, sizeof(widebuf)/sizeof(widebuf[0]) );
|
||||||
widebuf[len] = 0;
|
widebuf[len] = 0;
|
||||||
DH(GetTextExtentPoint32)( hdc, widebuf, wcslen(widebuf), &size );
|
GetTextExtentPoint32( hdc, widebuf, wcslen(widebuf), &size );
|
||||||
|
|
||||||
maxWidth = (XP_U16)XP_MAX( maxWidth, size.cx );
|
maxWidth = (XP_U16)XP_MAX( maxWidth, size.cx );
|
||||||
height += size.cy + CE_INTERLINE_SPACE;
|
height += size.cy + CE_INTERLINE_SPACE;
|
||||||
|
|
|
@ -333,7 +333,7 @@ WrapPrefsDialog( HWND hDlg, CEAppGlobals* globals, CePrefsDlgState* state,
|
||||||
state->isNewGame = isNewGame;
|
state->isNewGame = isNewGame;
|
||||||
XP_MEMCPY( &state->prefsPrefs, prefsPrefs, sizeof( state->prefsPrefs ) );
|
XP_MEMCPY( &state->prefsPrefs, prefsPrefs, sizeof( state->prefsPrefs ) );
|
||||||
|
|
||||||
DH(DialogBoxParam)( globals->hInst, (LPCTSTR)IDD_OPTIONSDLG, hDlg,
|
DialogBoxParam( globals->hInst, (LPCTSTR)IDD_OPTIONSDLG, hDlg,
|
||||||
(DLGPROC)PrefsDlg, (long)state );
|
(DLGPROC)PrefsDlg, (long)state );
|
||||||
|
|
||||||
result = !state->userCancelled;
|
result = !state->userCancelled;
|
||||||
|
|
|
@ -40,11 +40,6 @@ typedef struct DH(WIN32_FIND_DATA) {
|
||||||
WCHAR cFileName[MAX_PATH];
|
WCHAR cFileName[MAX_PATH];
|
||||||
} DH(WIN32_FIND_DATA);
|
} DH(WIN32_FIND_DATA);
|
||||||
|
|
||||||
wchar_t* DH(lstrcat)(wchar_t *s1, const wchar_t* s2);
|
|
||||||
wchar_t* DH(lstrcpy)(wchar_t* dest, const wchar_t* src);
|
|
||||||
int DH(DialogBoxParam)( HINSTANCE hinst, LPCWSTR str, HWND hwnd,
|
|
||||||
DLGPROC proc, LPARAM lparam );
|
|
||||||
BOOL DH(GetTextExtentPoint32)( HDC,LPCWSTR,int,LPSIZE);
|
|
||||||
DWORD DH(GetCurrentThreadId)(void);
|
DWORD DH(GetCurrentThreadId)(void);
|
||||||
BOOL DH(SetEvent)(HANDLE);
|
BOOL DH(SetEvent)(HANDLE);
|
||||||
BOOL DH(ResetEvent)(HANDLE);
|
BOOL DH(ResetEvent)(HANDLE);
|
||||||
|
|
Loading…
Add table
Reference in a new issue