namespace nlite{
-const static SIZE commentPosBoxSize = {40,0};
-const static SIZE commentSizeBoxSize = {40,0};
-const static SIZE commentColorBoxSize = {40,0};
+
+const static SIZE commentColorBoxSize = {33,0};
const static LPCTSTR ANONYMOUS_BOTTONSTRING = TEXT("184");
const static LPCTSTR WRITE_BOTTONSTRING = TEXT("\8f\91\82«\8d\9e\82Ý");
-const static RECT COMMENTWRITEWINDOW_SEPARATEFSIZE = {5,5,5,5};
+const static RECT COMMENTWRITEWINDOW_SEPARATEFSIZE = {0,5,0,5};
+const static UINT_PTR COMMENTWRITEWINDOW_SIDESEPARATESIZE = 5;
const static UINT_PTR INIT_COMMENTWRITE_MAXLENGTH = 60;
+//const static UINT_PTR COMBOBOX_BUTTON_WIDTH = 15;
+//const static COLORREF MAX_COLOR = ((COLORREF)-1);
+const static COLORREF MAX_COLOR = 0xFFFFFF;
-
-const ComentColor GENERALUSER_COMMENT_COLORLIST[] = {
+const CommentColorInfo generalUser::COMMENT_COLORLIST[] = {
{TEXT("white"),RGB(0xFF,0xFF,0xFF)},
{TEXT("red"),RGB(0xFF,0x00,0x00)},
{TEXT("pink"),RGB(0xFF,0x80,0x80)},
{TEXT("black"),RGB(0x00,0x00,0x00)}
};
-const ComentColor PREMIUM_COMMENT_COLORLIST[] = {
+const CommentColorInfo premiumUser::COMMENT_COLORLIST[] = {
{TEXT("white2"),RGB(0xCC,0xCC,0x99)},
{TEXT("red2"),RGB(0xCC,0x00,0x33)},
{TEXT("pink2"),RGB(0xFF,0x33,0xCC)},
{TEXT("black2"),RGB(0x66,0x66,0x66)}
};
-template<typename T>
-static VOID addItemList(CComboBox &combo,T * colorList,UINT_PTR length);
+const CommentSizeInfo generalUser::COMMENT_SIZELIST[] = {
+ {TEXT("\95\81\92Ê\81@"),TEXT("medium")},
+ {TEXT("\8f¬\81@"),TEXT("small")}
+};
+
+const CommentSizeInfo premiumUser::COMMENT_SIZELIST[] = {
+ {TEXT("\91å\81@"),TEXT("big")}
+};
+
+const CommentPosInfo generalUser::COMMENT_POSLIST[] = {
+ {TEXT("\92Ê\8fí\81@"),TEXT("naka")}
+};
+
+const CommentPosInfo premiumUser::COMMENT_POSLIST[] = {
+ {TEXT("\89º\81@"),TEXT("shita")},
+ {TEXT("\8fã\81@"),TEXT("ue")}
+};
+
template<typename T>
static VOID addItemList(CComboBox &combo,T * colorList,UINT_PTR length){
UINT_PTR startItemcount = combo.GetCount();
for(UINT_PTR index = startItemcount; index < length;index++){
- combo.AddString(TEXT(""));
+ combo.AddString(colorList[index - startItemcount].name);
combo.SetItemDataPtr(index,(LPVOID)&colorList[index - startItemcount]);
}
return;
}
+
+
+template<typename T>
+static UINT_PTR CalcComboBoxWidth(CComboBox &combo){
+
+ CPaintDC pdc(combo);
+ SIZE size;
+ UINT_PTR rslt = 0;
+ UINT_PTR itemCount = combo.GetCount();
+ LPCTSTR name;
+ for(UINT_PTR index = 0;index < itemCount;index++){
+ name = ((T*)combo.GetItemDataPtr(index))->name;
+ ::GetTextExtentPoint32(pdc,name,_tcslen(name),&size);
+ rslt = rslt < (UINT_PTR)size.cx ? size.cx : rslt;
+ }
+
+ return rslt;
+}
+
CCommentWriteWindow::CCommentWriteWindow():
commentWriteHeight(0),
+commentWriteInternalHeight(0),
commentWriteMaxLength(INIT_COMMENTWRITE_MAXLENGTH)
{}
commentSizeBox.Create(m_hWnd,0,WC_COMBOBOX,WS_CHILD | WS_VISIBLE | CBS_DROPDOWNLIST,0,COMMENTSIZE_BOX);
commentColorBox.Create(m_hWnd,0,WC_COMBOBOX,WS_CHILD | WS_VISIBLE | CBS_DROPDOWNLIST | CBS_OWNERDRAWFIXED ,0,COMMENTCOLOR_BOX);
anonymousButton.Create(m_hWnd,0,WC_BUTTON,WS_CHILD | WS_VISIBLE | BS_CHECKBOX,0,ANONYMOUS_BUTTON);
- comment.Create(m_hWnd,0,WC_EDIT,WS_CHILD | WS_VISIBLE | WS_BORDER,0,COMMENT_EDIT);
+ commentEdit.Create(m_hWnd,0,WC_EDIT,WS_CHILD | WS_VISIBLE | WS_BORDER,0,COMMENT_EDIT);
commentWriteButton.Create(m_hWnd,0,WC_BUTTON,WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON,0,COMMENTWRITE_BOTTON);
commentPosBox.SetFont(AtlGetDefaultGuiFont());
commentSizeBox.SetFont(AtlGetDefaultGuiFont());
anonymousButton.SetWindowTextW(ANONYMOUS_BOTTONSTRING);
anonymousButton.SetFont(AtlGetDefaultGuiFont());
- comment.SetFont(AtlGetDefaultGuiFont());
- comment.SetLimitText(commentWriteMaxLength);
+ commentEdit.SetFont(AtlGetDefaultGuiFont());
+ commentEdit.SetLimitText(commentWriteMaxLength);
commentWriteButton.SetWindowTextW(WRITE_BOTTONSTRING);
commentWriteButton.SetFont(AtlGetDefaultGuiFont());
- comment.SetWindowTextW(TEXT(""));
-
- addItemList(commentColorBox,GENERALUSER_COMMENT_COLORLIST,ARRAY_LENGTH(GENERALUSER_COMMENT_COLORLIST));
+ commentEdit.SetWindowTextW(TEXT(""));
+ addItemList(commentColorBox,generalUser::COMMENT_COLORLIST,ARRAY_LENGTH(generalUser::COMMENT_COLORLIST));
+ addItemList(commentSizeBox,generalUser::COMMENT_SIZELIST,ARRAY_LENGTH(generalUser::COMMENT_SIZELIST));
+ addItemList(commentPosBox,generalUser::COMMENT_POSLIST,ARRAY_LENGTH(generalUser::COMMENT_POSLIST));
+ commentColorBox.SetCurSel(0);
+ commentSizeBox.SetCurSel(0);
+ commentPosBox.SetCurSel(0);
CFont font;
font = AtlGetDefaultGuiFont();
CPaintDC pdc(*this);
LPCTSTR sample = TEXT(" ");
GetTextExtentPoint32(pdc,sample,_tcslen(sample),&thisSize);
commentWriteHeight = thisSize.cy + COMMENTWRITEWINDOW_SEPARATEFSIZE.top + COMMENTWRITEWINDOW_SEPARATEFSIZE.bottom;
-
+ commentWriteInternalHeight = commentWriteHeight - (COMMENTWRITEWINDOW_SEPARATEFSIZE.top + COMMENTWRITEWINDOW_SEPARATEFSIZE.bottom);
return 0;
}
commentSizeBox.DestroyWindow();
commentColorBox.DestroyWindow();
anonymousButton.DestroyWindow();
- comment.DestroyWindow();
+ commentEdit.DestroyWindow();
commentWriteButton.DestroyWindow();
}
SIZE commentWriteButtonSize;
commentWriteButton.GetIdealSize(&commentWriteButtonSize);
anonymousButton.GetIdealSize(&commentAnonymousButtonSize);
- //\83T\83C\83Y\95Ï\8dX\8f\88\97\9d
- commentPosBox.MoveWindow(COMMENTWRITEWINDOW_SEPARATEFSIZE.left,COMMENTWRITEWINDOW_SEPARATEFSIZE.top, commentPosBoxSize.cx,commentWriteHeight - (COMMENTWRITEWINDOW_SEPARATEFSIZE.top + COMMENTWRITEWINDOW_SEPARATEFSIZE.bottom),TRUE);
- commentSizeBox.MoveWindow((COMMENTWRITEWINDOW_SEPARATEFSIZE.left * 2) + COMMENTWRITEWINDOW_SEPARATEFSIZE.right + commentPosBoxSize.cx, COMMENTWRITEWINDOW_SEPARATEFSIZE.top, commentSizeBoxSize.cx,commentWriteHeight - (COMMENTWRITEWINDOW_SEPARATEFSIZE.top + COMMENTWRITEWINDOW_SEPARATEFSIZE.bottom),TRUE);
- commentColorBox.MoveWindow((COMMENTWRITEWINDOW_SEPARATEFSIZE.left * 3) + (COMMENTWRITEWINDOW_SEPARATEFSIZE.right * 2) + commentPosBoxSize.cx + commentSizeBoxSize.cx,COMMENTWRITEWINDOW_SEPARATEFSIZE.top,commentColorBoxSize.cx, commentWriteHeight - (COMMENTWRITEWINDOW_SEPARATEFSIZE.top + COMMENTWRITEWINDOW_SEPARATEFSIZE.bottom),TRUE);
- anonymousButton.MoveWindow((COMMENTWRITEWINDOW_SEPARATEFSIZE.left * 4) + (COMMENTWRITEWINDOW_SEPARATEFSIZE.right * 3) + commentPosBoxSize.cx + commentSizeBoxSize.cx + commentColorBoxSize.cx ,COMMENTWRITEWINDOW_SEPARATEFSIZE.top,commentAnonymousButtonSize.cx,commentWriteHeight - (COMMENTWRITEWINDOW_SEPARATEFSIZE.top + COMMENTWRITEWINDOW_SEPARATEFSIZE.bottom),TRUE);
- comment.MoveWindow((COMMENTWRITEWINDOW_SEPARATEFSIZE.left * 5) + (COMMENTWRITEWINDOW_SEPARATEFSIZE.right * 4) + commentPosBoxSize.cx + commentSizeBoxSize.cx + commentColorBoxSize.cx + commentAnonymousButtonSize.cx,COMMENTWRITEWINDOW_SEPARATEFSIZE.top,size.cx - (COMMENTWRITEWINDOW_SEPARATEFSIZE.left + (COMMENTWRITEWINDOW_SEPARATEFSIZE.right * 2) + commentWriteButtonSize.cx + ((COMMENTWRITEWINDOW_SEPARATEFSIZE.left * 5) + (COMMENTWRITEWINDOW_SEPARATEFSIZE.right * 4) + commentPosBoxSize.cx + commentSizeBoxSize.cx + commentColorBoxSize.cx + commentAnonymousButtonSize.cx)),commentWriteHeight - (COMMENTWRITEWINDOW_SEPARATEFSIZE.top + COMMENTWRITEWINDOW_SEPARATEFSIZE.bottom),TRUE);
- commentWriteButton.MoveWindow(size.cx - (commentWriteButtonSize.cx),COMMENTWRITEWINDOW_SEPARATEFSIZE.top,commentWriteButtonSize.cx - COMMENTWRITEWINDOW_SEPARATEFSIZE.right,commentWriteHeight - (COMMENTWRITEWINDOW_SEPARATEFSIZE.top + COMMENTWRITEWINDOW_SEPARATEFSIZE.bottom),TRUE);
+
+ RECT commentPosBoxRect;
+ RECT commentSizeBoxRect;
+ RECT commentColorBoxRect;
+ RECT anonymousButtonRect;
+ RECT commentEditRect;
+ RECT commentWriteButtonRect;
+
+
+
+
+
+ commentPosBoxRect.left = COMMENTWRITEWINDOW_SIDESEPARATESIZE;
+ this->commentPosBoxCS.Lock();
+ commentPosBoxRect.right = commentPosBoxRect.left + CalcComboBoxWidth<CommentPosInfo>(commentPosBox);
+ this->commentPosBoxCS.Unlock();
+
+ commentSizeBoxRect.left = commentPosBoxRect.right + COMMENTWRITEWINDOW_SIDESEPARATESIZE;
+ this->commentSizeBoxCS.Lock();
+ commentSizeBoxRect.right = commentSizeBoxRect.left + CalcComboBoxWidth<CommentSizeInfo>(commentSizeBox);
+ this->commentSizeBoxCS.Unlock();
+
+ commentColorBoxRect.left = commentSizeBoxRect.right + COMMENTWRITEWINDOW_SIDESEPARATESIZE;
+ commentColorBoxRect.right = commentColorBoxRect.left + commentColorBoxSize.cx;
+
+ anonymousButtonRect.left = commentColorBoxRect.right + COMMENTWRITEWINDOW_SIDESEPARATESIZE;
+ anonymousButtonRect.right = anonymousButtonRect.left + commentAnonymousButtonSize.cx;
+
+ commentEditRect.left = anonymousButtonRect.right + COMMENTWRITEWINDOW_SIDESEPARATESIZE;
+
+ commentWriteButtonRect.right = size.cx - COMMENTWRITEWINDOW_SIDESEPARATESIZE;
+ commentWriteButtonRect.left = commentWriteButtonRect.right - commentWriteButtonSize.cx;
+
+ commentEditRect.right = commentWriteButtonRect.left - COMMENTWRITEWINDOW_SIDESEPARATESIZE;
+
+
+
+ //\88Ú\93®\8f\88\97\9d
+ HDWP hDwp = BeginDeferWindowPos(6);
+
+ commentPosBox.DeferWindowPos(hDwp,NULL,
+ commentPosBoxRect.left,COMMENTWRITEWINDOW_SEPARATEFSIZE.top,commentPosBoxRect.right - commentPosBoxRect.left,commentWriteInternalHeight,
+ SWP_NOZORDER);
+ commentSizeBox.DeferWindowPos(hDwp,NULL,
+ commentSizeBoxRect.left,COMMENTWRITEWINDOW_SEPARATEFSIZE.top,commentSizeBoxRect.right - commentSizeBoxRect.left,commentWriteInternalHeight,
+ SWP_NOZORDER);
+
+ commentColorBox.DeferWindowPos(hDwp,NULL,
+ commentColorBoxRect.left,COMMENTWRITEWINDOW_SEPARATEFSIZE.top,commentColorBoxRect.right - commentColorBoxRect.left,commentWriteInternalHeight,
+ SWP_NOZORDER);
+
+ anonymousButton.DeferWindowPos(hDwp,NULL,
+ anonymousButtonRect.left,COMMENTWRITEWINDOW_SEPARATEFSIZE.top,anonymousButtonRect.right - anonymousButtonRect.left,commentWriteInternalHeight,
+ SWP_NOZORDER);
+
+
+ commentEdit.DeferWindowPos(hDwp,NULL,
+ commentEditRect.left,COMMENTWRITEWINDOW_SEPARATEFSIZE.top,commentEditRect.right - commentEditRect.left,commentWriteInternalHeight,
+ SWP_NOZORDER);
+
+ commentWriteButton.DeferWindowPos(hDwp,NULL,
+ commentWriteButtonRect.left,COMMENTWRITEWINDOW_SEPARATEFSIZE.top,commentWriteButtonRect.right - commentWriteButtonRect.left,commentWriteInternalHeight,
+ SWP_NOZORDER);
+
+ EndDeferWindowPos(hDwp);
+
return;
}
VOID CCommentWriteWindow::OnDrawItem(UINT wParam,LPDRAWITEMSTRUCT lParam){
+
+
if(lParam->hwndItem == commentColorBox.m_hWnd && commentColorBox.GetCount() > 0){
+
+
+ RECT drawRect = lParam->rcItem;
UINT_PTR itemNo = 0;
+ INT_PTR curselNo = commentColorBox.GetCurSel();
+ CDCHandle dcHandle = lParam->hDC;
+ CBrush bkBrush;
+
+ drawRect.left += 2;
+ drawRect.top += 2;
+ drawRect.right -= 2;
+ drawRect.bottom -= 2;
if(lParam->itemID == ((UINT)-1)){
- INT_PTR curselNo = commentColorBox.GetCurSel();
+
- itemNo = curselNo == -1 ? 0 : curselNo;
+ itemNo = curselNo == CB_ERR ? 0 : curselNo;
+
} else {
itemNo = lParam->itemID;
+
+
+
+
+
}
- CDCHandle dcHandle = lParam->hDC;
- ComentColor *commentColor = (ComentColor *)commentColorBox.GetItemDataPtr(itemNo);
+ CommentInfo<COLORREF> &commentColor = *(CommentInfo<COLORREF> *)commentColorBox.GetItemDataPtr(itemNo);
+
+
+ if(lParam->itemState & (ODS_FOCUS | ODS_COMBOBOXEDIT)){
+
+
+
+ bkBrush.CreateSolidBrush(RGB(160,160,160));
+
+ } else {
+
+ bkBrush.CreateSolidBrush(RGB(255,255,255));
+
+ }
+
CBrush brush;
CPen cpen;
- brush.CreateSolidBrush(commentColor->color);
-
+ brush.CreateSolidBrush(commentColor.userData);
+ dcHandle.FillRect(&lParam->rcItem,bkBrush);
dcHandle.SelectBrush(brush);
dcHandle.SelectPen((HPEN)::GetStockObject(BLACK_PEN));
- dcHandle.Rectangle(lParam->rcItem.left,lParam->rcItem.top,lParam->rcItem.right,lParam->rcItem.bottom);
+ dcHandle.FillRect(&drawRect,brush);
}
VOID CNliteMainFrame::ChangeSize(const SIZE& client){
+ UINT_PTR tabheight = client.cy - (toolBarHeight + statusBarHeight + commentWriteWindow.commentWriteHeight);
- INT_PTR tabheight = client.cy - (toolBarHeight + statusBarHeight + commentWriteWindow.commentWriteHeight);
- tabctrl.MoveWindow(0,toolBarHeight,client.cx,tabheight);
-
-
- RECT tabClientRect;
-
- tabctrl.GetClientRect(&tabClientRect);
-
+ RECT tabWindowRect = {0};
+ RECT commentViewRect = {0};
+ RECT commentWriteWindowRect = {0};
- commentWriteWindow.MoveWindow(0,toolBarHeight +tabheight,client.cx,client.cy - ((toolBarHeight + tabheight +statusBarHeight)));
- tabctrl.AdjustRect(FALSE,&tabClientRect);
+ tabWindowRect.left = 0;
+ tabWindowRect.top = toolBarHeight;
+ tabWindowRect.right = client.cx - tabWindowRect.left;
+ tabWindowRect.bottom = tabWindowRect.top + tabheight;
+ commentWriteWindowRect.left = 0;
+ commentWriteWindowRect.top = tabWindowRect.bottom;
+ commentWriteWindowRect.right = commentWriteWindowRect.left + client.cx;
+ commentWriteWindowRect.bottom = commentWriteWindowRect.top + commentWriteWindow.commentWriteHeight;
- commentView.MoveWindow(tabClientRect.left, tabClientRect.top,tabClientRect.right - tabClientRect.left, tabClientRect.bottom - tabClientRect.top);
- ::SetWindowPos(commentWriteWindow,HWND_BOTTOM,0,0,0,0,SWP_NOMOVE | SWP_NOSIZE | SWP_SHOWWINDOW);
- //commentWriteWindow.MoveWindow(0,client.cy - (commentWriteWindowSize.cy + statusBarHeight),client.cx,client.cy - statusBarHeight);
+ tabctrl.MoveWindow(tabWindowRect.left,tabWindowRect.top,tabWindowRect.right - tabWindowRect.left ,tabWindowRect.bottom - tabWindowRect.top);
+ commentWriteWindow.MoveWindow(commentWriteWindowRect.left,commentWriteWindowRect.top,commentWriteWindowRect.right - commentWriteWindowRect.left ,commentWriteWindowRect.bottom - commentWriteWindowRect.top);
+ tabctrl.GetClientRect(&commentViewRect);
+ tabctrl.AdjustRect(FALSE,&commentViewRect);
+
+ commentView.MoveWindow(commentViewRect.left, commentViewRect.top,commentViewRect.right - commentViewRect.left, commentViewRect.bottom - commentViewRect.top);
+
return;
// \83X\83e\81[\83^\83X\83o\81[\82ð\8dì\90¬
vcverify(CreateSimpleStatusBar(),TEXT("\83X\83e\81[\83^\83X\83o\81[\8dì\90¬\82É\8e¸\94s\82µ\82Ü\82µ\82½"));
- tabctrl.Create(m_hWnd,0,NULL,WS_CHILD | WS_CLIPCHILDREN | WS_DLGFRAME);
+ tabctrl.Create(m_hWnd,0,NULL,WS_CHILD | WS_VISIBLE | WS_CLIPCHILDREN | WS_DLGFRAME );
commentView.Create(tabctrl.m_hWnd);
- commentWriteWindow.Create(m_hWnd,0,COMMENTWRITEWINDOW,WS_CHILD | WS_VISIBLE);
- commentWriteWindow.SetWindowPos(HWND_BOTTOM,0,0,0,0,SWP_SHOWWINDOW);
+ commentWriteWindow.Create(m_hWnd,0,COMMENTWRITEWINDOW,WS_CHILD | WS_VISIBLE );
CreateSimpleReBar();
HWND hWndToolBar = CreateSimpleToolBarCtrl(m_hWnd,IDC_NLITE, FALSE, ATL_SIMPLE_TOOLBAR_PANE_STYLE);
lvNoCombo.Create(m_hWnd, CRect(0, 0, 100, 100), NULL,WS_CHILD | WS_VISIBLE | WS_VSCROLL | CBS_DROPDOWN , 0, IDC_COMBO_REBAR);
AddSimpleReBarBand(lvNoCombo,TEXT("\95ú\91\97URL"));
SizeSimpleReBarBands();
+ //tabctrl.SetWindowPos(HWND_BOTTOM,0,0,0,0,SWP_SHOWWINDOW);
-
- tabctrl.SetFont(hTabFont);
- tabctrl.SetWindowPos(HWND_BOTTOM,0,0,0,0,SWP_SHOWWINDOW);
+ tabctrl.SetFont(hTabFont);
tabctrl.AddItem(TCIF_TEXT | TCIF_PARAM, _T("\83R\83\81\83\93\83g\88ê\97\97"), 0, (DWORD)commentView.m_hWnd);
///
///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
+ ///CString\82ð\8cp\8f³
///
- class CNLITESTRING_THISTYPE{
+ class CNLITESTRING_THISTYPE: public CNLITESTRING_INTERNALSTRINGTYPE{
public:
- //\83\81\83\93\83o
- private:
- CNLITESTRING_INTERNALSTRINGTYPE is_string;
-
-
-
- public:
+
+
///
///\83R\83\93\83X\83g\83\89\83N\83^
///
- CNLITESTRING_THISTYPE():is_string(){}
+ CNLITESTRING_THISTYPE():CNLITESTRING_INTERNALSTRINGTYPE(){}
- CNLITESTRING_THISTYPE(LPCTSTR in_str):is_string(in_str){}
-
- CNLITESTRING_THISTYPE(const CNLITESTRING_INTERNALSTRINGTYPE_REFERENCE in_str):is_string(in_str){}
-
- CNLITESTRING_THISTYPE(const CNLITESTRING_THISTYPE_REFERENCE in_str):is_string(in_str.is_string){}
+ CNLITESTRING_THISTYPE(LPCTSTR in_str):CNLITESTRING_INTERNALSTRINGTYPE(in_str){}
+ CNLITESTRING_THISTYPE(const CNLITESTRING_INTERNALSTRINGTYPE_REFERENCE in_str):CNLITESTRING_INTERNALSTRINGTYPE(in_str){}
+ CNLITESTRING_THISTYPE(const CNLITESTRING_THISTYPE_REFERENCE in_str):CNLITESTRING_INTERNALSTRINGTYPE(in_str){}
+
+public:
///
///\95¶\8e\9a\97ñ\82Ì\92·\82³\82ð\8eæ\93¾
///
UINT_PTR length(){
- return _tcslen(is_string);
- }
-
- ///
- ///\95¶\8e\9a\97ñ\82ð\8c\9f\8dõ
- ///
- template<typename T>
- int Find(const T pszSub,int iStart = 0)const throw(){
-
- return is_string.Find(pszSub,iStart);
- }
-
- ///
- ///\8f\91\8e®\82Å\83t\83H\81[\83}\83b\83g\89»\82·\82é
- ///
- template<typename T>
- void Format(T format,...){
- va_list ap;
- va_start(ap,format);
-
- is_string.Format(format,ap);
- va_end(ap);
-
- }
-
-
- //
- //\89\89\8eZ\8eq
- //
- public:
- operator LPCTSTR(){
- return (LPCWSTR)is_string;
+ return _tcslen(*this);
}
-
- template<typename T>
- CNLITESTRING_THISTYPE_REFERENCE operator=(const T &instr){
- is_string = instr;
- return *this;
- }
-
-
- CNLITESTRING_THISTYPE_REFERENCE operator=(const CNLITESTRING_THISTYPE_REFERENCE instr){
- is_string = instr.is_string;
- return *this;
- }
-
- template<typename T>
- CNLITESTRING_THISTYPE_REFERENCE operator+=(const T &instr){
- is_string += instr;
- return *this;
- }
-
-
- CNLITESTRING_THISTYPE_REFERENCE operator+=(const CNLITESTRING_THISTYPE_REFERENCE instr){
- is_string += instr.is_string;
- return *this;
- }
-
-
- template<typename T>
- friend CNLITESTRING_THISTYPE operator+(const CNLITESTRING_THISTYPE_REFERENCE instr1, const T &instr2){
- return CNLITESTRING_THISTYPE(instr1.is_string + instr2);
- }
-
-
- template<typename T>
- friend CNLITESTRING_THISTYPE operator+(const T &instr1, const CNLITESTRING_THISTYPE_REFERENCE instr2){
- return CNLITESTRING_THISTYPE(instr1 + instr2.is);
- }
-
-
- friend CNLITESTRING_THISTYPE operator+(const CNLITESTRING_THISTYPE_REFERENCE instr1,const CNLITESTRING_THISTYPE_REFERENCE instr2){
- return CNLITESTRING_THISTYPE(instr1.is_string + instr2.is_string);
- }
-
- template<typename T>
- friend bool operator< (const CNLITESTRING_THISTYPE_REFERENCE instr1,const T &instr2){
- return instr1.is_string < instr2;
- }
-
- template<typename T>
- friend bool operator< (const T &instr1,const CNLITESTRING_THISTYPE_REFERENCE instr2){
- return instr1.is_string < instr2;
- }
-
- friend bool operator< (const CNLITESTRING_THISTYPE_REFERENCE instr1,const CNLITESTRING_THISTYPE_REFERENCE instr2){
- return instr1.is_string < instr2.is_string;
- }
-
-
- template<typename T>
- friend bool operator> (const CNLITESTRING_THISTYPE_REFERENCE instr1,const T &instr2){
- return instr1.is_string > instr2;
- }
-
- template<typename T>
- friend bool operator> (const T &instr1,const CNLITESTRING_THISTYPE_REFERENCE instr2){
- return instr1.is_string > instr2;
- }
-
- friend bool operator> (const CNLITESTRING_THISTYPE_REFERENCE instr1,const CNLITESTRING_THISTYPE_REFERENCE instr2){
- return instr1.is_string > instr2.is_string;
- }
-
- template<typename T>
- friend bool operator<= (const CNLITESTRING_THISTYPE_REFERENCE instr1,const T &instr2){
- return instr1.is_string <= instr2;
- }
-
- template<typename T>
- friend bool operator<= (const T &instr1,const CNLITESTRING_THISTYPE_REFERENCE instr2){
- return instr1.is_string <= instr2;
- }
-
- friend bool operator<= (const CNLITESTRING_THISTYPE_REFERENCE instr1,const CNLITESTRING_THISTYPE_REFERENCE instr2){
- return instr1.is_string <= instr2.is_string;
- }
-
-
- template<typename T>
- friend bool operator>= (const CNLITESTRING_THISTYPE_REFERENCE instr1,const T &instr2){
- return instr1.is_string >= instr2;
- }
-
- template<typename T>
- friend bool operator>= (const T &instr1,const CNLITESTRING_THISTYPE_REFERENCE instr2){
- return instr1.is_string >= instr2;
- }
-
- friend bool operator>= (const CNLITESTRING_THISTYPE_REFERENCE instr1,const CNLITESTRING_THISTYPE_REFERENCE instr2){
- return instr1.is_string >= instr2.is_string;
- }
-
-
- template<typename T>
- friend bool operator== (const CNLITESTRING_THISTYPE_REFERENCE instr1,const T &instr2){
- return instr1.is_string == instr2;
- }
-
- template<typename T>
- friend bool operator== (const T &instr1,const CNLITESTRING_THISTYPE_REFERENCE instr2){
- return instr1.is_string == instr2;
- }
-
- friend bool operator== (const CNLITESTRING_THISTYPE_REFERENCE instr1,const CNLITESTRING_THISTYPE_REFERENCE instr2){
- return instr1.is_string == instr2.is_string;
- }
-
-
- template<typename T>
- friend bool operator!= (const CNLITESTRING_THISTYPE_REFERENCE instr1,const T &instr2){
- return instr1.is_string != instr2;
- }
-
- template<typename T>
- friend bool operator!= (const T &instr1,const CNLITESTRING_THISTYPE_REFERENCE instr2){
- return instr1.is_string != instr2;
- }
-
- friend bool operator!= (const CNLITESTRING_THISTYPE_REFERENCE instr1,const CNLITESTRING_THISTYPE_REFERENCE instr2){
- return instr1.is_string != instr2.is_string;
- }
};
}
\ No newline at end of file