VOID CCommentList::OnConnect(){
OnDestroy();
+ shortcut = chatList.begin();
}
CCommentList::reference CCommentList::back(){
return chatList.back();
}
+///
+///\83V\83\87\81[\83g\83J\83b\83g\83C\83e\83\8c\81[\83^\82ð\8eæ\93¾
+///
+CCommentList::iterator CCommentList::GetShortCut(){
+
+ return shortcut;
+}
+
+///
+///\83V\83\87\81[\83g\83J\83b\83g\82ð\90Ý\92è
+///
+BOOL CCommentList::SetShortCut(UINT_PTR no){
+
+ dumpln(TEXT("no%d"),no);
+ if(chatList.size() <= no)return FALSE;
+ dumpln(TEXT("no%dtrue"),no);
+ shortcut = chatList.begin();
+ std::advance(shortcut,no);
+
+ return TRUE;
+
+}
+
+
+
VOID CListenerList::BkColorCollect(CListenerColorCollector &target){
iterator end = m_listenerList.end();
private:
typedef std::list<CChatData> ChatList;
+ public:
+ typedef ChatList::iterator iterator;
+ typedef ChatList::reference reference;
+ typedef ChatList::reverse_iterator reverse_iterator;
+ private:
ChatList chatList;
-
+ iterator shortcut;
//\8c^\92è\8b`
- public:
- typedef ChatList::iterator iterator;
- typedef ChatList::reference reference;
- typedef ChatList::reverse_iterator reverse_iterator;
+
public:
///
reference back();
+ ///
+ ///\83V\83\87\81[\83g\83J\83b\83g\83C\83e\83\8c\81[\83^\82ð\8eæ\93¾
+ ///
+ iterator GetShortCut();
+ ///
+ ///\83V\83\87\81[\83g\83J\83b\83g\82ð\90Ý\92è
+ ///
+ BOOL SetShortCut(UINT_PTR no);
};
auto ctrlsBegin = m_list.begin();
auto ctrlsEnd = m_list.end();
- INT_PTR scrollPos = m_hMaster.GetScrollPos(SB_VERT);
- if(!(scrollPos == -1 || static_cast<INT_PTR>(m_hMaster.commentlist.Size()) <= scrollPos)){
+
+ if(m_hMaster.commentlist.Size() > 0){
- auto chatDataBigin = m_hMaster.commentlist.begin();
- dumpln(TEXT("scrollPos%d"),scrollPos);
- std::advance(chatDataBigin,scrollPos);
+ auto chatDataBigin = m_hMaster.commentlist.GetShortCut();
+
+
for(; chatDataBigin != m_hMaster.commentlist.end() && heightSum < listRect.bottom;++ctrlsBegin,dumpln(TEXT("++ctrlsBegin")),++chatDataBigin,dumpln(TEXT("++chatDataBigin"))){
tmpRect = headerRect;
vScrollInfo.nPos += dy;
// viewStartHeight = vScrollInfo.nPos;
this->SetScrollPos(SB_VERT,vScrollInfo.nPos);
+ this->commentlist.SetShortCut(this->GetScrollPos(SB_VERT));
//this->SetScrollInfo(SB_VERT,&vScrollInfo);
this->UpdateWindow();
if(TryEnterCriticalSection(&m_commentListWindow.m_sec) == TRUE){
BOOL selectFlag = FALSE;
CCommentList::iterator selectData;
RECT selectRect = {0};
- UINT_PTR viewStartHeight = self.GetScrollPos(SB_VERT);
+
- if(commentList.Size() > (UINT_PTR)viewStartHeight){
+ if(commentList.Size() > 0){
listRect = windowRect;
listRect.right = self.GetColumnHolSizeSum();
- CCommentList::iterator chatData = commentList.begin();
- std::advance(chatData,viewStartHeight);
+ CCommentList::iterator chatData = commentList.GetShortCut();
+ //std::advance(chatData,viewStartHeight);
LRESULT CCommentListWindow::OnCalcSellSize(LPNMHDR lParam){
auto pReqResize = reinterpret_cast <REQRESIZE *>(lParam);
- dumpln(TEXT("calcsell"));
::SetWindowPos(pReqResize->nmhdr.hwndFrom,NULL,0,0,pReqResize->rc.right - pReqResize->rc.left,pReqResize->rc.bottom - pReqResize->rc.top,SWP_NOZORDER | SWP_NOMOVE | SWP_HIDEWINDOW);
//calcRc = pReqResize->rc;
return 0;