3ds Max C++ API Reference
strbasic.h File Reference
#include <tchar.h>

Macros

#define UNICODE
 
#define STRCONST   L
 
#define MCHAR_IS_WCHAR
 
#define MCHAR   wchar_t
 MBCS/Unicode helper defines std::wofstream doesn't mix well with Unicode. More...
 
#define LPCMSTR   const MCHAR*
 
#define LPMSTR   MCHAR*
 
#define _M_TEXT(x)   L ## x
 
#define M_STD_STRING   std::wstring
 
#define M_LOADSTRING   ::LoadStringW
 
#define M_STD_OSTRINGSTREAM   std::wostringstream
 
#define M_STD_ISTRINGSTREAM   std::wistringstream
 
#define M_STD_CERR   std::wcerr
 
#define M_STD_CIN   std::wcin
 
#define M_STD_OSTREAM   std::wostream
 
#define M_STD_ISTREAM   std::wistream
 
#define M_STD_COUT   std::wcout
 
#define M_STD_FOSTREAM   std::wofstream
 
#define M_STD_FISTREAM   std::wifstream
 
#define M_STD_ISTRSTREAM   std::wistringstream
 
#define M_EOF   WEOF
 The 'EOF' value is unicode/mbcs build dependent for _puttc, _puttch, _ungettc, _ungettch, _ungettch_nolock, _fputts, _fputtc, _gettc, and _fgettc (and maybe other methods) More...
 
#define _M(x)   _M_TEXT(x)
 Used to wrap string literals. More...
 
#define M2A(p)   CW2A(p)
 
#define A2M(p)   CA2W(p)
 
#define M2W(p)   (p)
 
#define W2M(p)   (p)
 
#define M2W_UTF(p)   (p)
 
#define W2M_UTF(p)   (p)
 
#define M2T(p)   (p)
 
#define T2M(p)   (p)
 
#define A2CT_UTF(lpa)   CA2W(lpa, CP_UTF8)
 
#define T2CA_UTF(lpw)   CW2A(lpw, CP_UTF8)
 
#define A2CM_CP(lpa)   CA2W(lpa, CP_UTF8)
 
#define M2CA_CP(lpw)   CW2A(lpw, CP_UTF8)
 

Macro Definition Documentation

◆ UNICODE

#define UNICODE

◆ STRCONST

#define STRCONST   L

◆ MCHAR_IS_WCHAR

#define MCHAR_IS_WCHAR

◆ MCHAR

#define MCHAR   wchar_t

MBCS/Unicode helper defines std::wofstream doesn't mix well with Unicode.

If you try to output a character that is not representable in the current (window user) code page, the stream is flagged as 'in error', and no further output to that stream occurs. Plus, file output encoding should be that specified by the user, accessible via Interface14::DefaultTextSaveCodePage Thus, it is recommended that M_STD_FOSTREAM not be used. It is much better to use the TextFile::Reader/Writer classes and use the codepage accessed via Interface14::DefaultTextSaveCodePage. Likewise, the use std::wifstream (and _tfopen/fopen in text mode) is not recommended when reading string data as the current (window user) code page will be used. File input encoding should that specified by the user, accessible via Interface14::DefaultTextLoadCodePage Thus, it is recommended that M_STD_FISTREAM (and _tfopen/fopen in text mode) not be used. It is much better to use the TextFile::Reader/Writer classes and use the codepage accessed via Interface14::DefaultTextSaveCodePage. !

◆ LPCMSTR

#define LPCMSTR   const MCHAR*

◆ LPMSTR

#define LPMSTR   MCHAR*

◆ _M_TEXT

#define _M_TEXT (   x)    L ## x

◆ M_STD_STRING

#define M_STD_STRING   std::wstring

◆ M_LOADSTRING

#define M_LOADSTRING   ::LoadStringW

◆ M_STD_OSTRINGSTREAM

#define M_STD_OSTRINGSTREAM   std::wostringstream

◆ M_STD_ISTRINGSTREAM

#define M_STD_ISTRINGSTREAM   std::wistringstream

◆ M_STD_CERR

#define M_STD_CERR   std::wcerr

◆ M_STD_CIN

#define M_STD_CIN   std::wcin

◆ M_STD_OSTREAM

#define M_STD_OSTREAM   std::wostream

◆ M_STD_ISTREAM

#define M_STD_ISTREAM   std::wistream

◆ M_STD_COUT

#define M_STD_COUT   std::wcout

◆ M_STD_FOSTREAM

#define M_STD_FOSTREAM   std::wofstream

◆ M_STD_FISTREAM

#define M_STD_FISTREAM   std::wifstream

◆ M_STD_ISTRSTREAM

#define M_STD_ISTRSTREAM   std::wistringstream

◆ M_EOF

#define M_EOF   WEOF

The 'EOF' value is unicode/mbcs build dependent for _puttc, _puttch, _ungettc, _ungettch, _ungettch_nolock, _fputts, _fputtc, _gettc, and _fgettc (and maybe other methods)

◆ _M

#define _M (   x)    _M_TEXT(x)

Used to wrap string literals.

◆ M2A

#define M2A (   p)    CW2A(p)

◆ A2M

#define A2M (   p)    CA2W(p)

◆ M2W

#define M2W (   p)    (p)

◆ W2M

#define W2M (   p)    (p)

◆ M2W_UTF

#define M2W_UTF (   p)    (p)

◆ W2M_UTF

#define W2M_UTF (   p)    (p)

◆ M2T

#define M2T (   p)    (p)

◆ T2M

#define T2M (   p)    (p)

◆ A2CT_UTF

#define A2CT_UTF (   lpa)    CA2W(lpa, CP_UTF8)

◆ T2CA_UTF

#define T2CA_UTF (   lpw)    CW2A(lpw, CP_UTF8)

◆ A2CM_CP

#define A2CM_CP (   lpa)    CA2W(lpa, CP_UTF8)

◆ M2CA_CP

#define M2CA_CP (   lpw)    CW2A(lpw, CP_UTF8)