#pragma once // CMBAMUIBaseFun command target typedef CArray CArrayRECT; class AFX_EXT_CLASS CMBAMUIBaseFun : public CObject { public: CMBAMUIBaseFun(); virtual ~CMBAMUIBaseFun(); public: static SStringW GetContactMiddleSkin( int nSex, int nStatus); static SStringW GetContactMiddleFile( int nSex ) ; static SStringW GetCrowdMiddleFile( ); static SStringW GetContactLargeSkin( int nSex); static SStringW GetContactStatusSkin( int nStatus ); static CString GetDateTimeString( CString strParam ); static int ComponentValue(const TCHAR* aColorSpec, int aLen, int color, int dpc); static BOOL HexToRGB( const CString& strColor, COLORREF* pColor); static BOOL IsFileValid( LPCTSTR strPath); static int GetStringLen(CString strText); static CString GetRelSubject( CString strSubject, long nMaxLen ); static CString GetLengthStr( CString strText, long nMaxLen ); static int FindStrNoCaseInArray( CString strData, CStringArray &asData ); static CString GetUserStatusStr(int nUserStatus); static AMUSERSTATUS GetUserStatus( int nUserStatus ); static int GetUserStatus( CString strUserStatus ); static CString GetErrorInfo( UINT nErrorCode, CString strLanguage = _T("CHS") ); static void SetUserPictureFixSize(CString strSaveDir, CString strImagePath, CString strID, CString &strMImgPath, CString &strLImgPath); static BOOL CreateDirectoryFullPath( CString strFilePath) ; static ULONGLONG GetFolderSize( CString strFilePath); static CString GetFileName( CString strFilePathName ); static CString GetDocNonRepeatedName( CString strDir, CString strFileName, CString strFileExt ); static CString GetCrowdTypeName( int nType ); static SStringT GetDocSmallSkin( CString strFileName ); static SStringT GetDocMiddleSkin( CString strFileName ); static bool CStringToAnsi( LPCTSTR pszT, LPSTR *ppszA ); static void WriteLog( CString strLog ); static BOOL WriteToFile(CString strFileName, CString strContent ); static BOOL ReadFromFile(CString strFileName, CString &strContent ); static bool ParseUserLastTerminalInfo( CString strContent, CString &strLocalIP,CString &strConnIP ); static CString GetTextContentAndImage( CString strFormatText); };