i've noticed that copying of comments in the commentlist
is not working correctly, don't know why but if it has copied
something, it might not be the correct column (of the comment)
this is my fix, though since i don't have VS.net installed,
someone will have to check it (but it's suppose to be ok)
Quote
BOOL CCommentListCtrl::OnCommand(WPARAM wParam, LPARAM lParam)
{
switch (wParam)
{
// Avi3k: fix code
case MP_COPYSELECTED:
{
const SComment* pComment = (SComment*)GetItemData(iSel);
if (pComment)
theApp.CopyTextToClipboard(pComment->m_strComment);
return TRUE;
}
// end Avi3k: fix code
}
}
...
and if someone wants to add support for copying multiple comments:
(fixed thanx to Wiz)
Quote
BOOL CCommentListCtrl::OnCommand(WPARAM wParam, LPARAM lParam)
{
switch (wParam)
{
// Avi3k: fix & improve code
case MP_COPYSELECTED:
{
CString strCmts = _T("");
POSITION pos = GetFirstSelectedItemPosition();
while (pos)
{
iSel = GetNextSelectedItem(pos);
const SComment* pComment = (iSel != -1) ? (SComment*)GetItemData(iSel) : NULL;
if (pComment)
strCmts += pComment->m_strComment + _T("\n");
}
theApp.CopyTextToClipboard(strCmts);
return TRUE;
}
// end Avi3k: fix & improve code
}
}
...
Regards,
Avi3k
This post has been edited by Avi-3k: 04 October 2006 - 03:40 PM