|
-
September 8th, 1999, 02:55 PM
#1
Cut and Copy in EDIT Control
I'm using MSVC 5.0. When i build a new project with a FormView and put a edit control to the form, i can't use the cut (Ctrl+X), copy (Ctrl+C) and paste (Ctrl+V) commands. What's the problem
-
September 8th, 1999, 08:34 PM
#2
Re: Cut and Copy in EDIT Control
If you can do it by right-mouse click there is nothing wrong.
In this case you just need to create accelerator keys. Handle this case in your program.
Good luck!
Dmitriy, MCSE
-
September 9th, 1999, 04:16 AM
#3
Re: Cut and Copy in EDIT Control
OK, I can do it by right mouse click.
But how can I handle the accelerator keys?
And why put MS this nice EDIT command into the menu and do not support handling of this commands in a standard edit control?
Thanx for your answer
sts
-
September 9th, 1999, 08:40 AM
#4
Re: Cut and Copy in EDIT Control
Open your resource view in your workspace. I think you nave there Accelerator resource, if no insert it and create ID_EDIT_PASTE with keys control/C.
Goto ClassWizard.
Select your CMainFrame class in right combobox, or CYourDialog class if you in dialog-Based app.
Select on the left side ID_EDIT_PASTE, select COMMAND in messages. Then Add function.
For example you have OnEditPaste function.
In body of this function:
void CMainFrame::OnEditPaste()
{
CCommentsFrame* pWnd=(CCommentsFrame*)this->GetActiveWindow();
pWnd->m_pedtView->SendMessage(WM_PASTE);
}
//CCommentsFrame - it is frame for my editview
Good luck!
Dmitriy, MCSE
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|