goto nliteend;
} catch(nlite::Exception &e){
- tstring errMessage(TEXT("\83G\83\89\81[\83\81\83b\83Z\81[\83W:"));
+ CNLiteString errMessage(TEXT("\83G\83\89\81[\83\81\83b\83Z\81[\83W:"));
errMessage += e.what();
errMessage += TEXT("\r\n\8ds\94Ô\8d\86:");
std::wostringstream num;
}
const CApplicationInfo &appInfo = CApplicationInfo::getInstance();
- tstring userAgent;
+ CNLiteString userAgent;
userAgent.reserve(256);
userAgent = appInfo.getProcuctName();
userAgent += TEXT("/");
<ClInclude Include="nlite_appinfo.h" />
<ClInclude Include="nlite_nlib.h" />
<ClInclude Include="nlite_property.h" />
+ <ClInclude Include="nlite_string.h" />
<ClInclude Include="Resource.h" />
<ClInclude Include="stdafx.h" />
<ClInclude Include="targetver.h" />
<ClInclude Include="nlite_chatData.h">
<Filter>ヘッダー ファイル</Filter>
</ClInclude>
+ <ClInclude Include="nlite_string.h">
+ <Filter>ヘッダー ファイル</Filter>
+ </ClInclude>
</ItemGroup>
<ItemGroup>
<ClCompile Include="stdafx.cpp">
VOID show() const {
- tstring szApp;
- tstring szOtherStuff;
+ CNLiteString szApp;
+ CNLiteString szOtherStuff;
szApp.reserve(LENGTH_128);
struct ListenerData{
public:
- tstring user_id;
- tstring userName;
+ CNLiteString user_id;
+ CNLiteString userName;
COLORREF bkColor;
BOOL originBkFlag;
public:
time_t date; //\8e\9e\8aÔ
cuntry::LOCALE locale; //\8d\91\83R\81[\83h
ListenerData *listenerData; //\83\86\81[\83U\8fî\95ñ
- tstring name; //\96¼\91O\81B\82Â\82¢\82Ä\82±\82È\82¢\8e\9e\82à\82 \82é
- tstring chatBuf; //\83`\83\83\83b\83g\96{\95¶
- std::vector<tstring> mail; //\83\81\81[\83\8b\83R\83}\83\93\83h
+ CNLiteString name; //\96¼\91O\81B\82Â\82¢\82Ä\82±\82È\82¢\8e\9e\82à\82 \82é
+ CNLiteString chatBuf; //\83`\83\83\83b\83g\96{\95¶
+ std::vector<CNLiteString> mail; //\83\81\81[\83\8b\83R\83}\83\93\83h
ULONG_PTR thread; //\83X\83\8c\83b\83h\94Ô\8d\86
BOOL selectFlag; //\91I\91ð\8fó\91Ô
namespace nlite{
- //
- //\8c^\92è\8b`
- //
-
- typedef std::basic_string<TCHAR> tstring; //\95¶\8e\9a\97ñ
private:
std::wstring wErrMessage;
UINT_PTR line;
- tstring fileName;
+ CNLiteString fileName;
//\83R\83\93\83X\83g\83\89\83N\83^
public:
#include "nlite_define.h"
#include "nlite.h"
+#include "nlite_string.h"
#include "nlite_exception.h"
#include "nlite_commentWrite.h"
#include "nlite_nlib.h"
public:
- tstring id;
- tstring default_community;
+ CNLiteString id;
+ CNLiteString default_community;
PROVIDERTYPE provider_type;
BOOL is_owner;
time_t start_time;
- typedef std::map<tstring, BROWSERTYPE> funcs_type;
+ typedef std::map<CNLiteString, BROWSERTYPE> funcs_type;
funcs_type funcs;
funcs.insert(std::make_pair(bt_none, BT_NOSETTING));
funcs.insert(std::make_pair(bt_chrome, BT_GOOGLE_CHROME));
funcs.insert(std::make_pair(bt_iecm,BT_IE_COMPONENT));
- tstring browserTypeName;
+ CNLiteString browserTypeName;
GetPrivateProfileString(gp.GetSectionName(),TEXT(TOSTR(browserType)),bt_none,&buffer[0],buffer.size(),propertyPath.c_str());
browserTypeName = &buffer[0];
NLITE_WRITE_INI_INT(gp,userCountUpdateFlag,propertyPath.c_str());
- tstring browserTypeName;
+ CNLiteString browserTypeName;
switch (gp.browserType){
};
private:
- tstring sectionName;
+ CNLiteString sectionName;
#define COMMENTVIEW_HEADERITEMSIZE 5
public:
struct CommentReadProperty{
private:
- tstring sectionName;
+ CNLiteString sectionName;
public:
BOOL commentReadFlag; //\83R\83\81\83\93\83g\93Ç\82Ý\8fã\82°\83t\83\89\83O
BOOL newLineReadFlag; //\89ü\8ds\93Ç\82Ý\8fã\82°\83t\83\89\83O
BOOL besideLengthFlag; //\93Ç\82Ý\8fã\82°\83T\83C\83Y\8c\88\92è\83t\83\89\83O
UINT_PTR maxCommentLength; //\93Ç\82Ý\8fã\82°\83T\83C\83Y\90Ý\92è\8e\9e\82Ì\8dÅ\91å\83T\83C\83Y
- tstring shortComment; //\8fÈ\97ª\8e\9e\82É\93Ç\82Ý\8fã\82°\82é\95¶\8e\9a\97ñ
- tstring outString; //\93Ç\82Ý\8fã\82°\8f\9c\8aO\95¶\8e\9a\97ñ
+ CNLiteString shortComment; //\8fÈ\97ª\8e\9e\82É\93Ç\82Ý\8fã\82°\82é\95¶\8e\9a\97ñ
+ CNLiteString outString; //\93Ç\82Ý\8fã\82°\8f\9c\8aO\95¶\8e\9a\97ñ
CommentReadProperty():
///
struct GeneralProperty{
private:
- tstring sectionName;
+ CNLiteString sectionName;
public:
- tstring browserPath; //\83u\83\89\83E\83U\82Ì\83p\83X
+ CNLiteString browserPath; //\83u\83\89\83E\83U\82Ì\83p\83X
BOOL userCountUpdateFlag; //\97\88\8fê\8eÒ\90\94\82ð\8dX\90V\82·\82é\82©\82Ì\83t\83\89\83O
BOOL commentLogAutoSaveFlag; //\83R\83\81\83\93\83g\8e©\93®\95Û\91¶\97p\82Ì\83t\83\89\83O
- tstring commentPath; //\83R\83\81\83\93\83g\83\8d\83O\95Û\91¶\8fê\8f\8a
+ CNLiteString commentPath; //\83R\83\81\83\93\83g\83\8d\83O\95Û\91¶\8fê\8f\8a
BOOL defaultBroserFlag; //\83\8a\83\93\83N\82ð\8aJ\82\8dÛ\82É\8aî\92ê\82Ì\83u\83\89\83E\83U\82ð\8eg\97p\82·\82é\82©\82Ì\83t\83\89\83O
BOOL autoNameRegisterFlag; //\83\86\81[\83U\96¼\8e©\93®\93o\98^\83t\83\89\83O
BOOL autoNameUpdateFlag; //\8e©\93®\93o\98^\8e\9e\82É\8dX\90V\82·\82é\83t\83\89\83O
struct MainFrameProperty{
private:
- tstring sectionName;
+ CNLiteString sectionName;
public:
MainFrameProperty mfp;
GeneralProperty gp;
CommentReadProperty crp;
- tstring appLocalPath;
- tstring propertyPath;
+ CNLiteString appLocalPath;
+ CNLiteString propertyPath;
Property()
--- /dev/null
+#pragma once
+
+namespace nlite{
+ ///
+ ///nlite\95¶\8e\9a\97ñ\83N\83\89\83X
+ ///\8aù\91¶\82Ì\95¶\8e\9a\97ñ\83N\83\89\83X\82Ì\83\89\83b\83p
+ ///
+
+ class CNLiteString{
+ //
+ //\8c^\92è\8b`
+ //
+ private:
+ typedef CString InternalString;
+ typedef CString::PCXSTR StrPtr;
+ typedef CString::PXSTR StrCPtr;
+ typedef CString::PCYSTR WStrPtr;
+ typedef CString::PYSTR WStrCPtr;
+ typedef CString::XCHAR Char_Type;
+ typedef CString::YCHAR WChar_Type;
+
+ public:
+ typedef WStrPtr NLiteStrPtr;
+ typedef WStrCPtr NLiteStrCPtr;
+ typedef TCHAR NLiteChar;
+ typedef CNLiteString ThisType;
+
+ //\83\81\83\93\83o
+ private:
+ InternalString is_string;
+
+
+
+ public:
+ ///
+ ///\83R\83\93\83X\83g\83\89\83N\83^
+ ///
+ CNLiteString():is_string(){}
+
+ CNLiteString(NLiteStrCPtr in_str):is_string(in_str){}
+
+ CNLiteString(InternalString &in_str):is_string(in_str){}
+
+ CNLiteString(CNLiteString &in_str):is_string(in_str){}
+
+
+
+
+
+ NLiteStrCPtr c_str(){
+
+ return *this;
+ }
+
+ operator NLiteStrCPtr(){
+ return (NLiteStrCPtr)(LPCWSTR)is_string;
+ }
+
+ ThisType &operator=(NLiteStrCPtr lpstr){
+ is_string = lpstr;
+ return (LPCWSTR)is_string;
+ }
+
+ };
+}
\ No newline at end of file
#define _CRT_NON_CONFORMING_SWPRINTFS 1 //vc++\82Ì\82¨\82¹\82Á\82©\82¢\82È\8cx\8d\90\82ð\8fÁ\82·\83}\83N\83\8d
#define NOT_USE_MPOOL //\83\81\83\82\83\8a\83v\81[\83\8b\8eg\97p\82µ\82È\82¢//
#define USE_STUB
+#define _WTL_NO_CSTRING
// Windows \83w\83b\83_\81[ \83t\83@\83C\83\8b:
#include <windows.h>
#include <WindowsX.h>
// TODO: \83v\83\8d\83O\83\89\83\80\82É\95K\97v\82È\92Ç\89Á\83w\83b\83_\81[\82ð\82±\82±\82Å\8eQ\8fÆ\82µ\82Ä\82\82¾\82³\82¢\81B
#include <atlbase.h>
+#include <atlstr.h>
#include <atlapp.h>
extern CAppModule _Module;
#include <atlwin.h>