From a09fb17708a5fede09911d7cd21ac9a457d81905 Mon Sep 17 00:00:00 2001 From: ehouse Date: Fri, 9 Apr 2004 02:32:27 +0000 Subject: [PATCH] add ceGetDlgItemNum --- xwords4/wince/ceutil.c | 12 ++++++++++++ xwords4/wince/ceutil.h | 1 + 2 files changed, 13 insertions(+) diff --git a/xwords4/wince/ceutil.c b/xwords4/wince/ceutil.c index df51d29ff..24124abc0 100755 --- a/xwords4/wince/ceutil.c +++ b/xwords4/wince/ceutil.c @@ -91,6 +91,18 @@ ceSetDlgItemNum( HWND hDlg, XP_U16 id, XP_S32 num ) ceSetDlgItemText( hDlg, id, buf ); } /* ceSetDlgItemNum */ +XP_S32 +ceGetDlgItemNum( HWND hDlg, XP_U16 id ) +{ + XP_S32 result = 0; + XP_UCHAR buf[24]; + XP_U16 len = sizeof(buf); + ceGetDlgItemText( hDlg, id, buf, &len ); + + result = atoi( buf ); + return result; +} /* ceGetDlgItemNum */ + void ce_selectAndShow( HWND hDlg, XP_U16 resID, XP_U16 index ) { diff --git a/xwords4/wince/ceutil.h b/xwords4/wince/ceutil.h index 0dfe84598..986281140 100755 --- a/xwords4/wince/ceutil.h +++ b/xwords4/wince/ceutil.h @@ -27,6 +27,7 @@ void ceSetDlgItemText( HWND hDlg, XP_U16 id, XP_UCHAR* buf ); void ceGetDlgItemText( HWND hDlg, XP_U16 id, XP_UCHAR* buf, XP_U16* bLen ); void ceSetDlgItemNum( HWND hDlg, XP_U16 id, XP_S32 num ); +XP_S32 ceGetDlgItemNum( HWND hDlg, XP_U16 id ); void ceSetDlgItemFileName( HWND hDlg, XP_U16 id, XP_UCHAR* buf );