No copy paste support in editbox [modified]
-
I have a MFC application in which I need to create a temporary editbox on the view. But that editbox does not accept ctrl+C & ctrl+V commands from keyboard. It should support copy & paste by default. I create it with WS_CHILD | WS_VISIBLE styles. I have entered the Copy paste shortcuts into accelerator table for use in the view. Does anyone know the reason why it does not paste in editbox? Instead it pastes in the view. How to correct it? TIA.
-
I have a MFC application in which I need to create a temporary editbox on the view. But that editbox does not accept ctrl+C & ctrl+V commands from keyboard. It should support copy & paste by default. I create it with WS_CHILD | WS_VISIBLE styles. I have entered the Copy paste shortcuts into accelerator table for use in the view. Does anyone know the reason why it does not paste in editbox? Instead it pastes in the view. How to correct it? TIA.
This is an excellent article explaining all the nuts and bolts of MFC's command routing. http://www.microsoft.com/msj/0795/dilascia/dilascia.aspx[^] There will be an exam to make sure you've read it before you're allowed to have any more biscuits. Ever. Once you've read it, the following will make sense: I think you need to add an OnCmdMsg handler to your View class, to give the temporary edit box a quick bite at the cherry. Alternatively, use the CMyView::OnEditCopy handler to send a WM_COPY message to your edit box, if it exists. (and same for paste, cut...) Good luck, Iain.
In the process of moving to Sweden for love (awwww). If you're in Scandinavia and want an MVP on the payroll (or happy with a remote worker), give me a job!