首页 | 官方网站   微博 | 高级检索  
     

视图中插入文本块的编程方法
引用本文:李霞.视图中插入文本块的编程方法[J].广州大学学报(自然科学版),2002,1(4):57-59.
作者姓名:李霞
作者单位:广州大学,教育软件所,广东,广州,510405
摘    要:在一般应用软件中,文本输入是必不可少的。如何让文本输入像画线、画圆、画椭圆一样简单方便,实现在视图中插入文本块?可将输入的文本看成是一个文本块,或者说是一个矩形,在矩形中完成文本的输入、修改、换行等操作。这样,工作就转化为在视图中插入一个矩形,编程并让该矩形响应鼠标和键盘消息,从而实现文本块中文本的输入及各项操作。具体通过VC++中文档、视图之间数据交换和各自职能的特点以及C++中面向对象的技术^1,2],实现了在视图中插入文本块的方法。这里的文本块如其它的图形对象一样,可以选择、可以移动、可以修改、可以删除。最后给出了实现结果的图片。

关 键 词:编程方法  文本块  矩形  面向对象  视图  文本输入  智能教育软件  文字处理
文章编号:1671-4229(2002)04-0057-03
修稿时间:2001年11月27

The Method of Programming on Inserting Text-block in the View
LI Xia.The Method of Programming on Inserting Text-block in the View[J].Journal og Guangzhou University:Natural Science Edition,2002,1(4):57-59.
Authors:LI Xia
Abstract:Text_inputting is necessary in general applications. It's the work of the paper to make text_inputting as convenient as drawing a line or drawing a circle. The purpose of the paper is to demonstrate an easy method of inputting_text_block in the view.Viewing the inputted text as a text block or a rectangle, you can realize the operation of input_text, modify_text, change_text, pedestrian of the text, etc. So the work was changed to insert a text_block in the view. With proper programming,you can make the rectangle respond to the message of the mouse or keyboard.The paper realized the method of inserting the text_block in the view with the feature of data exchange and operator of each other in document and view and object_orientation in C++. The text block can be selected, moved and deleted like the other object of picture. The result picture is presented in the end of the paper.
Keywords:applications  text_block  rectangle  object_orientation  view  
本文献已被 CNKI 维普 万方数据 等数据库收录!
设为首页 | 免责声明 | 关于勤云 | 加入收藏

Copyright©北京勤云科技发展有限公司    京ICP备09084417号-23

京公网安备 11010802026262号