PUSHBUTTON "OK", IDOK, 48, 131, 32, 14
PUSHBUTTON "\83L\83\83\83\93\83Z\83\8b", IDCANCEL, 104, 132, 33, 14
LTEXT "\83\86\81[\83UID", IDC_STATIC, 19, 20, 26, 8, SS_LEFT
- CTEXT "", IDC_USERID_STATIC, 60, 17, 110, 14, SS_CENTER
- LTEXT "", IDC_LT_NICKNAME_STATIC, 92, 71, 55, 12, WS_BORDER | SS_LEFT | SS_NOTIFY
- LTEXT "", IDC_LT_BACKCOLOR_STATIC, 91, 98, 55, 14, WS_BORDER | SS_LEFT | SS_NOTIFY
+ CTEXT "", IDC_USERID_STATIC, 60, 17, 110, 14, SS_CENTER | SS_CENTERIMAGE
+ LTEXT "", IDC_LT_NICKNAME_STATIC, 92, 71, 55, 12, WS_BORDER | SS_LEFT | SS_NOTIFY, WS_EX_STATICEDGE
+ LTEXT "", IDC_LT_BACKCOLOR_STATIC, 91, 98, 55, 14, WS_BORDER | SS_LEFT | SS_NOTIFY, WS_EX_STATICEDGE
PUSHBUTTON "\96ß\82·", IDC_NAMECOLOR_RETURN_BUTTON, 153, 73, 18, 14
PUSHBUTTON "\96ß\82·", IDC_BACKCOLOR_RETURN_BUTTON, 153, 97, 18, 14
}
const static LPCTSTR ANONYMOUS_MAILCOMMAND = TEXT("184");
const static LPCTSTR ANONYMOUS_BOTTONSTRING = ANONYMOUS_MAILCOMMAND;
-
+const static LPCTSTR OWNERMODE_BOTTONSTRING = TEXT("\8eå\83R\83\81");
const static LPCTSTR WRITE_BOTTONSTRING = TEXT("\8f\91\82«\8d\9e\82Ý");
const static LPCTSTR CHECKBUTTON_HIDDENSTRING = TEXT(" ");
commentPosBox.Create(m_hWnd,0,WC_COMBOBOX,WS_CHILD | WS_VISIBLE | CBS_DROPDOWNLIST ,0,COMMENTPOS_BOX);
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 | BS_AUTOCHECKBOX ,0,ANONYMOUS_BUTTON);
+ 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_AUTOCHECKBOX | BS_PUSHLIKE,0,ANONYMOUS_BUTTON);
+ ownerModeButton.Create(m_hWnd,0,WC_BUTTON,WS_CHILD |BS_AUTOCHECKBOX | BS_PUSHLIKE,0,OWNERMODE_BUTTON);
commentSubEdit.Create(m_hWnd,0,WC_EDIT,WS_CHILD | WS_VISIBLE | WS_BORDER | ES_AUTOHSCROLL,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());
commentColorBox.SetFont(AtlGetDefaultGuiFont());
-
- anonymousButton.SetWindowTextW(CHECKBUTTON_HIDDENSTRING);
+ anonymousButton.SetWindowTextW(ANONYMOUS_MAILCOMMAND);
anonymousButton.SetFont(AtlGetDefaultGuiFont());
commentSubEdit.SetFont(AtlGetDefaultGuiFont());
commentSubEdit.SetLimitText(commentWriteMaxLength);
LPCTSTR sample = TEXT(" ");
GetTextExtentPoint32(pdc,sample,_tcslen(sample),&thisSize);
- commentWriteHeight = thisSize.cy + (CHECKBUTTON_SUBSCRIPT_HEIGHT / 2) + COMMENTWRITEWINDOW_SEPARATEFSIZE.top + COMMENTWRITEWINDOW_SEPARATEFSIZE.bottom;
+ commentWriteHeight = thisSize.cy + COMMENTWRITEWINDOW_SEPARATEFSIZE.top + COMMENTWRITEWINDOW_SEPARATEFSIZE.bottom;
infoDispHeight = commentWriteHeight;
commentWriteInternalHeight = commentWriteHeight - (COMMENTWRITEWINDOW_SEPARATEFSIZE.top + COMMENTWRITEWINDOW_SEPARATEFSIZE.bottom);
anonymousLogFont.lfHeight = CHECKBUTTON_SUBSCRIPT_HEIGHT;
anonymousLogFont.lfCharSet = SHIFTJIS_CHARSET;
- anonymousFont.CreateFontIndirect(&anonymousLogFont);
-
+ checkButtonFont.CreateFontIndirect(&anonymousLogFont);
+ anonymousButton.SetFont(checkButtonFont);
+ ownerModeButton.SetFont(checkButtonFont);
CFontHandle f = AtlGetDefaultGuiFont();
LOGFONT timeLogFont;
f.GetLogFont(timeLogFont);
timeLogFont.lfWeight = FW_BOLD;
timeFont.CreateFontIndirectW(&timeLogFont);
-
+
return 0;
}
}
- RECT anonymousRect;
- SIZE anonymousStringSize;
-
- anonymousButton.GetWindowRect(&anonymousRect);
- CPoint anonymousPoint(anonymousRect.left,anonymousRect.top);
- ::ScreenToClient(*this,&anonymousPoint);
- anonymousRect.right -= anonymousRect.left;
- anonymousRect.bottom -= anonymousRect.top;
- anonymousRect.left = anonymousPoint.x;
- anonymousRect.top = anonymousPoint.y + anonymousRect.bottom;
-
-
- ::GetTextExtentPoint32(pdc,ANONYMOUS_BOTTONSTRING,_tcslen(ANONYMOUS_BOTTONSTRING),&anonymousStringSize);
- anonymousRect.right = anonymousRect.left + anonymousStringSize.cx;
- anonymousRect.bottom = anonymousRect.top + anonymousStringSize.cy;
-
- pdc.SelectFont(anonymousFont);
-
- pdc.DrawText(ANONYMOUS_BOTTONSTRING,_tcslen(ANONYMOUS_BOTTONSTRING),&anonymousRect,0);
return;
}
this->ShowWindow(SW_SHOW);
this->streamTime = threadComment->server_time;
this->SetTimer(TIMER_ID,1000,NULL);
-
+ if(nicoLiveStream.IsOwner() == TRUE){
+
+ this->ownerModeButton.ShowWindow(SW_SHOW);
+
+ } else {
+
+ this->ownerModeButton.ShowWindow(SW_HIDE);
+
+ }
return;
SIZE commentWriteButtonSize;
commentWriteButton.GetIdealSize(&commentWriteButtonSize);
anonymousButton.GetIdealSize(&commentAnonymousButtonSize);
-
+ UINT_PTR defwindowCount = 0;
RECT commentPosBoxRect;
RECT commentSizeBoxRect;
RECT commentColorBoxRect;
RECT anonymousButtonRect;
RECT commentEditRect;
RECT commentWriteButtonRect;
-
+ RECT ownerModeButtonRect;
RECT thisWindowRect;
UINT_PTR writeSpaceHeight = COMMENTWRITEWINDOW_SEPARATEFSIZE.top * 2 + commentWriteInternalHeight;
commentColorBoxRect.left = commentSizeBoxRect.right + COMMENTWRITEWINDOW_SIDESEPARATESIZE;
commentColorBoxRect.right = commentColorBoxRect.left + commentColorBoxSize.cx;
- CDC cdc(anonymousButton.GetDC());
- SIZE anonymousStringSize;
- ::GetTextExtentPoint32(cdc,CHECKBUTTON_HIDDENSTRING,_tcslen(CHECKBUTTON_HIDDENSTRING),&anonymousStringSize);
+
anonymousButtonRect.left = commentColorBoxRect.right + COMMENTWRITEWINDOW_SIDESEPARATESIZE;
- anonymousButtonRect.right = anonymousButtonRect.left + commentAnonymousButtonSize.cx - anonymousStringSize.cx;
+ anonymousButtonRect.right = anonymousButtonRect.left + commentAnonymousButtonSize.cx;
- commentEditRect.left = anonymousButtonRect.right + COMMENTWRITEWINDOW_SIDESEPARATESIZE;
+ if(ownerModeButton.IsWindowVisible() == TRUE){
+
+
+ SIZE ownerModeButtonSize;
+ ownerModeButton.GetIdealSize(&ownerModeButtonSize);
+ ownerModeButtonRect.left = anonymousButtonRect.right + COMMENTWRITEWINDOW_SIDESEPARATESIZE;
+ ownerModeButtonRect.right = ownerModeButtonRect.left + ownerModeButtonSize.cx;
+ commentEditRect.left = ownerModeButtonRect.right + COMMENTWRITEWINDOW_SIDESEPARATESIZE;
+ defwindowCount = 7;
+ } else {
+
+ commentEditRect.left = anonymousButtonRect.right + COMMENTWRITEWINDOW_SIDESEPARATESIZE;
+ defwindowCount = 6;
+ }
commentWriteButtonRect.right = size.cx - COMMENTWRITEWINDOW_SIDESEPARATESIZE;
commentWriteButtonRect.left = commentWriteButtonRect.right - commentWriteButtonSize.cx;
//\88Ú\93®\8f\88\97\9d
- HDWP hDwp = BeginDeferWindowPos(6);
+ HDWP hDwp = BeginDeferWindowPos(defwindowCount);
commentPosBox.DeferWindowPos(hDwp,*this,
commentPosBoxRect.left,writeSpaceHeight,commentPosBoxRect.right - commentPosBoxRect.left,commentWriteInternalHeight,
SWP_NOZORDER);
anonymousButton.DeferWindowPos(hDwp,*this,
- anonymousButtonRect.left,writeSpaceHeight,anonymousButtonRect.right - anonymousButtonRect.left,commentWriteInternalHeight - CHECKBUTTON_SUBSCRIPT_HEIGHT,
+ anonymousButtonRect.left,writeSpaceHeight,anonymousButtonRect.right - anonymousButtonRect.left,commentWriteInternalHeight,
SWP_NOZORDER);
+ if(ownerModeButton.IsWindowVisible() == TRUE){
+ ownerModeButton.DeferWindowPos(hDwp,*this,
+ ownerModeButtonRect.left,writeSpaceHeight,ownerModeButtonRect.right - ownerModeButtonRect.left,commentWriteInternalHeight,
+ SWP_NOZORDER);
+
+ }
commentSubEdit.DeferWindowPos(hDwp,*this,
commentEditRect.left,writeSpaceHeight,commentEditRect.right - commentEditRect.left,commentWriteInternalHeight,
SWP_NOZORDER);