CTRL key combination ASCII code
^z on behalf of CTRL + Z
ASCII value control character ASCII value control character ASCII value control character ASCII value control character
0 (XX) NULL 8 (^h) ^p (+) ^x
1 (^a) 9 (^i) ^q () ^y
2 (^b) ^j (0A) ^r (1A) ^z
3 (^c) ^k (0B) ^s (1B) ^[
4 (^d) ^l (0C) ^t (1C) ^\
5 (^e) (0D) ^m (^u) (1D) ^]
6 (^f) ^n (0E) ^v (1E) ^^
7 (^g) ^o (0F) ^w (1F) ^_
Limit the input content:
Response message OnChar
void Cenglishedit::onchar (UINT NChar, uint nrepcnt, uint nflags) { //TODO: Add the message handler code here and/or call the default value if (
(Ch >= ' 0 ' && ch <= ' 9 ') | |
(Ch >= ' a ' && ch <= ' F ') | |
(Ch >= ' A ' && ch <= ' F ') | |
ch = = Vk_back | | ch = = Vk_delete| |
NChar = = 01 | | NChar = = 03 | | CTRL + A C
NChar = = 24 | | NChar = =//ctrl + x v
) { Cedit::onchar (NChar, nrepcnt, nflags); } else { return; }}
The red part of the code is the function of copying and pasting all-selected cut;
In practice, it is found that rewriting pretranslatemessage () can not realize the function of copy and paste cutting, and it is possible to implement the function of selecting all functions according to the top CTRL key combination ASCII code.
"Go" MFC custom edit limit input hexadecimal content response copy paste full Select Cut function