-
April 6th, 2001, 09:47 AM
#1
Why don't edit boxes support CTRL-X, CTRL-C, CTRL-V?
I like to use Ctrl keys for cut, copy, and paste. Why don't edit boxes on forms support these functions?
-
April 6th, 2001, 03:57 PM
#2
Re: Why don't edit boxes support CTRL-X, CTRL-C, CTRL-V?
They support accelerators as you can see for example in a dialog box.
All CTRL+X,V,C, or the SHIFT-DELETE, SHIFT-INSERT, CTRL-INSERT, CTRL-DELETE will work as usual.
The difference is that dialog does not have Edit menu therefore for edit operations are processed "normal" way using windows acceleration processing.
Class wizard adds Edit menu to your application but there is no handlers for any edit operation therefore menu is disabled (grayed). Furthermore application menu gets acceleration keys, not edit controls.
It is not difficult to fix it.
Using class wizard insert both command handlers and update command handlers for edit command you want to support.
In update command handlers enable command only if any edit control has a focus and disable other vice.
In command handlers check, which edit control has focus and call appropriate function: cut, copy and paste.
This will allow accelerators work properly.
If you have problem let me know; I can send you my sample.
I don't do it for ratings. However, rating tells me how my solution worked and that is important.
Good luck in your journey in a C++ land.
There are only 10 types of people in the world:
Those who understand binary and those who do not.
-
August 21st, 2013, 07:30 AM
#3
Re: Why don't edit boxes support CTRL-X, CTRL-C, CTRL-V?
HI I am facing same problem . Can u please post sample program
for how to enable ctrl v and ctrl c for textbox in VC++
Thank U
-
August 21st, 2013, 08:16 AM
#4
Re: Why don't edit boxes support CTRL-X, CTRL-C, CTRL-V?
Victor Nijegorodov
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
|