-
Focus lost...
I have a list view control with some text in it. What I would like to do is by pressing a button it will copy the marked line using:
Code:
SendMessage(GetFocus(), WM_COPY, 0, 0);
But when I press the copy button, the list view control loses it's focus... what can I do?
Thank you.
-
You can copy the string to a buffer when the listview loses focus, and reset the buffer when it's read.
-
You mean detect a focus on the list-view, and copy it's value to a buffer...?
-
Looking at the WM_COPY and TreeView control reference, I don't see anthing that indicates that TreeView controls support WM_COPY.
You will probably have to perform your own clipboard operations.
gg
-
codeplus, what do you think about idea of copying the marked line from the list-view to a buffer, and then copy it to the cliip board.
I've searched the msdn, and I was unable to find a way to get the marked (focused) line, and copy that bauffer to the clip board.
It will be great if you could point me to the right direction, it looks like you know msdn pretty well.
thanks.
-
-