Multiple selection in CListCtrl??
-
Hello, i need to copy multiple selection to clipboard from my CListCtrl. Now is that ctrl+c copy only the first selected item from my CListCtrl, but not the rest! How to catch ctrl+c key's??? thanks for any help! Arrin!
You can derive your own CMyListCtrl from CListCtrl and handle the
WM_KEYDOWN
orWM_CHAR
messages. Then loop over the selected rows and accumulate them in a CString variable, appending CR/LF to each row (maybe also putting a TAB between columns). Finally, copy the CString variable to the clipboard.Best wishes, Hans
-
You can derive your own CMyListCtrl from CListCtrl and handle the
WM_KEYDOWN
orWM_CHAR
messages. Then loop over the selected rows and accumulate them in a CString variable, appending CR/LF to each row (maybe also putting a TAB between columns). Finally, copy the CString variable to the clipboard.Best wishes, Hans