Sciter2 之一:封装Sciter2到CWnd的子类中 - Go语言中文社区

Sciter2 之一:封装Sciter2到CWnd的子类中


封装Sciter2到CWnd子类

 关键词:sciter2、MFC、CWnd

        以前一直用MFC做界面,虽有朋友推荐多种界面设计,但也就看看,从没真正去了解。最近帮朋友做导航界面,明确要求用HTMLayout,网上搜索了下,看了下介绍,感觉sciter2比HTMLayout做的界面还炫丽,朋友同意后,今天就开始接触。目的是继承CWnd,生成sciterWnd,然后将sciter2封装在里面,通过换html文件来更好sciterWnd界面设计。做了一下午,搞的差不多了,记录下。

sciter2下载地址:  http://www.terrainformatica.com/sciter2/main.whtm 

直接下载Sciter2 SDK就可以了,里面包含了所有的头文件、lib和dll文件。

由于刚刚接触Sciter2,对其原理和用法不了解,加之其给的例子是win32 SDK下的,并且用法很奇怪,在分析了这些例子后,还是没有理清楚头绪,回头又看官网的说明:感觉这个比较有用:http://www.terrainformatica.com/sciter/sciter-basics.whtm ,其实还是很简单的,只用到一下三个函数:

        SciterProcND

        SciterSetCallback

        SciterLoadFile

以下是测试界面,加载的是Sciter2例子里面的test-slide.htm。

关于消息传递还在整理中

To be able to handle events in native code you will need to attach instance of sciter::event_handler class to existing DOM element or to the window itself.

event_handler attached to the window will receive all DOM events no matter which element they are targeted to.

sciter::event_handler contains various methods - receivers of events of various types. You can override any of these methods in order to receive events you are interested in your implementation of sciter::event_handler class.

 

版权声明:本文来源CSDN,感谢博主原创文章,遵循 CC 4.0 by-sa 版权协议,转载请附上原文出处链接和本声明。
原文链接:https://blog.csdn.net/yunzhaoqiang/article/details/8723590
站方申明:本站部分内容来自社区用户分享,若涉及侵权,请联系站方删除。
  • 发表于 2019-09-05 13:32:33
  • 阅读 ( 1304 )
  • 分类:

0 条评论

请先 登录 后评论

官方社群

GO教程

推荐文章

猜你喜欢