home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Troubleshooting Netware Systems
/
CSTRIAL0196.BIN
/
attach
/
msj
/
v10n04
/
multilin.exe
/
PICTURE.H
< prev
next >
Wrap
C/C++ Source or Header
|
1995-04-01
|
1KB
|
54 lines
// picture.h : header file
//
#define MAXSEP 8
#define MAXPICT 128
#define LOCALE_UNRESTRICTED 0L /* i.e. not NOUSEROVERRIDE */
#if _DEBUG
void Test();
#endif
class CPicture : public NUMBERFMT
{
#if _DEBUG
friend void Test();
#endif
public:
CPicture(LCID lcid=LOCALE_SYSTEM_DEFAULT, DWORD dwFlags =LOCALE_UNRESTRICTED);
CPicture(LPCTSTR lpInp,
LCID lcid=LOCALE_SYSTEM_DEFAULT,
DWORD dwFlags=LOCALE_UNRESTRICTED
);
operator NUMBERFMT(){return *((NUMBERFMT *)this);}
operator LPCTSTR(){return m_Picture; }
int m_Length; // non-zer0 == success of constructor
private:
// Place for lpDecimalSep, etc. to point to
TCHAR m_DecSep[MAXSEP];
TCHAR m_ThouSep[MAXSEP];
TCHAR m_Picture[MAXPICT];
// Methods
int BuildUp();
// These could just as well be functions
void BuildUpPositive(int& count);
void GetFieldValue(LCTYPE lctype, UINT& uiVal);
void GetFieldValue(LCTYPE lctype, LPTSTR str);
void GetFieldValue(LCID lcid, LCTYPE lctype, UINT& uiVal);
void GetFieldValue(LCID lcid, LCTYPE lctype, LPTSTR str);
int Parse(LPCTSTR lpInp);
// These modify lpInp
int Sign(LPCTSTR& lpInp);
int AltSign(LPCTSTR& lpInp);
int ParSign(LPCTSTR& lpInp, int count);
int Integer(LPCTSTR& lpInp,TCHAR& chDigit);
int PosNum(LPCTSTR& lpInp,TCHAR chDigit);
int Fraction(LPCTSTR& lpInp,TCHAR chDigit);
};