OSDN Git Service

2012/01/10 16:53:13
authorqwerty2501 <riot313@gmail.com>
Tue, 10 Jan 2012 07:53:13 +0000 (16:53 +0900)
committerqwerty2501 <riot313@gmail.com>
Tue, 10 Jan 2012 07:53:13 +0000 (16:53 +0900)
nlite.suo
nlite/nlite_commentview.cpp
nlite/nlite_commentview.h

index ee329b0..ef9bbd0 100644 (file)
Binary files a/nlite.suo and b/nlite.suo differ
index eaab104..1be0df7 100644 (file)
@@ -213,6 +213,7 @@ VOID CCommentView::OnChatReceve(NicoLiveChat_P chat,UINT_PTR count){
 
        
        Lock();
+       m_listBox.SetRedraw(FALSE);
        commentlist.OnChatReceve(chat,count);
        m_listBox.AddString((LPCTSTR)&commentlist.back());
 
@@ -221,8 +222,9 @@ VOID CCommentView::OnChatReceve(NicoLiveChat_P chat,UINT_PTR count){
        m_listBox.GetScrollInfo(SB_VERT,&scrollInfo);
        scrollInfo.nPos++;
        
+       
        if(scrollInfo.nPos + (int)scrollInfo.nPage >= scrollInfo.nMax == TRUE){
-               m_listBox.SendMessageW(WM_VSCROLL,SB_BOTTOM,0); 
+               m_listBox.SendMessageW(WM_VSCROLL,MAKEWORD(SB_BOTTOM,0),0);     
        }
        Unlock();
 }
@@ -602,10 +604,12 @@ VOID CCommentView::OnHScroll(INT_PTR loWParam,SHORT hiWParam,HWND lParam){
 
 LRESULT CCommentView::OnCreate(LPCREATESTRUCT lpcs){
        m_header.Create(m_hWnd,0,WC_HEADER,WS_CHILD | WS_VISIBLE | WS_CLIPCHILDREN   | HDS_BUTTONS | HDS_HOTTRACK |HDS_DRAGDROP | HDS_FULLDRAG  ,0,commentViewConstant::HEADER_ID);
-       m_listBox.Create(m_hWnd,0,WC_LISTBOX,WS_CHILD | WS_VISIBLE | WS_VSCROLL | WS_CLIPCHILDREN   | LBS_OWNERDRAWVARIABLE | LBS_NOTIFY | LBS_NOREDRAW  ,0,commentViewConstant::LISTBOX_ID);
+       m_listBox.Create(m_hWnd,0,WC_LISTBOX,WS_CHILD | WS_VISIBLE | WS_VSCROLL | WS_CLIPCHILDREN   | LBS_OWNERDRAWVARIABLE | LBS_NOTIFY | LBS_NOREDRAW 0,commentViewConstant::LISTBOX_ID);
        m_listBox.SetFont(AtlGetDefaultGuiFont());
-               
-                       
+       /*
+       m_subListBox.SubclassWindow(m_listBox);
+       m_subListBox.CreateMemoryDC();
+       */              
        return 0;
 }
 
@@ -663,3 +667,26 @@ VOID CCommentView::DecisionHorzSize(){
 //\83R\83\81\83\93\83g\83r\83\85\81[\83N\83\89\83X\93à\95\94\83\8a\83X\83g\83N\83\89\83X
 ////////////////////////////////////////////////////////////////////
 
+
+VOID CCommentView::CSubCommentListBox::OnPaint(HDC hdc){
+
+       PAINTSTRUCT ps;
+       this->BeginPaint(&ps);
+
+
+       this->EndPaint(&ps);
+
+       return;
+}
+
+
+
+VOID CCommentView::CSubCommentListBox::CreateMemoryDC(){
+       HDC hdc = this->GetDC();
+       m_MemoryDC.CreateCompatibleDC(hdc);
+       m_Bitmap.CreateCompatibleBitmap(m_MemoryDC,300,200);
+       
+       ReleaseDC(hdc);
+       return;
+}
+                       
\ No newline at end of file
index 4645391..9f78e9f 100644 (file)
@@ -29,6 +29,32 @@ namespace nlite{
                }HEADERSINFO,*LPHEADERSINFO;
 
                
+               
+
+               class CSubCommentListBox:public CDoubleBufferWindowImpl<CSubCommentListBox>{
+
+                       //\83v\83\89\83C\83x\81[\83g\83\81\83\93\83o
+               private:
+                       CDC m_MemoryDC;
+                       CBitmap m_Bitmap;
+                       LPDWORD lpPixel;
+
+               public:
+
+
+                       BEGIN_MSG_MAP_EX(CSubCommentListBox)
+                               MSG_WM_PAINT(OnPaint)
+                               CHAIN_MSG_MAP(CDoubleBufferWindowImpl<CSubCommentListBox>)
+                       END_MSG_MAP()
+
+                       VOID CreateMemoryDC();
+                       
+               private:
+                       VOID OnPaint(HDC hdc);
+                       
+                       
+
+               };
 
                //\83\81\83\93\83o\90é\8c¾
        private:
@@ -46,7 +72,7 @@ namespace nlite{
                CPen colLinePen;
                HFONT hHeaderFontNew;
                SCROLLINFO hScrollInfo;
-               
+//             CSubCommentListBox m_subListBox;