这段时间用了WTL,感觉着实不错,很是轻巧。。。

"http://www.w3.org/TR/html4/loose.dtd">



最显而易见的一个效果就是程序的体积会减小不少,我基于wtl写了一个SDI的程序(Release,无document/view architecture支持,静态链接atl库),并添加功能性代码2000多行(也作的模板封装),体积为112K,但是用MFC(Release,无document/view architecture支持,静态链接MFC库),程序通过VC向导自动生成,未添加任何代码体积就已有304k。

模板“被用到才被编译”的特性不觉中起到了缩小程序体积的效果。

wtl的使用也很方便,类、方法名称和MFC几乎一致,与MFC里的类几乎都可以一一对应起来,同时对CE也有支持(当然MFC也有for CE,不过通常我不会用,因为往往手持设备的硬件条件并不像PC那样富余),而且同样因为模板封装的缘故,使得其在CE上的程序体积既表现与纯sdk程序相差不大,wtl出来这么久,才用它实在是惭愧,俺早先固执的认为GUI的编程并不适合用模板的风格,看来对不了解的东西抱着既定的思维去看待必定会产生很大的偏差。

模板封装的方式也无意更叫巧妙、代码也更具高复用性。

附图,我写的那个wtl的程序(其实是老早就想写的Java Script菜单编辑器,托了很长时间上周末才开始写的。。。。:>,争取过年这段时间能利用上。。。)


This entry was posted in 技术. Bookmark the permalink.

One Response to 这段时间用了WTL,感觉着实不错,很是轻巧。。。

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word