123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- #include "stdafx.h"
- #include "AdoDef.h"
- CString IntToStr(int nVal)
- {
- CString strRet;
- char buff[10];
- _itoa_s(nVal, buff, 10);
- strRet = buff;
- return strRet;
- }
- CString LongToStr(long lVal)
- {
- CString strRet;
- char buff[20];
- _ltoa_s(lVal, buff, 10);
- strRet = buff;
- return strRet;
- }
- CString ULongToStr(unsigned long ulVal)
- {
- CString strRet;
- char buff[20];
- _ultoa_s(ulVal, buff, 10);
- strRet = buff;
- return strRet;
- }
- CString DblToStr(double dblVal, int ndigits)
- {
- CString strRet;
- char buff[50];
- //_gcvt(dblVal, ndigits, buff);
- _gcvt_s(buff, 50, dblVal, ndigits);
- strRet = buff;
- return strRet;
- }
- CString DblToStr(float fltVal)
- {
- CString strRet = _T("");
- char buff[50];
- //_gcvt(fltVal, 10, buff);
- _gcvt_s(buff, 50, fltVal, 10);
- strRet = buff;
- return strRet;
- }
|