void CDlgRecycleBin::Preview(CString szFile){ POSITION pos; CString szXML, szTemp; CRect rc1, rc2; if (theApp.m_bSortRecycleBinDescending) pos = m_pNote.GetTailPosition (); else pos = m_pNote.GetHeadPosition (); POSITION delpos; int rgIndex[BUFFERSIZE]; m_pTitle.GetSelItems (BUFFERSIZE, rgIndex); int iRow = 0; int iCount = 0;
void CDlgRecycleBin::DeleteMarkedNotes (){ POSITION pos; if (theApp.m_bSortRecycleBinDescending) pos = m_pNote.GetTailPosition (); else pos = m_pNote.GetHeadPosition (); POSITION delpos; int rgIndex[BUFFERSIZE]; m_pTitle.GetSelItems (BUFFERSIZE, rgIndex); int iRow = 0; int iCount = 0; while (pos) { delpos = pos; tagNote note; if (theApp.m_bSortRecycleBinDescending) note = m_pNote.GetPrev (pos); else note = m_pNote.GetNext (pos); if (iRow == rgIndex[iCount]) { m_pNote.RemoveAt (delpos); iCount++; } iRow++; }}
void CDlgRecycleBin::PreviewNotes (){ POSITION pos; if (theApp.m_bSortRecycleBinDescending) pos = m_pNote.GetTailPosition (); else pos = m_pNote.GetHeadPosition (); POSITION delpos; int rgIndex[BUFFERSIZE]; m_pTitle.GetSelItems (BUFFERSIZE, rgIndex); int iRow = 0; int iCount = 0; while (pos) { delpos = pos; tagNote note; if (theApp.m_bSortRecycleBinDescending) IDC_Preview = m_pNote.GetPrev (pos); else note = m_pNote.GetNext (pos); if (iRow == rgIndex[iCount]) { m_pNote.RemoveAt (delpos); iCount++; } iRow++; }}
This is driving me nuts.. I cannot understand this shit and I'm getting restless, almost 3am.. excuse the language would something like this seem adequate? Code: [Select]void CDlgRecycleBin::Preview(CString szFile){ POSITION pos; CString szXML, szTemp; CRect rc1, rc2; if (theApp.m_bSortRecycleBinDescending) pos = m_pNote.GetTailPosition (); else pos = m_pNote.GetHeadPosition (); POSITION delpos; int rgIndex[BUFFERSIZE]; m_pTitle.GetSelItems (BUFFERSIZE, rgIndex); int iRow = 0; int iCount = 0;