
Edit control in a WTL CTreeViewCtrlEx problem
Edit Control Cut, Copy, Paste, and Clear Operations
Does anyone know why my edit control does not respond to a ctrl+c, ctrl+v,
or ctrl+p during Tree View Label Editing? The edit control responds to
Enter, characters, and right click context menu commands. The only thing
that I do to the edit control is limit the number of characters.
Using Spy++ with Clipboard, Keyboard, and Edit Fields checked, if I left
click on an Item that has the focus I get:
<00001> 002B02DA S EM_SETLIMITTEXT cbMax:259
<00002> 002B02DA R EM_SETLIMITTEXT
<00003> 002B02DA S EM_SETSEL nStart:0 nEnd:0
<00004> 002B02DA R EM_SETSEL
<00005> 002B02DA S ..EM_SETLIMITTEXT cbMax:127
<00006> 002B02DA R ..EM_SETLIMITTEXT
<00007> 002B02DA S EM_GETRECT lprc:0012F2FC
<00008> 002B02DA R EM_GETRECT lprc:0012F2FC (5,2)-(16379,15)
<00009> 002B02DA S EM_SETSEL nStart:-1 nEnd:-1 (clear selection)
<00010> 002B02DA R EM_SETSEL
<00011> 002B02DA S EM_SETSEL nStart:0 nEnd:-1 (select all text)
<00012> 002B02DA R EM_SETSEL
<00013> 002B02DA P WM_KEYDOWN nVirtKey:VK_CONTROL cRepeat:1 ScanCode:1D
fExtended:0 fAltDown:0 fRepeat:0 fUp:0
<00014> 002B02DA P WM_KEYDOWN nVirtKey:'C' cRepeat:1 ScanCode:2E fExtended:0
fAltDown:0 fRepeat:0 fUp:0
<00015> 002B02DA P WM_KEYUP nVirtKey:'C' cRepeat:1 ScanCode:2E fExtended:0
fAltDown:0 fRepeat:1 fUp:1
<00016> 002B02DA P WM_KEYUP nVirtKey:VK_CONTROL cRepeat:1 ScanCode:1D
fExtended:0 fAltDown:0 fRepeat:1 fUp:1
I am using an tree control as follows,
class CTreeScrollView : public CWindowImpl<CTreeScrollView,
CTreeViewCtrlEx>,
public CScrollImpl<CTreeScrollView>
If you look at the MSDN project CmnCtrl1.dsw, you will see the
functionality that I am looking for, except that sample does not respond to
an Enter key properly.
Using Spy++ on this app I get three extra messages.
<00011> 00090280 P WM_KEYDOWN nVirtKey:VK_CONTROL cRepeat:1 ScanCode:1D
fExtended:0 fAltDown:0 fRepeat:0 fUp:0
<00012> 00090280 P WM_KEYDOWN nVirtKey:'C' cRepeat:1 ScanCode:2E fExtended:0
fAltDown:0 fRepeat:0 fUp:0
<00013> 00090280 P WM_CHAR chCharCode:' ' (3) cRepeat:1 ScanCode:2E
fExtended:0 fAltDown:0 fRepeat:0 fUp:0
<00014> 00090280 S WM_COPY
<00015> 00090280 R WM_COPY
<00016> 00090280 P WM_KEYUP nVirtKey:'C' cRepeat:1 ScanCode:2E fExtended:0
fAltDown:0 fRepeat:1 fUp:1
<00017> 00090280 P WM_KEYUP nVirtKey:VK_CONTROL cRepeat:1 ScanCode:1D
fExtended:0 fAltDown:0 fRepeat:1 fUp:1
I wasn't sure wether to post here or somewhere else. ?