摘要
详细讨论了在滚动视图的局部区域实现编辑文本的基本算法,解决了在视图局部只能显示不能编辑文本的难题,该算法以逐个接收输入字符并逐个显示字符为核心方法以及配备定位光标和确定字符显示位置的方法实现了编辑功能,利用本方法可以很容易地在视图的一个或若干个局部区域嵌入局部文本编辑功能,在VisualC++开发环境下,开发基于文档/视图结构的应用程序时,有利于在视图区域显示不同格式的数据。
The basic algorithm for part text editing functions to be embedded in the scrollview area is introduced in detail, having solved the problem that text is only displayed but not edited in the view. Part text editing functions depend on the means: displaying a character after receiving the input character one by one, locating cursor and character to be displayed on the view. With this algorithm, part text editing functions can be easily embedded in one or more than one areas of the view, which is propitious to show different format data and developing application based on document/view structure in the Visual C++ development environment.
出处
《微机发展》
2003年第9期13-15,共3页
Microcomputer Development