OSDN Git Service

レス機能追加
authorqwerty2501 <riot313@gmail.com>
Wed, 8 Feb 2012 13:10:08 +0000 (22:10 +0900)
committerqwerty2501 <riot313@gmail.com>
Wed, 8 Feb 2012 13:10:08 +0000 (22:10 +0900)
nlite.suo
nlite/nlite.h
nlite/nlite_commentWrite.cpp
nlite/nlite_commentWrite.h
nlite/nlite_commentview.cpp
nlite/nlite_commentview.h
nlite/nlite_mainframe.cpp
nlite/nlite_mainframe.h

index 6937499..8195887 100644 (file)
Binary files a/nlite.suo and b/nlite.suo differ
index 11447d9..6f45def 100644 (file)
@@ -24,6 +24,8 @@ namespace nlite{
        const static UINT_PTR COMMENTVIEW_HEADERITEMSIZE = 5;
        enum MESSAGE{
                UM_COMMENTVIEW_SETCTRL = WM_USER + 1,
+               UM_CLICK_CHATNO,
+               UM_CLICK_USERNAME
 
        };
 
index a3960ac..e7ca9c6 100644 (file)
@@ -378,6 +378,19 @@ end:
        return rslt;
 }
 
+
+BOOL CCommentWriteWindow::SetText(LPCTSTR lpStr){
+       
+       BOOL rslt = this->commentSubEdit.SetWindowText(lpStr);
+       if(rslt == TRUE){
+               commentSubEdit.SetFocus();
+               int cursor = commentSubEdit.GetWindowTextLength();
+               commentSubEdit.SetSel(cursor,cursor);
+               //commentSubEdit.ShowCaret();
+       }
+       return rslt; 
+}
+
 VOID CCommentWriteWindow::OnChatReceveStart(CNicoLiveStream &nicoLiveStream,NicoLiveThreadComment_P threadComment){
        
        this->ShowWindow(SW_HIDE);
index a89ca45..f3b14f4 100644 (file)
@@ -164,6 +164,11 @@ namespace nlite{
                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);
index ce80038..a6a1014 100644 (file)
@@ -614,6 +614,24 @@ namespace nlite{
        }
 
 
+
+       LRESULT CCommentView::OnClickChatNo(UINT uMsg,WPARAM wParam,LPARAM lParam){
+               
+               
+               ::SendMessage(::GetAncestor(*this,GA_ROOT),uMsg,wParam,lParam);
+               wincheck(GetLastError());
+               return 0;
+       }
+               
+
+       LRESULT CCommentView::OnClickUserName(UINT uMsg,WPARAM wParam,LPARAM lParam){
+
+
+               ::SendMessage(::GetAncestor(*this,GA_ROOT),uMsg,wParam,lParam);
+
+               return 0;
+       }
+
        LRESULT CCommentView::OnEraseBkgnd(HDC wParam){
 
                return TRUE;
@@ -1397,15 +1415,24 @@ end:
 
 
 
-
+               CCommentList::iterator ite;
                this->SetFocus();
                if(point.x > (INT_PTR)self.GetColumnHolSizeSum()) goto end;
 
                
                if(self.commentlist.empty() == TRUE)goto end;
                
-               self.commentlist.SetCurSel(CalcClickLine(point.y));
+               ite = CalcClickLine(point.y);
+               self.commentlist.SetCurSel(ite);
                
+               if(this->IsOnNoOrUserName(CCommentView::NO,point) == TRUE){
+
+                       ::SendMessage(self,UM_CLICK_CHATNO,(WPARAM)&(*ite),(LPARAM)self.m_hWnd);
+
+               } else if(this->IsOnNoOrUserName(CCommentView::USERNAME,point) == TRUE){
+
+                       ::SendMessage(self,UM_CLICK_USERNAME,(WPARAM)&(*ite),(LPARAM)self.m_hWnd);
+               }
 
 
                
index 48720a8..4d60a70 100644 (file)
@@ -359,7 +359,6 @@ namespace nlite{
                CommentViewProperty viewproperty;                       //\95\\8e¦\83v\83\8d\83p\83e\83B
                HFONT hHeaderFontNew;                                           //\83w\83b\83_\81[\83t\83H\83\93\83g
                CNicoVideoAuth &refAuth;                                        //\83j\83R\83j\83R\90\95ú\91\97\94F\8fØ\83I\83u\83W\83F\83N\83g\8eQ\8fÆ
-
                CChatChildCtrlsList chatChildCtrlsList;
 
                
@@ -406,6 +405,8 @@ namespace nlite{
                        MSG_WM_SIZE(OnSize)
                        MSG_WM_HSCROLL(OnHScroll)
                        MSG_WM_VSCROLL(OnVScroll)
+                       MESSAGE_HANDLER_EX(UM_CLICK_CHATNO,OnClickChatNo)
+                       MESSAGE_HANDLER_EX(UM_CLICK_USERNAME,OnClickUserName)
                        MSG_WM_ERASEBKGND(OnEraseBkgnd)
                        NOTIFY_CODE_HANDLER_EX(HDN_ENDTRACK   ,OnHeaderEndTrack)
                        NOTIFY_CODE_HANDLER_EX(HDN_ENDDRAG  ,OnHeaderEndDrag)
@@ -480,6 +481,17 @@ namespace nlite{
 
                
                
+               ///
+               ///\83r\83\85\81[\83A\82É\95\\8e¦\82³\82ê\82Ä\82¢\82é\83R\83\81\94Ô\82ª\83N\83\8a\83b\83N\82³\82ê\82½\8e\9e\82Ì\8f\88\97\9d
+               ///
+               LRESULT OnClickChatNo(UINT uMsg,WPARAM wParam,LPARAM lParam);
+               
+
+               ///
+               ///\83r\83\85\81[\83A\82É\95\\8e¦\82³\82ê\82Ä\82¢\82é\83\86\81[\83U\96¼\82ª\83N\83\8a\83b\83N\82³\82ê\82½\8e\9e\82Ì\8f\88\97\9d
+               ///
+               LRESULT OnClickUserName(UINT uMsg,WPARAM wParam,LPARAM lParam);
+
 
                ///
                ///\94w\8ci\93h\82è\82Â\82Ô\82µ\8f\88\97\9d
index 17596c3..ff13f7b 100644 (file)
@@ -409,7 +409,23 @@ LRESULT CNliteMainFrame::OnRbnHeightChange(INT_PTR wParam,LPNMHDR lParam,BOOL &b
 
        return 0;
 }
+LRESULT CNliteMainFrame::OnClickChatNo(UINT uMsg,WPARAM wParam,LPARAM lParam){
 
+       auto &chatData = *(CChatData*)wParam;
+       CString setString;
+       setString.Format(TEXT(">>%d "),chatData.no);
+
+       this->commentWriteWindow.SetText(setString);
+
+       return 0;
+
+}
+
+LRESULT CNliteMainFrame::OnClickUserName(UINT uMsg,WPARAM wParam,LPARAM lParam){
+
+
+       return 0;
+}
 
 
 NLIB_RESULT CNliteMainFrame::LiveCallBack(NICOLIVE_EVENT eventType,NicoLiveStream_P pNicoLiveStream,LPVOID option,NICOLIVE_PARAM param1,NICOLIVE_PARAM param2){
index 901166b..56fd5ce 100644 (file)
@@ -224,6 +224,8 @@ namespace nlite{
                        MESSAGE_HANDLER(WM_SIZE,OnSize)
                        MSG_WM_SIZING(OnSizing)
                        MESSAGE_HANDLER(WM_SETCURSOR,OnSetCursor)
+                       MESSAGE_HANDLER_EX(UM_CLICK_CHATNO,OnClickChatNo)
+                       MESSAGE_HANDLER_EX(UM_CLICK_USERNAME,OnClickUserName)
                        COMMAND_ID_HANDLER_EX(IDM_EXIT, OnMenuExit)
                        COMMAND_ID_HANDLER_EX(IDM_ABOUT,OnMenuAbount)
                        COMMAND_ID_HANDLER_EX(IDM_COOKIE,OnCookie)
@@ -268,7 +270,18 @@ namespace nlite{
                ///
                LRESULT OnRbnHeightChange(INT_PTR wParam,LPNMHDR lParam,BOOL &bHandled);
                
+               ///
+               ///\83r\83\85\81[\83A\82É\95\\8e¦\82³\82ê\82Ä\82¢\82é\83R\83\81\94Ô\82ª\83N\83\8a\83b\83N\82³\82ê\82½\8e\9e\82Ì\8f\88\97\9d
+               ///
+               LRESULT OnClickChatNo(UINT uMsg,WPARAM wParam,LPARAM lParam);
                
+
+               ///
+               ///\83r\83\85\81[\83A\82É\95\\8e¦\82³\82ê\82Ä\82¢\82é\83\86\81[\83U\96¼\82ª\83N\83\8a\83b\83N\82³\82ê\82½\8e\9e\82Ì\8f\88\97\9d
+               ///
+               LRESULT OnClickUserName(UINT uMsg,WPARAM wParam,LPARAM lParam);
+
+
                ///
                ///\83T\83C\83Y\95Ï\8dX\92\86\8f\88\97\9d
                ///