namespace nlite{
-
+ template <typename T>
+ struct CommentInfo{
+ LPCTSTR name;
+ T userData;
+ };
+
+ typedef CommentInfo<COLORREF> CommentColorInfo;
+ typedef CommentInfo<LPCTSTR> CommentSizeInfo;
+ typedef CommentInfo<LPCTSTR> CommentPosInfo;
+
+ class CNicoLiveStream;
+
+ ///
+ ///\88ê\94Ê\89ï\88õ\83R\83}\83\93\83h
+ ///
+ namespace generalUser{
+ ///
+ ///\88ê\94Ê\89ï\88õ\83R\83\81\83\93\83g\90F\83\8a\83X\83g
+ ///
+ extern const CommentColorInfo COMMENT_COLORLIST[];
+
+ ///
+ ///\88ê\94Ê\89ï\88õ\83T\83C\83Y\83R\83}\83\93\83h\83\8a\83X\83g
+ ///
+ extern const CommentSizeInfo COMMENT_SIZELIST[];
+
+ ///
+ ///\88ê\94Ê\89ï\88õ\83R\83\81\83\93\83g\88Ê\92u\83\8a\83X\83g
+ ///
+ extern const CommentPosInfo COMMENT_POSLIST[];
+
+ }
+
+ ///
+ ///\83v\83\8c\83~\83A\83\80\89ï\88õ\83R\83}\83\93\83h
+ ///
+ namespace premiumUser{
+ ///
+ ///\83v\83\8c\83~\83A\83\80\89ï\88õ\83R\83\81\83\93\83g\90F\83\8a\83X\83g
+ ///
+ extern const CommentColorInfo COMMENT_COLORLIST[];
+
+
+ ///
+ ///\83v\83\8c\83~\83A\83\80\89ï\88õ\83T\83C\83Y\83R\83}\83\93\83h\83\8a\83X\83g
+ ///
+ extern const CommentSizeInfo COMMENT_SIZELIST[];
+
+ ///
+ ///\83v\83\8c\83~\83A\83\80\89ï\88õ\83R\83\81\83\93\83g\88Ê\92u\83\8a\83X\83g
+ ///
+ extern const CommentPosInfo COMMENT_POSLIST[];
+
+ }
+
+
+ class CCommentWriteWindow;
+ class CSubChatEdit:public CWindowImpl<CSubChatEdit,CEdit>{
+ friend CCommentWriteWindow;
+
+
+ private:
+ CCommentWriteWindow &self;
+ CComAutoCriticalSection cs;
+ BOOL untilConnectingFlag;
+
+ public:
+ CSubChatEdit(CCommentWriteWindow &in_commentWriteWindow):self(in_commentWriteWindow){}
+
+
+ BEGIN_MSG_MAP_EX(CSubLiveNoComboBox)
+ MSG_WM_KEYDOWN(OnKeyDown)
+ END_MSG_MAP()
+
+ void OnKeyDown(TCHAR wParam, UINT upLParam,UINT loLParam);
+
+
+ VOID AgreeEnter();
+
+ static VOID EnterChatBox(LPVOID userData);
+ };
+
const static LPCTSTR COMMENTWRITEWINDOW = TEXT("commentWriteWindow");
-
+
+
+ ///
+ ///\83R\83\81\83\93\83g\8f\91\82«\8d\9e\82Ý\97p\83E\83B\83\93\83h\83E\83N\83\89\83X
+ ///
class CCommentWriteWindow:public CWindowImpl<CCommentWriteWindow>{
+ friend CSubChatEdit;
private:
- CComboBox commentPosBox;
- CComboBox commentSizeBox;
- CComboBox commentColorBox;
- CButton anonymousButton;
- CEdit comment;
- CButton commentWriteButton;
+ CComboBox commentPosBox; //\83R\83\81\83\93\83g\88Ê\92u\91I\91ð\83R\83\93\83{\83{\83b\83N\83X
+ CComAutoCriticalSection commentPosBoxCS; //\83R\83\81\83\93\83g\88Ê\92u\91I\91ð\83R\83\93\83{\83{\83b\83N\83X\83N\83\8a\83e\83B\83J\83\8b\83Z\83N\83V\83\87\83\93
+ CComboBox commentSizeBox; //\83R\83\81\83\93\83g\82Ì\91å\82«\82³\91I\91ð\83R\83\93\83{\83{\83b\83N\83X
+ CComAutoCriticalSection commentSizeBoxCS; //\83R\83\81\83\93\83g\82Ì\91å\82«\82³\91I\91ð\83R\83\93\83{\83{\83b\83N\83X\83N\83\8a\83e\83B\83J\83\8b\83Z\83N\83V\83\87\83\93
+ CComboBox commentColorBox; //\83R\83\81\83\93\83g\90F\91I\91ð\83R\83\93\83{\83{\83b\83N\83X
+ CButton anonymousButton; //184\91I\91ð\83{\83^\83\93
+ CButton ownerModeButton; //\8eå\83R\83\81\91I\91ð\83{\83^\83\93
+ CSubChatEdit commentSubEdit; //\83R\83\81\83\93\83g\8f\91\82«\8d\9e\82Ý\97p\83G\83f\83B\83b\83g\83T\83u\83N\83\89\83X
+ CButton commentWriteButton; //\83R\83\81\83\93\83g\8f\91\82«\8d\9e\82Ý\83{\83^\83\93
+ UINT_PTR commentWriteMaxLength; //\83R\83\81\83\93\83g\8f\91\82«\8d\9e\82Ý\92·\8dÅ\91å\92l
+ UINT_PTR commentWriteHeight; //\83R\83\81\83\93\83g\8f\91\82«\8d\9e\82Ý\83R\83\93\83g\83\8d\81[\83\8b\94z\92u\97Ì\88æ\82Ì\8d\82\82³
+ UINT_PTR infoDispHeight; //\83R\83\81\83\93\83g\8f\91\82«\8d\9e\82Ý\82É\8aÖ\82·\82é\82à\82Ì\88È\8aO\82Ì\8fî\95ñ\95\\8e¦\97Ì\88æ\82Ì\8d\82\82³
+ UINT_PTR commentWriteInternalHeight; //\83R\83\81\83\93\83g\8f\91\82«\8d\9e\82Ý\83R\83\93\83g\83\8d\81[\83\8b\94z\92u\97Ì\88æ\82Ì\8d\82\82³(\93à\95\94)
+ CNicoLiveStream &nicoLiveStream; //\95ú\91\97\83I\83u\83W\83F\83N\83g\82Ì\8eQ\8fÆ
+ time_t streamTime; //\95ú\91\97\8co\89ß\8e\9e\8aÔ
+ CFont checkButtonFont; //184\95\\8e¦\97p\83t\83H\83\93\83g
+ CFont timeFont; //\8co\89ß\8e\9e\8aÔ\95\\8e¦\97p\83t\83H\83\93\83g
+ COLORREF editBkColor; //\83G\83f\83B\83b\83g\82Ì\94w\8ci\90F
+ CBrush editBkBrush; //\83G\83f\83B\83b\83g\82Ì\94w\8ci\83u\83\89\83V
+
+ //\83R\83\93\83g\83\8d\81[\83\8bID
+ enum CONTROLID{
+ COMMENTPOS_BOX = 1,
+ COMMENTSIZE_BOX = 2,
+ COMMENTCOLOR_BOX = 3,
+ ANONYMOUS_BUTTON = 4,
+ COMMENT_EDIT = 5,
+ COMMENTWRITE_BOTTON = 6,
+ TIMER_ID = 7,
+ OWNERMODE_BUTTON = 5
+ };
+
public:
-
+
DECLARE_WND_CLASS(COMMENTWRITEWINDOW)
- //DECLARE_WND_CLASS_EX(COMMENTWRITEWINDOW,CS_HREDRAW | CS_VREDRAW | CS_DBLCLKS,COLOR_APPWORKSPACE)
//\83\81\83b\83Z\81[\83W\83}\83b\83v
BEGIN_MSG_MAP(CCommentWriteWindow)
MSG_WM_CREATE(OnCreate)
MSG_WM_DESTROY(OnDestroy)
- MSG_WM_SIZING(OnSizing)
MSG_WM_PAINT(OnPaint)
MSG_WM_SIZE(OnSize)
+ MSG_WM_ERASEBKGND(OnEraseBkGnd)
+ MSG_WM_CTLCOLOREDIT(OnCtlolorEdit)
+ MSG_WM_DRAWITEM(OnDrawItem)
+ MSG_WM_MEASUREITEM(OnMeasureItem)
+ MSG_WM_TIMER(OnTimer)
+ COMMAND_CODE_HANDLER_EX(BN_CLICKED,OnButton)
END_MSG_MAP()
+ public:
+
+ ///
+ ///\83R\83\93\83X\83g\83\89\83N\83^
+ ///
+ CCommentWriteWindow(CNicoLiveStream &nicoLiveStream);
+
+ ///
+ ///\8c»\8dÝ\8f\91\82«\8d\9e\82Ý\8f\88\97\9d\92\86\82©\82Ì\83t\83\89\83O\8am\94F
+ ///
+ BOOL IsWrighthing();
+
+
+ ///
+ ///\82±\82Ì\83E\83B\83\93\83h\83E\82Ì\8d\82\82³\82ð\8eæ\93¾
+ ///
+ UINT_PTR GetHeight();
+
+ ///
+ ///\83R\83\81\83\93\83g\91\97\90M
+ ///
+ BOOL SendChat();
+
+ ///
+ ///\83R\83\81\83\93\83g\91\97\90M\97\93\82É\95¶\8e\9a\97ñ\82ð\90Ý\92è
+ ///
+ BOOL SetText(LPCTSTR lpStr);
+
+ ///
+ ///\83R\83\81\83\93\83g\8eó\90M\8aJ\8en\8e\9e\82Ì\8f\88\97\9d
+ ///
+ VOID OnChatReceveStart(CNicoLiveStream &nicoLiveStream,NicoLiveThreadComment_P threadComment);
+
+ ///
+ ///\83R\83\81\83\93\83g\91\97\90M\8c\8b\89Ê\8eó\90M\8e\9e\82Ì\8f\88\97\9d
+ ///
+ VOID OnSendChatResult();
+
+ ///
+ ///\83n\81[\83g\83r\81[\83g\91\97\90M\8e\9e\82Ì\8f\88\97\9d
+ ///
+ VOID OnHeartBeat(NicoLiveHeartBeat_P heartBeat);
+
+ ///
+ ///\95ú\91\97\90Ø\92f\8e\9e\82Ì\8f\88\97\9d
+ ///
+ VOID OnDisConnect();
+
//
//\83\81\83b\83Z\81[\83W\83n\83\93\83h\83\89
//
private:
+
+ ///
+ ///\83E\83B\83\93\83h\83E\8dì\90¬\8e\9e\82Ì\8f\88\97\9d
+ ///
LRESULT OnCreate(LPCREATESTRUCT lpReateStruct);
-
+
+ ///
+ ///\83E\83B\83\93\83h\83E\94j\8aü\8e\9e\82Ì\8f\88\97\9d
+ ///
VOID OnDestroy();
-
- VOID OnSizing(UINT wParam,LPRECT lParam);
+ ///
+ ///\95`\89æ\8e\9e\82Ì\8f\88\97\9d
+ ///
VOID OnPaint(HDC hdc);
+
+ ///
+ ///\83T\83C\83Y\95Ï\8dX\8e\9e\82Ì\8f\88\97\9d
+ ///
LRESULT OnSize(UINT wParam,SIZE lParam);
+ ///
+ ///\83T\83C\83Y\95Ï\8dX\8f\88\97\9d
+ ///
VOID ChangeSize(SIZE &size);
-
+
+ ///
+ ///\83A\83C\83e\83\80\95`\89æ\8f\88\97\9d
+ ///
+ VOID OnDrawItem(UINT wParam,LPDRAWITEMSTRUCT lParam);
+
+ ///
+ ///\83A\83C\83e\83\80\82Ì\8d\82\82³\95Ï\8dX\8f\88\97\9d
+ ///
+ VOID OnMeasureItem(UINT wParam,LPMEASUREITEMSTRUCT lParam);
+
+ ///
+ ///\94w\8ci\82Ì\83`\83\89\83c\83L\82ð\97}\82¦\82é
+ ///
+ LRESULT OnEraseBkGnd(HDC wParam);
+
+ ///
+ ///\83{\83^\83\93\89\9f\89º\8e\9e\82Ì\8f\88\97\9d
+ ///
+ LRESULT OnButton(UINT hiWparam,INT_PTR loWparam,HWND lParam);
+
+
+ ///
+ ///\83G\83f\83B\83b\83g\83R\83\93\83g\83\8d\81[\83\8b\83J\83X\83^\83\80\83h\83\8d\81[
+ ///
+ LRESULT OnCtlolorEdit(HDC hdc,HWND hWnd);
+
+ VOID OnTimer(UINT id);
+
+
};
}
\ No newline at end of file