Windows Vision Library是什么(WVL)?
WVL是一个提供GUI编程的C++框架,可以让你用简单的方法来编写基于GUI的应用程序。 WVL是用标准C++编写,并且它被设计成可以跨平台的程序库, 因此,你可以很容易地在不同的编译器上编译,并且在不同的系统平台上分发应用程序。该程序库是以开放源代码形式发布并且可以免费使用。在使用之前,请先详细阅读程序的 授权协议 。
设计准则
为了使程序库有用并且很提供友好的使用方式,程序库的设计遵循了一些 准则。
安装文档
在使用之前,必须正确地安装和配置程序库。参考 程序库安装文档。
编译环境
Dev-C++ 4.9.9.1
GCC 3.3.1 with X11
Visual C++.NET 2003
Visual C++.NET 2005 Express Beta1 With Microsoft Platform SDK
当前版本:0.12.3.28, 2005-07-29
联系作者
非常高兴能够收到你的关于改进该程序库的建议,我的电子邮件和MSN Messenger为 cnjinhao_at_hotmail.com。如果你有任何问题,可以在这里 讨论。
如何用WVL创建一个简单的应用程序
=========================================
#include <wvl/wvl.h>
class wvl_test: public wvl::form
{
public:
wvl_test()
:wvl::form(0, "wvl_test", wvl::point(50, 50), wvl::size(238, 132))
{
//创建文本框
text_.create(*this, "This is a text box", wvl::point(42, 37), wvl::size(150, 23));
//创建一个按钮
button_.create(*this, "OK", wvl::point(62, 86), wvl::size(100, 23));
//让这个按钮能够响应鼠标的单击事件,当有单击事件产生遍由 wvl_test::on_click 响应
button_.make_event<wvl::event::mouse_click>(wvl::bind_mem_fun(this, &wvl_test::on_click));
this->show(); //显示这个窗口
}
void on_click()
{
this->close(); //关闭启动窗口,并退出应用程序
}
private:
wvl::text text_;
wvl::button button_;
};
//应用程序的入口函数
int WINAPI WinMain(HINSTNACE hthis, HINSTANCE, char*, int)
{
//启动一个WVL实例,并用wvl_test当作启动窗口
wvl::executer<wvl_test> runner;
runner.run();
return 0;
}
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Screenshot 1: Application running on WVL under MS Windows
Screenshot 2: Application running on WVL based on X11 under Linux
在这里可以获得更多的例子
Download The WVL for Win32 SDK
点击这里查看原地址: http://www.wvl.com.cn/wvl/china/
英文介绍地址: http://www.wvl.com.cn/wvl