July 29th Wednesday (七月 二十九日 水曜日)

wxView 类是 wxWidgets 文档/视图框架的一部分,用于建模应用程序中基于文件的数据的查看和编辑组件。要使用 wxView 类,需要派生一个新的类并至少重写 OnCreate、OnDraw、OnUpdate 和 OnClose 成员函数。为了使框架能够按需创建视图对象,需使用 DECLARE_DYNAMIC_CLASS 和 IMPLEMENT_DYNAMIC_CLASS 宏,并在创建 wxDocTemplate 对象时传递 CLASSINFO(YourViewClass)。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

wxView

  The wxView class can be used to model the viewing and editing component of an application's file-based data. It is part of the document/view
framework supported by wxWidgets, and cooperates with the wxDocument, wxDocTemplate and wxDocManager classes.

  To use the abstract wxView class, you need to derive a new class and override at least the member functions OnCreate, OnDraw, OnUpdate and OnClose.
You will probably want to respond to menu commands from the frame containing the view.

  Use the macros DECLARE_DYNAMIC_CLASS and IMPLEMENT_DYNAMIC_CLASS in order to allow the framework to create view objects on demand. When you
create a wxDocTemplate object on application initialization, you should pass CLASSINFO(YourViewClass) to the wxDocTemplate constructor so that
it knows how to create an instance of this class.

  If you do not wish to use the wxWidgets method of creating view objects dynamically, you must override wxDocTemplate::CreateView to return
an instance of the appropriate class.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值