|
From: Mapi B. <ma...@us...> - 2009-06-24 21:42:21
|
Update of /cvsroot/easycalc/PPCport/system - UI In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv18060 Modified Files: Skin.cpp Skin.h Log Message: 2nd upload, getting closer Index: Skin.h =================================================================== RCS file: /cvsroot/easycalc/PPCport/system - UI/Skin.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Skin.h 22 Jun 2009 22:13:35 -0000 1.1 --- Skin.h 24 Jun 2009 21:42:12 -0000 1.2 *************** *** 146,149 **** --- 146,150 ---- int gets(char *buf, int buflen); int make_dib(HDC hdc); + TCHAR *print_error(CError err); public: *************** *** 182,185 **** --- 183,187 ---- int resultActionsPopup(resSelection choices[], int length); void display_set_enabled(bool enable); + void alertErrorMessage(CError err); }; Index: Skin.cpp =================================================================== RCS file: /cvsroot/easycalc/PPCport/system - UI/Skin.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Skin.cpp 22 Jun 2009 22:13:35 -0000 1.1 --- Skin.cpp 24 Jun 2009 21:42:12 -0000 1.2 *************** *** 1323,1325 **** --- 1323,1344 ---- void Skin::display_set_enabled(bool enable) { display_enabled = enable; + } + + /******************************************************************************** + * Print a system error on screen. * + ********************************************************************************/ + TCHAR *print_error(CError err) { + TCHAR *res; + + res = MemPtrNew(MAX_RSCLEN); + SysStringByIndex(strErrCodes,err,res,MAX_RSCLEN-1); + return (res); + } + + void alertErrorMessage(CError err) { + Char *txt; + + txt = print_error(err); + FrmCustomAlert(altErrorMsg, txt, NULL, NULL); + MemPtrFree(txt); } \ No newline at end of file |