Lock();
+ m_listBox.SetRedraw(FALSE);
commentlist.OnChatReceve(chat,count);
m_listBox.AddString((LPCTSTR)&commentlist.back());
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();
}
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;
}
//\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
}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:
CPen colLinePen;
HFONT hHeaderFontNew;
SCROLLINFO hScrollInfo;
-
+// CSubCommentListBox m_subListBox;