OSDN Git Service

コメント書き込み時のマウス砂時計処理を実装
authorunknown <qwerty2501@users.sourceforge.jp>
Tue, 14 Feb 2012 00:42:33 +0000 (09:42 +0900)
committerunknown <qwerty2501@users.sourceforge.jp>
Tue, 14 Feb 2012 00:42:33 +0000 (09:42 +0900)
nlite.suo
nlite/nlite_commentWrite.cpp
nlite/nlite_commentWrite.h
nlite/nlite_mainframe.cpp

index 4e1fe01..8d82c60 100644 (file)
Binary files a/nlite.suo and b/nlite.suo differ
index 2752b0c..9843313 100644 (file)
@@ -127,6 +127,12 @@ streamTime(0)
 {}
 
 
+BOOL CCommentWriteWindow::IsWrighthing(){
+
+       return this->commentSubEdit.untilConnectingFlag;
+
+}
+
 UINT_PTR CCommentWriteWindow::GetHeight(){
 
        return commentWriteHeight + infoDispHeight - COMMENTWRITEWINDOW_SEPARATEFSIZE.top;
@@ -277,6 +283,7 @@ VOID CCommentWriteWindow::OnPaint(HDC hdc){
 
 VOID CSubChatEdit::EnterChatBox(LPVOID userData){
 
+
        auto owner = ((CSubChatEdit*)userData)->self;
        auto &self = *((CSubChatEdit*)userData);
        CCommentMaker commentMaker;
@@ -359,21 +366,15 @@ end:
 
 
 
-       if((owner.nicoLiveStream.IsOwner())){
-
-               Sleep(1000);
-
-       }else {
-               Sleep(3000);
-       }
-       ((CSubChatEdit*)userData)->AgreeEnter();
+       
+       self.AgreeEnter();
 
        _endthread();
        return;
 }
 
 BOOL CCommentWriteWindow::SendChat(){
-
+       this->commentSubEdit.untilConnectingFlag = TRUE;
        this->commentSubEdit.SetReadOnly(TRUE);
        _beginthread(CSubChatEdit::EnterChatBox,0,&this->commentSubEdit);
        
@@ -730,7 +731,7 @@ void CSubChatEdit::OnKeyDown(TCHAR wParam, UINT upLParam,UINT loLParam){
                cs.Lock();
                                        
                if(untilConnectingFlag == FALSE){
-                       untilConnectingFlag = TRUE;
+                       
                        
 
                        self.SendChat();
index 2bb518a..f50c5a0 100644 (file)
@@ -60,7 +60,7 @@ namespace nlite{
 
        class CCommentWriteWindow;
        class CSubChatEdit:public CWindowImpl<CSubChatEdit,CEdit>{
-
+               friend CCommentWriteWindow;
 
 
        private:
@@ -157,6 +157,12 @@ namespace nlite{
                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();
index 11ecdbb..187fad2 100644 (file)
@@ -546,12 +546,20 @@ LRESULT CNliteMainFrame::OnSetCursor(LRESULT msg,WPARAM wParam,LPARAM lParam,BOO
        
        BOOL rslt = FALSE;
        
-       if(this->subLiveNoComboBox.untilConnectingFlag == TRUE){
-               ::SetCursor(::LoadCursorW(NULL,IDC_WAIT));
+       if(this->subLiveNoComboBox.untilConnectingFlag == TRUE || this->commentWriteWindow.IsWrighthing() == TRUE){
+               
+               if(this->subLiveNoComboBox.untilConnectingFlag == TRUE){
+                       ::SetCursor(::LoadCursorW(NULL,IDC_WAIT));
+               } else if(this->commentWriteWindow.IsWrighthing() == TRUE){
+                       ::SetCursor(::LoadCursorW(NULL,IDC_APPSTARTING));
+               }
                bHandled = TRUE;
                rslt = TRUE;
-       } else {
+       
 
+
+
+       } else {
                bHandled = FALSE;
        }