OSDN Git Service

リスナー設定ウィンドウの色変更ボタン通過時に指カーソルになるように変更
authorqwerty2501 <riot313@gmail.com>
Sat, 11 Feb 2012 04:13:43 +0000 (13:13 +0900)
committerqwerty2501 <riot313@gmail.com>
Sat, 11 Feb 2012 04:13:43 +0000 (13:13 +0900)
リスナー設定変更時にUIに更新がかかるように変更

12 files changed:
nlite.suo
nlite/nlite.h
nlite/nlite_chatData.cpp
nlite/nlite_chatData.h
nlite/nlite_commentview.cpp
nlite/nlite_commentview.h
nlite/nlite_common.cpp
nlite/nlite_common.h
nlite/nlite_mainframe.cpp
nlite/nlite_mainframe.h
nlite/nlite_propertyWindow.cpp
nlite/nlite_propertyWindow.h

index c52d4aa..2057d2c 100644 (file)
Binary files a/nlite.suo and b/nlite.suo differ
index 5bb27b5..465f12b 100644 (file)
@@ -20,7 +20,8 @@ namespace nlite{
        enum MESSAGE{
                UM_COMMENTVIEW_SETCTRL = WM_USER + 1,
                UM_CLICK_CHATNO,
-               UM_CLICK_USERNAME
+               UM_CLICK_USERNAME,
+               UM_UPDATEUI,
 
        };
 
index 5cf136b..51ac8af 100644 (file)
@@ -34,7 +34,6 @@ user_id(TEXT("")),
 name(TEXT("")),
 community(TEXT("")),
 bgcolor(INIT_COLOR),
-writePropertyFlag(FALSE),
 time(0),
 onlyCommunityFlag(FALSE),
 nameColor(INIT_COLOR)
@@ -42,20 +41,20 @@ nameColor(INIT_COLOR)
 
 VOID ListenerData::SetNameColor(COLORREF nameColor_in){
        nameColor = nameColor_in;
-       writePropertyFlag = TRUE;
+
        return;
 }
 
 VOID ListenerData::SetBkColor(COLORREF bkColor_in){
        bgcolor = bkColor_in;
-       writePropertyFlag = TRUE;
+
        return;
 }
 
 VOID ListenerData::SetUserName(LPCTSTR name){
 
        this->name = name;
-       this->writePropertyFlag = TRUE;
+
 
 }
 
@@ -398,7 +397,7 @@ BOOL CListenerList::WriteProperty(LPCTSTR fileName){
        auto end = m_listenerList.end();
 
        for(;begin != end;++begin){
-               if(begin->writePropertyFlag == TRUE){
+               if(begin->name.Length() > 0 || begin->nameColor != ListenerData::INIT_COLOR || begin->bgcolor != ListenerData::INIT_COLOR){
                        pWriter->WriteStartElement(NULL,TEXT("user"),NULL);
                        if(begin->name.Length() > 0) NLITE_ATTRIBUTE_WRITE_STR(pWriter,(*begin).name);
                        if(begin->community.Length()> 0) NLITE_ATTRIBUTE_WRITE_STR(pWriter,(*begin).community);
@@ -462,7 +461,6 @@ ReadUserSettingXML::ReadUserSettingXML(CListenerList &in_listenerList):m_listene
 
                        
                        if(_tcstol(listenerBuff.user_id,NULL,10) != 0 || ((difftime(time(NULL),604800)) <listenerBuff.time)){
-                               listenerBuff.writePropertyFlag = TRUE;
                                listenerBuff.user_id.Append(pszData,nLength);
                        }
 
index 6ecfc5f..a61cca0 100644 (file)
@@ -29,7 +29,6 @@ namespace nlite{
                COLORREF bgcolor;                                               //\94w\8ci\90F
                COLORREF nameColor;                                             //\96¼\91O\90F
                time_t time;                                                    //\93o\98^\8e\9e\8aÔ
-               BOOL writePropertyFlag;                                 //\83v\83\8d\83p\83e\83B\8f\91\82«\8d\9e\82Ý\83t\83\89\83O
                BOOL onlyCommunityFlag;
        public:
 
index c5af3e7..16299db 100644 (file)
@@ -345,7 +345,12 @@ namespace nlite{
                return;
        }
 
+       VOID CCommentView::UpDateUI(){
 
+               this->chatChildCtrlsList.ShowCntrls();
+               this->m_commentListWindow.Invalidate();
+               return;
+       }
 
 
        VOID CCommentView::OnConnect(){
@@ -619,16 +624,16 @@ namespace nlite{
                
                
                ::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;
        }
 
@@ -889,6 +894,8 @@ namespace nlite{
        CCommentListWindow::~CCommentListWindow(){
        }
 
+       
+
        VOID CCommentListWindow::OnSetProperty(){
 
                if(IsWindow() == TRUE)this->SetRedraw(FALSE);
index 4d60a70..6f63398 100644 (file)
@@ -206,6 +206,8 @@ namespace nlite{
                ~CCommentListWindow();
 
 
+               
+
                ///
                ///\83v\83\8d\83p\83e\83B\90Ý\92è\8e\9e\82Ì\8f\88\97\9d
                ///
@@ -389,6 +391,10 @@ namespace nlite{
                ///
                ~CCommentView();
 
+               ///
+               ///\83E\83B\83\93\83h\83E\8dX\90V
+               ///
+               VOID UpDateUI();
                
 
                //
index f780541..3d5e1d6 100644 (file)
@@ -211,6 +211,9 @@ public:
        return rslt;
  }
 
+
+
 const CApplicationInfo * appInfo = NULL;
 
-}
\ No newline at end of file
+}
+
index d3e8bef..6f0e202 100644 (file)
@@ -27,6 +27,8 @@ namespace nlite{
        extern CString GetNCVListenerInfoFilePath();
 
 
+
+
        namespace nliteregex{
                typedef std::tr1::basic_regex<TCHAR> tregex;
                namespace text{
index ec67ece..1d1eb0a 100644 (file)
@@ -431,6 +431,15 @@ LRESULT CNliteMainFrame::OnRbnHeightChange(INT_PTR wParam,LPNMHDR lParam,BOOL &b
 
        return 0;
 }
+
+LRESULT CNliteMainFrame::OnUpDateUI(UINT uMsg,WPARAM wParam,LPARAM lParam){
+
+
+       commentView.UpDateUI();
+
+       return 0;
+}
+
 LRESULT CNliteMainFrame::OnClickChatNo(UINT uMsg,WPARAM wParam,LPARAM lParam){
 
        auto &chatData = *(CChatData*)wParam;
index 0cc379a..2db1fbf 100644 (file)
@@ -225,6 +225,7 @@ namespace nlite{
                        MSG_WM_SIZING(OnSizing)
                        MESSAGE_HANDLER(WM_SETCURSOR,OnSetCursor)
                        MESSAGE_HANDLER_EX(UM_CLICK_CHATNO,OnClickChatNo)
+                       MESSAGE_HANDLER_EX(UM_UPDATEUI,OnUpDateUI)
                        MESSAGE_HANDLER_EX(UM_CLICK_USERNAME,OnClickUserName)
                        COMMAND_ID_HANDLER_EX(IDM_EXIT, OnMenuExit)
                        COMMAND_ID_HANDLER_EX(IDM_ABOUT,OnMenuAbount)
@@ -270,6 +271,12 @@ namespace nlite{
                ///
                LRESULT OnRbnHeightChange(INT_PTR wParam,LPNMHDR lParam,BOOL &bHandled);
                
+
+               ///
+               ///\82±\82Ì\83E\83B\83\93\83h\83E\82ÌUI\8dX\90V
+               ///
+               LRESULT OnUpDateUI(UINT uMsg,WPARAM wParam,LPARAM lParam);
+
                ///
                ///\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
                ///
index 447c4fc..88c8398 100644 (file)
@@ -126,6 +126,14 @@ VOID CColorSettingButton::SetColor(COLORREF in_color){
        return;
 }
 
+LRESULT CColorSettingButton::OnSetCursor(HWND wparam,UINT loLparam,UINT hiLparam){
+       
+       ::SetCursor(::LoadCursor(NULL,IDC_HAND));
+
+       return FALSE;
+
+}
+
 VOID CListenerSettingWindow::ShowSettingWindow(ListenerData &listenerData){
 
        this->ShowWindow(SW_HIDE);
@@ -184,8 +192,11 @@ VOID CListenerSettingWindow::OnOK(UINT uNotifyCode, int nID, CWindow wndCtl){
        this->listenerData->SetBkColor( backColorButton.color);
        this->listenerData->SetNameColor( nameColorButton.color);
        
-       ::ShowWindow(::GetAncestor(*this,GA_ROOTOWNER),SW_HIDE);
-       ::ShowWindow(::GetAncestor(*this,GA_ROOTOWNER),SW_SHOW);
+
+
+
+       ::SendMessage(GetParent(),UM_UPDATEUI,(WPARAM)NULL,(LPARAM)NULL);
+
        
        this->ShowWindow(SW_HIDE);
        return;
index b9c92ff..cf811e0 100644 (file)
@@ -56,6 +56,7 @@ namespace nlite{
 
                BEGIN_MSG_MAP(CColorSettingButton)
                        MSG_WM_LBUTTONDOWN(OnLButtonDown)
+                       MSG_WM_SETCURSOR(OnSetCursor)
                END_MSG_MAP()
 
 
@@ -69,6 +70,11 @@ namespace nlite{
                ///
                VOID SetColor(COLORREF in_color);
 
+
+               ///
+               ///\83J\81[\83\\83\8b\95Ï\8dX\8f\88\97\9d
+               ///
+               LRESULT OnSetCursor(HWND wparam,UINT loLparam,UINT hiLparam);
        };
 
        ///