获得汉字的笔画的源码(2)[VC/C++编程]
本文“获得汉字的笔画的源码(2)[VC/C++编程]”是由七道奇为您精心收集,来源于网络转载,文章版权归文章作者所有,本站不对其观点以及内容做任何评价,请读者自行判断,以下是其具体内容:
// 获得汉字的笔画
/*
gb2312_stkcnt.cpp
Retrieve the stroke count of Chinese character.
Support GB2312_80.
Chunhua Liu
Last updated: 2001-11-22/1500
*/
/* D6 */
9, 10, 8, 7, 6, 8, 4, 7,
14, 8, 8, 10, 5, 3, 8, 11,
8, 12, 12, 6, 10, 8, 7, 9,
4, 11, 5, 6, 7, 7, 10, 11,
6, 10, 13, 8, 9, 8, 12, 10,
13, 8, 8, 11, 12, 8, 11, 4,
9, 8, 9, 10, 8, 9, 8, 9,
6, 6, 6, 8, 6, 9, 7, 12,
9, 7, 8, 8, 10, 8, 9, 17,
10, 10, 12, 6, 11, 10, 8, 10,
6, 10, 12, 8, 17, 15, 5, 11,
9, 7, 11, 8, 12, 12,
/* D7 */
7, 8, 9, 8, 7, 4, 9, 4,
9, 8, 15, 14, 15, 10, 6, 12,
6, 15, 6, 7, 12, 13, 9, 14,
7, 11, 10, 10, 10, 8, 8, 10,
12, 8, 10, 11, 11, 7, 9, 9,
9, 10, 9, 12, 11, 7, 12, 5,
9, 13, 3, 6, 11, 6, 18, 12,
15, 8, 11, 9, 7, 7, 7, 9,
12, 10, 7, 8, 11, 9, 7, 7,
8, 10, 20, 16, 15, 12, 13, 12,
15, 9, 5, 7, 9, 11, 7, 7,
10, 0, 0, 0, 0, 0,
/* D8 */
3, 3, 3, 4, 4, 4, 5, 6,
6, 10, 10, 16, 1, 8, 1, 2,
3, 4, 4, 5, 5, 6, 9, 11,
14, 14, 19, 1, 8, 14, 2, 6,
4, 7, 7, 11, 14, 4, 6, 10,
11, 12, 14, 15, 16, 2, 5, 8,
11, 11, 15, 8, 7, 2, 4, 6,
7, 8, 8, 8, 9, 10, 10, 10,
13, 13, 14, 14, 15, 16, 2, 8,
2, 4, 4, 4, 5, 5, 5, 5,
6, 6, 6, 6, 6, 6, 6, 6,
6, 7, 7, 7, 7, 7,
/* D9 */
7, 7, 7, 7, 8, 8, 8, 8,
8, 8, 8, 8, 8, 8, 8, 8,
9, 9, 9, 9, 9, 9, 9, 9,
9, 10, 10, 10, 10, 10, 10, 10,
10, 10, 10, 10, 10, 10, 11, 11,
11, 11, 11, 11, 11, 12, 12, 12,
13, 14, 14, 14, 14, 14, 14, 15,
15, 5, 6, 7, 7, 9, 17, 6,
8, 4, 12, 16, 17, 18, 21, 2,
9, 9, 11, 6, 6, 7, 2, 8,
10, 10, 11, 12, 12, 12, 13, 16,
19, 19, 2, 6, 8, 8,
/* DA */
10, 2, 10, 10, 2, 5, 5, 5,
6, 6, 6, 7, 7, 7, 7, 7,
7, 8, 8, 8, 8, 8, 8, 8,
8, 8, 8, 8, 9, 9, 9, 9,
10, 10, 10, 10, 10, 10, 10, 11,
11, 11, 11, 11, 11, 11, 11, 11,
11, 11, 12, 12, 12, 12, 12, 13,
13, 14, 14, 14, 15, 15, 19, 2,
8, 2, 5, 5, 6, 6, 7, 7,
7, 7, 8, 9, 9, 10, 10, 10,
11, 11, 11, 16, 5, 5, 5, 5,
6, 6, 7, 7, 7, 7,
/* DB */
7, 7, 8, 8, 8, 8, 8, 8,
8, 9, 9, 9, 9, 9, 10, 10,
11, 11, 13, 13, 13, 14, 14, 16,
19, 17, 5, 7, 5, 7, 7, 8,
10, 10, 11, 15, 9, 17, 20, 2,
2, 6, 10, 2, 5, 10, 12, 7,
9, 9, 14, 16, 16, 17, 6, 6,
6, 6, 6, 6, 6, 7, 7, 7,
8, 8, 8, 8, 8, 8, 8, 8,
8, 8, 9, 9, 9, 9, 9, 9,
9, 9, 9, 10, 10, 10, 10, 10,
10, 11, 11, 11, 11, 11,
/* DC */
11, 11, 11, 11, 11, 12, 12, 12,
12, 13, 13, 14, 14, 14, 15, 20,
21, 22, 3, 5, 5, 6, 6, 6,
6, 6, 6, 6, 7, 7, 7, 7,
7, 7, 7, 7, 7, 7, 7, 7,
7, 7, 7, 7, 7, 7, 7, 7,
7, 7, 7, 8, 8, 8, 8, 8,
8, 8, 8, 8, 8, 8, 8, 8,
8, 8, 8, 8, 8, 8, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9,
/* DD */
9, 9, 9, 9, 9, 9, 9, 10,
10, 10, 10, 10, 10, 10, 10, 10,
10, 10, 10, 10, 10, 10, 10, 10,
10, 10, 10, 11, 11, 11, 11, 11,
11, 11, 11, 11, 11, 11, 11, 11,
11, 11, 11, 11, 11, 11, 11, 11,
11, 11, 11, 11, 11, 12, 12, 12,
12, 12, 12, 12, 12, 12, 12, 12,
12, 12, 12, 12, 12, 12, 12, 13,
13, 13, 13, 13, 13, 13, 13, 13,
13, 13, 13, 13, 13, 13, 13, 14,
14, 14, 14, 14, 14, 14,
/* DE */
14, 14, 14, 14, 15, 15, 15, 15,
15, 15, 15, 15, 15, 16, 16, 16,
16, 16, 16, 16, 16, 16, 17, 17,
17, 17, 17, 18, 19, 19, 19, 20,
20, 22, 3, 9, 6, 7, 9, 9,
10, 10, 11, 3, 5, 5, 12, 3,
6, 7, 8, 8, 8, 8, 9, 9,
9, 10, 10, 10, 11, 11, 11, 11,
11, 11, 11, 11, 11, 11, 11, 11,
12, 12, 12, 12, 12, 12, 12, 12,
12, 12, 13, 13, 13, 13, 13, 13,
13, 13, 14, 14, 14, 14,
/* DF */
14, 15, 15, 15, 15, 16, 16, 16,
17, 17, 19, 23, 25, 3, 7, 8,
12, 5, 5, 5, 5, 5, 5, 6,
6, 6, 7, 7, 7, 7, 7, 7,
7, 7, 7, 7, 7, 8, 8, 8,
8, 8, 8, 8, 8, 8, 8, 8,
9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9,
10, 10, 10, 10, 10, 10, 10, 10,
10, 10, 10, 11, 11, 11, 11, 11,
11, 11, 11, 11, 11, 11,
/* E0 */
11, 11, 11, 11, 11, 11, 11, 11,
12, 12, 12, 12, 12, 12, 12, 12,
12, 12, 12, 12, 12, 12, 12, 12,
12, 13, 13, 13, 13, 13, 13, 13,
13, 13, 13, 13, 13, 13, 13, 13,
13, 13, 13, 13, 13, 13, 14, 14,
14, 14, 14, 14, 14, 14, 14, 15,
15, 15, 15, 15, 15, 15, 15, 15,
15, 15, 16, 16, 16, 16, 16, 16,
17, 17, 19, 25, 3, 6, 6, 7,
7, 8, 9, 10, 11, 11, 16, 7,
8, 8, 8, 10, 11, 11,
/* E1 */
11, 12, 14, 14, 15, 15, 6, 6,
7, 7, 7, 7, 7, 7, 7, 7,
7, 8, 8, 8, 8, 8, 8, 8,
8, 8, 8, 9, 9, 9, 9, 10,
10, 11, 11, 11, 11, 11, 11, 11,
12, 12, 12, 12, 12, 12, 12, 12,
12, 12, 13, 13, 13, 14, 15, 15,
17, 17, 19, 3, 7, 8, 9, 9,
9, 10, 11, 11, 12, 13, 15, 16,
24, 3, 3, 5, 6, 6, 6, 7,
7, 8, 8, 8, 9, 9, 9, 9,
10, 10, 10, 10, 10, 10,
/* E2 */
10, 11, 11, 11, 11, 11, 11, 11,
12, 12, 12, 12, 12, 12, 14, 14,
15, 15, 16, 17, 20, 6, 14, 12,
14, 3, 3, 6, 7, 7, 7, 7,
7, 8, 9, 10, 10, 11, 12, 12,
13, 13, 14, 15, 15, 25, 5, 7,
7, 8, 9, 9, 11, 11, 11, 11,
12, 13, 14, 15, 16, 16, 17, 3,
5, 6, 6, 7, 7, 7, 7, 7,
7, 7, 7, 7, 7, 7, 8, 8,
8, 8, 8, 8, 8, 8, 8, 8,
8, 9, 9, 9, 9, 9,
/* E3 */
9, 9, 10, 10, 10, 10, 10, 10,
10, 10, 11, 11, 11, 11, 11, 11,
11, 11, 12, 12, 12, 12, 12, 12,
12, 13, 13, 14, 15, 15, 15, 16,
16, 18, 8, 17, 4, 6, 7, 7,
7, 7, 9, 9, 10, 10, 10, 11,
11, 11, 11, 11, 11, 12, 12, 13,
13, 13, 14, 3, 4, 8, 3, 6,
6, 6, 7, 7, 7, 7, 7, 7,
7, 7, 7, 7, 7, 7, 8, 8,
8, 8, 8, 8, 8, 8, 8, 8,
8, 8, 8, 8, 8, 8,
/* E4 */
9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 10, 10, 10, 10, 10, 10,
10, 10, 10, 10, 10, 11, 11, 11,
11, 11, 11, 11, 11, 11, 11, 11,
11, 11, 11, 11, 12, 12, 12, 12,
12, 12, 12, 12, 12, 12, 12, 12,
13, 13, 13, 13, 13, 13, 13, 13,
13, 13, 13, 13, 13, 13, 13, 13,
13, 14, 14, 14, 14, 14, 14, 14,
14, 14, 14, 14, 14, 14, 14, 15,
15, 15, 15, 15, 15, 16,
/* E5 */
16, 16, 16, 16, 16, 17, 17, 17,
17, 17, 19, 19, 19, 20, 20, 21,
24, 3, 5, 8, 8, 9, 10, 12,
13, 14, 14, 15, 16, 16, 17, 17,
3, 7, 7, 8, 8, 8, 8, 8,
8, 8, 9, 9, 10, 10, 10, 10,
10, 10, 11, 11, 11, 11, 12, 12,
12, 12, 13, 13, 13, 13, 15, 15,
16, 16, 17, 17, 18, 3, 11, 9,
12, 5, 9, 10, 10, 12, 14, 15,
21, 8, 8, 9, 11, 12, 22, 3,
6, 6, 7, 7, 7, 7,
/* E6 */
7, 7, 7, 7, 7, 7, 8, 8,
8, 8, 9, 9, 9, 9, 9, 9,
9, 10, 10, 10, 10, 10, 10, 10,
10, 11, 11, 11, 11, 11, 11, 11,
12, 12, 12, 12, 13, 13, 13, 13,
13, 13, 14, 14, 14, 14, 14, 14,
14, 15, 16, 16, 17, 17, 20, 5,
9, 7, 8, 12, 3, 3, 8, 8,
8, 8, 8, 8, 8, 8, 9, 9,
9, 10, 11, 11, 11, 11, 12, 12,
13, 13, 13, 14, 14, 15, 19, 20,
3, 6, 6, 6, 6, 6,
/* E7 */
7, 7, 7, 8, 8, 8, 8, 8,
8, 8, 9, 9, 9, 10, 10, 10,
11, 11, 11, 11, 11, 11, 11, 11,
11, 11, 11, 12, 12, 12, 12, 12,
12, 12, 12, 12, 12, 13, 13, 13,
13, 13, 13, 13, 13, 14, 14, 14,
14, 14, 15, 15, 15, 16, 16, 16,
16, 19, 3, 15, 3, 8, 10, 6,
6, 8, 8, 8, 9, 9, 9, 9,
9, 9, 9, 9, 10, 10, 10, 10,
10, 10, 10, 10, 10, 11, 12, 12,
12, 12, 12, 12, 12, 12,
/* E8 */
12, 12, 13, 13, 13, 13, 13, 14,
14, 15, 15, 15, 15, 15, 15, 15,
16, 17, 17, 17, 18, 20, 20, 13,
13, 14, 7, 7, 7, 7, 7, 8,
8, 8, 8, 8, 8, 8, 8, 8,
8, 8, 8, 8, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 10,
10, 10, 10, 10, 10, 10, 10, 10,
10, 10, 10, 10, 10, 10, 10, 10,
10, 10, 11, 11, 11, 11, 11, 11,
11, 12, 12, 12, 12, 12,
/* E9 */
12, 12, 12, 12, 12, 12, 12, 13,
13, 13, 13, 13, 13, 13, 13, 13,
13, 13, 13, 13, 13, 13, 13, 13,
13, 13, 14, 14, 14, 14, 14, 14,
14, 14, 14, 14, 14, 14, 14, 15,
15, 15, 15, 15, 15, 15, 15, 16,
16, 16, 16, 16, 16, 16, 16, 16,
16, 16, 17, 17, 17, 17, 18, 13,
14, 8, 9, 9, 9, 11, 11, 11,
12, 12, 14, 16, 7, 8, 9, 9,
9, 9, 9, 9, 9, 9, 9, 10,
10, 10, 10, 11, 12, 12,
/* EA */
12, 12, 13, 15, 16, 10, 5, 8,
11, 12, 12, 13, 13, 13, 14, 14,
8, 9, 12, 16, 16, 17, 4, 6,
6, 7, 8, 8, 8, 8, 8, 8,
8, 9, 9, 9, 9, 9, 9, 10,
10, 10, 10, 10, 10, 11, 11, 12,
13, 13, 14, 14, 16, 18, 18, 20,
21, 9, 9, 9, 9, 10, 10, 10,
10, 11, 11, 11, 12, 12, 14, 9,
10, 11, 12, 13, 14, 15, 15, 9,
13, 6, 8, 9, 11, 11, 12, 12,
12, 13, 14, 10, 11, 12,
/* EB */
14, 17, 10, 10, 12, 12, 12, 13,
15, 16, 16, 22, 5, 6, 7, 7,
9, 10, 10, 11, 13, 4, 11, 13,
12, 13, 15, 9, 15, 6, 7, 7,
7, 8, 8, 8, 8, 8, 8, 8,
8, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 10, 10,
10, 10, 10, 10, 10, 10, 10, 11,
11, 11, 11, 11, 11, 12, 12, 12,
12, 12, 12, 12, 13, 13, 13, 13,
13, 13, 13, 13, 14, 14, 14, 15,
15, 16, 17, 17, 17, 17,
/* EC */
17, 16, 7, 11, 12, 13, 13, 16,
9, 9, 12, 13, 16, 16, 4, 13,
13, 17, 12, 15, 16, 8, 10, 10,
10, 11, 11, 13, 14, 7, 8, 8,
8, 9, 9, 9, 9, 9, 10, 10,
11, 11, 11, 12, 12, 13, 13, 13,
13, 13, 13, 13, 13, 14, 15, 15,
15, 15, 16, 16, 16, 18, 21, 30,
4, 11, 13, 16, 8, 8, 9, 11,
12, 4, 7, 8, 8, 9, 9, 9,
9, 9, 9, 9, 10, 10, 12, 12,
13, 14, 16, 21, 7, 7,
/* ED */
9, 10, 10, 10, 10, 10, 10, 11,
13, 13, 14, 16, 16, 17, 17, 24,
4, 6, 8, 9, 12, 7, 8, 8,
9, 9, 9, 9, 9, 9, 9, 10,
10, 10, 10, 10, 10, 10, 10, 10,
10, 11, 11, 11, 11, 11, 11, 11,
11, 12, 13, 13, 13, 13, 13, 14,
14, 14, 14, 14, 15, 15, 15, 16,
16, 17, 17, 18, 19, 18, 21, 11,
12, 17, 19, 8, 9, 9, 9, 9,
9, 10, 10, 10, 11, 11, 11, 11,
12, 12, 12, 12, 13, 13,
/* EE */
13, 13, 14, 14, 14, 14, 15, 15,
16, 16, 16, 17, 18, 7, 8, 9,
9, 9, 10, 12, 13, 17, 9, 10,
10, 12, 13, 14, 14, 16, 17, 17,
10, 16, 23, 5, 6, 6, 7, 7,
7, 8, 8, 8, 8, 8, 8, 9,
9, 9, 9, 9, 9, 9, 9, 9,
9, 10, 10, 10, 10, 10, 10, 10,
10, 10, 10, 10, 10, 10, 10, 10,
10, 10, 10, 10, 11, 11, 11, 11,
11, 11, 11, 11, 11, 11, 11, 11,
11, 11, 11, 11, 11, 11,
/* EF */
11, 11, 11, 11, 11, 11, 11, 11,
12, 12, 12, 12, 12, 12, 12, 12,
12, 12, 12, 12, 12, 12, 12, 12,
12, 13, 13, 13, 13, 13, 13, 13,
13, 13, 13, 13, 13, 14, 14, 14,
14, 14, 14, 14, 14, 14, 14, 14,
14, 15, 15, 15, 15, 15, 15, 15,
15, 16, 16, 16, 16, 16, 16, 16,
16, 17, 17, 17, 17, 17, 17, 17,
17, 17, 17, 18, 18, 18, 19, 20,
14, 9, 12, 13, 9, 9, 10, 10,
11, 12, 12, 12, 13, 13,
/* F0 */
15, 15, 16, 17, 18, 22, 9, 11,
12, 13, 17, 10, 11, 7, 7, 8,
9, 9, 10, 10, 10, 10, 10, 10,
11, 11, 11, 11, 11, 12, 12, 12,
12, 12, 12, 13, 13, 13, 13, 13,
14, 14, 14, 14, 14, 15, 15, 16,
16, 16, 17, 17, 17, 17, 18, 18,
22, 5, 7, 7, 8, 8, 9, 9,
10, 10, 10, 10, 10, 10, 10, 10,
11, 11, 12, 12, 12, 12, 12, 12,
13, 13, 13, 13, 13, 13, 13, 14,
14, 14, 14, 14, 14, 14,
/* F1 */
15, 15, 15, 15, 16, 16, 16, 16,
16, 16, 16, 16, 17, 18, 18, 18,
18, 21, 23, 11, 12, 8, 8, 9,
9, 10, 11, 13, 13, 14, 14, 14,
15, 5, 8, 9, 9, 9, 9, 10,
11, 11, 11, 11, 12, 12, 12, 12,
13, 13, 13, 13, 13, 13, 14, 14,
14, 14, 14, 15, 15, 16, 17, 19,
24, 5, 9, 11, 12, 9, 6, 9,
10, 12, 12, 13, 14, 15, 15, 16,
16, 22, 12, 8, 11, 11, 11, 12,
15, 16, 12, 9, 10, 10,
/* F2 */
12, 12, 12, 12, 13, 15, 15, 16,
16, 16, 18, 20, 21, 6, 10, 7,
8, 9, 9, 9, 9, 10, 10, 10,
10, 10, 10, 10, 10, 10, 10, 11,
11, 11, 11, 11, 11, 11, 11, 11,
11, 11, 12, 12, 12, 12, 12, 12,
12, 12, 12, 12, 12, 12, 13, 13,
13, 13, 13, 13, 13, 13, 14, 14,
14, 14, 14, 14, 14, 14, 14, 14,
14, 14, 14, 14, 15, 15, 15, 15,
15, 15, 15, 15, 15, 15, 15, 15,
15, 15, 16, 16, 16, 16,
/* F3 */
16, 16, 16, 16, 16, 16, 17, 17,
17, 17, 17, 17, 17, 17, 17, 17,
17, 18, 18, 18, 18, 19, 19, 19,
19, 20, 21, 24, 26, 6, 14, 17,
17, 10, 8, 9, 9, 9, 10, 10,
10, 10, 10, 11, 11, 11, 11, 11,
11, 11, 11, 11, 11, 11, 11, 12,
12, 12, 12, 12, 12, 13, 13, 13,
13, 13, 13, 14, 14, 14, 14, 14,
14, 14, 14, 14, 14, 14, 14, 15,
15, 15, 15, 16, 16, 16, 16, 16,
17, 17, 17, 17, 17, 17,
/* F4 */
18, 18, 18, 19, 19, 19, 8, 9,
11, 12, 10, 10, 9, 9, 9, 10,
10, 10, 10, 11, 11, 11, 11, 12,
13, 13, 14, 15, 17, 18, 19, 10,
10, 11, 13, 13, 19, 11, 11, 13,
15, 15, 16, 9, 10, 10, 11, 11,
12, 12, 13, 14, 14, 14, 15, 15,
15, 15, 15, 16, 18, 6, 15, 9,
11, 12, 14, 14, 15, 15, 16, 17,
6, 12, 14, 14, 17, 25, 11, 19,
9, 12, 13, 13, 23, 11, 15, 10,
11, 9, 10, 10, 10, 12,
/* F5 */
12, 12, 13, 13, 13, 14, 14, 14,
14, 14, 15, 15, 16, 16, 16, 17,
17, 18, 19, 19, 19, 20, 20, 21,
7, 16, 10, 13, 14, 18, 18, 10,
10, 11, 11, 11, 12, 12, 12, 12,
12, 12, 12, 12, 13, 13, 13, 13,
13, 13, 13, 14, 14, 15, 15, 15,
15, 15, 15, 15, 15, 16, 16, 16,
16, 16, 16, 16, 16, 17, 17, 17,
19, 19, 19, 19, 19, 20, 21, 22,
22, 23, 24, 7, 12, 13, 13, 17,
17, 11, 11, 12, 12, 13,
/* F6 */
13, 14, 15, 13, 18, 12, 11, 12,
12, 14, 14, 16, 16, 16, 19, 19,
20, 22, 10, 13, 13, 13, 14, 14,
15, 15, 17, 8, 12, 20, 8, 10,
10, 13, 14, 18, 18, 14, 14, 15,
16, 17, 18, 18, 21, 24, 12, 12,
13, 13, 13, 13, 13, 13, 13, 13,
14, 14, 14, 14, 14, 14, 14, 14,
15, 15, 15, 15, 15, 15, 15, 15,
15, 15, 16, 16, 16, 16, 16, 16,
16, 16, 16, 16, 16, 16, 17, 17,
17, 17, 17, 17, 17, 17,
/* F7 */
18, 18, 18, 18, 18, 19, 19, 19,
19, 19, 19, 20, 20, 20, 21, 14,
14, 15, 15, 16, 18, 18, 18, 19,
19, 13, 13, 14, 14, 14, 15, 15,
17, 17, 18, 18, 19, 19, 22, 14,
14, 15, 16, 16, 17, 19, 12, 15,
18, 22, 22, 10, 13, 14, 15, 15,
16, 16, 16, 18, 19, 20, 23, 25,
14, 15, 17, 13, 16, 16, 17, 19,
19, 21, 23, 17, 17, 17, 18, 18,
19, 20, 20, 20, 20, 21, 17, 18,
20, 23, 23, 16, 17, 23,
/* F8 */
};
int GetGB2312StrokeCount(unsigned char c1, unsigned char c2)
{
unsigned offset;
if ( c1 < 0xB0 || c1 > 0xF7 || c2 < 0xA1 || c2 > 0xFE )
{
// not a valid gb2312 Chinese character
return -1;
}
offset = ((unsigned)c1-0xB0) * (0xFE-0xA0) + ((unsigned)c2-0xA1);
return gb2312_stroke_count[offset];
}
#include <stdio.h>
#include <string.h>
void __fastcall TMainForm::Button1Click(TObject *Sender)
{
char *buf = "测试一二三四五六七八九十啊齄";
Memo1->Lines->Add(buf);
for ( unsigned i=0; i<strlen(buf); i+=2 )
{
String strTemp;
strTemp.sprintf("%-2d", GetGB2312StrokeCount(buf[i], buf[i+1]));
Memo1->Lines->Add(strTemp);
}
}
//---------------------------------------------------------------------------
以上是“获得汉字的笔画的源码(2)[VC/C++编程]”的内容,如果你对以上该文章内容感兴趣,你可以看看七道奇为您推荐以下文章:
本文地址: | 与您的QQ/BBS好友分享! |
- ·上一篇文章:c与c++中的time相关函数
- ·下一篇文章:获得汉字的笔画的源码(1)
- ·中查找“获得汉字的笔画的源码(2)”更多相关内容
- ·中查找“获得汉字的笔画的源码(2)”更多相关内容