return (LPCTSTR) toolTipString;
}
-// use this when we want to copy from the wholeText
-// the standard Copy function works with the windowText
+/**
+ * @brief retrieve text from the wholeText
+ *
+ * @note The standard Copy function works with the (compacted) windowText
+ */
void CFilepathEdit::CustomCopy(int iBegin, int iEnd /*=-1*/)
{
if (iEnd == -1)
return;
// insert text into clipboard
- HGLOBAL hData = GlobalAlloc (GMEM_MOVEABLE | GMEM_DDESHARE, iEnd-iBegin + 1);
+ HGLOBAL hData = GlobalAlloc (GMEM_MOVEABLE | GMEM_DDESHARE, (iEnd-iBegin + 1)*sizeof(TCHAR));
if (hData == NULL)
return;
LPTSTR pszData = (LPTSTR)::GlobalLock (hData);
}
break;
case ID_EDITOR_COPY_PATH:
+ // pass the heading "*" for modified files
+ if (wholeText.GetAt(0) == '*')
+ iBegin = 2;
+ else
iBegin = 0;
break;
}
}
}
-
-
-
2003-10-14 Laoran
+ BUG: correcting memory allocation for Unicode build in FilepathEdit.cpp
+ editlib: FilepathEdit.cpp
BUG: [ 822844 ] Drag & Drop crashes on Unicode build (correcting memory allocation)
editlib: ccrystaltextview.cpp