mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2024-12-30 10:26:58 +01:00
debug-only function for logging wchar_t strings
This commit is contained in:
parent
ed1bac4a16
commit
23e26a3ba9
2 changed files with 18 additions and 0 deletions
|
@ -191,3 +191,14 @@ ceCenterCtl( HWND hDlg, XP_U16 resID )
|
|||
XP_LOGF( "MoveWindow=>%d", GetLastError() );
|
||||
}
|
||||
} /* ceCenterCtl */
|
||||
|
||||
#ifdef DEBUG
|
||||
void
|
||||
XP_LOGW( const XP_UCHAR* prefix, const wchar_t* arg )
|
||||
{
|
||||
XP_UCHAR buf[512];
|
||||
(void)WideCharToMultiByte( CP_ACP, 0, arg, -1,
|
||||
buf, sizeof(buf), NULL, NULL );
|
||||
XP_LOGF( "%s: %s", prefix, buf );
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -42,4 +42,11 @@ XP_Bool ceGetChecked( HWND hDlg, XP_U16 resID );
|
|||
void ceSetChecked( HWND hDlg, XP_U16 resID, XP_Bool check );
|
||||
|
||||
void ceCenterCtl( HWND hDlg, XP_U16 resID );
|
||||
|
||||
#ifdef DEBUG
|
||||
void XP_LOGW( const XP_UCHAR* prefix, const wchar_t* arg );
|
||||
#else
|
||||
# define XP_LOGW( prefix, arg )
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue