bianbian coding life

便便代码人生: 关注技术, 翻译文档, 偶尔动动手

[原]Symbian初步模拟标准短信编辑器 (standard SMS editor)

Posted by bianbian on 2007-02-07 08:27


本文Tags: , , ,

站在巨人的肩膀上(CMyNotepaper类,多谢ziteng兄相助),弄了一天,初步模拟了标准短信编辑器。只是模拟了GUI界面,按键处理都没有做(比如在内容编辑器里按“向上键”应该跳到收件人编辑器)。
主要思想是:

+---CCoeControl----+
| +---CCoeC...---+ |
| | Lable  Edwin | |
| +--------------+ |
| +---CCoeC...---+ |
| |   CEikEdwin  | |
| +--------------+ |
+------------------+

不知道我这样做对不对,下面是截图和代码,欢迎指教:
symbian standard SMS editor
代码见“代码 CODE”页面。

标签: , , ,

遵守创作共用协议,转载请链接形式注明来自http://bianbian.org 做人要厚道

相关日志

Posted in Symbian, Technology | No Comments »

[原]用内嵌IE做软件界面的几点体会

Posted by bianbian on 2006-12-22 10:48


本文Tags: , , ,

做人要厚道,转载请用链接形式标明出处,谢谢合作。

内嵌IE做软件界面是比较方便和流行的,如.NET 2003的安装程序(好像2005也是,不太记得了)。主要是随便插入图片阿、字体阿什么的。不过因为是内嵌IE,保持了大部分IE的特性,但是这些特性稍不注意,在软件界面看起来却是BUG(或者换句话说,用户很明显地发觉这是个网页…)。比如.NET 2003的安装程序,右键点击会出现IE浏览网页时的右键菜单就是个BUG:
.NET 2003 setup
或者呢,按住Shift,点击网页内那些链接,会发现新开了个IE窗口显示,这样连存放的文件名也暴露了。

当然了,BUG还不仅如此:虽然这个主要的内嵌IE不支持文件拖入(会显示禁止drop的图标),但是安装时右上角不停变化的图片处其实也是个内嵌IE——这里Microsoft显然遗漏了禁止drop的处理——你用鼠标拖个htm文件过去,会发现是可以drop的(直接用PrintScreen截的,没有鼠标,不过能看到拖过去的htm图标),如图:
dotnet2003-2.JPG

那么针对这些问题,我说一下用内嵌IE做软件界面的几点体会:
(1)避免script error。(今天没有空,内容待补充,下同)
(2)去掉右键菜单。
(3)禁止拖入。
(4)禁止打开新窗口。
(5)往内嵌IE里写入数据。
(6)截获页面跳转执行相应的代码,换句话说就是和主程序交互。
(7)这点可能是Delphi 7特有的bug,Delphi自带的TWebBrowser不支持键盘:如回车键提交表单等。

标签: , , ,

遵守创作共用协议,转载请链接形式注明来自http://bianbian.org 做人要厚道

相关日志

Posted in Delphi, Technology | 2 Comments »

[原]AutoIt 3的GUI生成工具Koda

Posted by bianbian on 2006-09-06 03:00


本文Tags: , , ,

原来已经有这样的GUI工具了,界面跟我设想的居然一模一样:http://www.autoitscript.com/fileman/users/lookfar/formdesign.html
5555,真是郁闷,这个可能也参考了Handel,Handel真是牛X。
只好花了一点点时间把Koda汉化了一下(下载后存成lang_zhcn.xml到Koda的Language目录)。第一次翻译,大家见笑。
不过我用JavaScript做了把HHC文件(微软生成chm帮助文档时的目录结构文件)直接生成树状目录结构的网页,这样AutoIt3的在线文档就不会那么丑了。等完善一下再贴上来。

标签: , , ,

遵守创作共用协议,转载请链接形式注明来自http://bianbian.org 做人要厚道

相关日志

Posted in AutoIt3, Technology | 1 Comment »

[原]AutoIt 3简介,决定翻译并开发GUI工具

Posted by bianbian on 2006-09-04 02:54


本文Tags: ,

http://www.autoitscript.com/autoit3/
用AutoIt 3花了4个小时,写了一个游戏的自动登录脚本(包括服务器端设置用户名/密码和客户端读取并解析用户名密码并自动登录)。第一次接触,感觉还不错,大部分时间花在GUI的位置调整上(感觉回到了调用WinAPI的年代,呵呵)。决定翻译并开发GUI工具。先开始翻译吧。^_^

AutoIt v3 is a freeware BASIC-like scripting language designed for automating the Windows GUI and general scripting. It uses a combination of simulated keystrokes, mouse movement and window/control manipulation in order to automate tasks in a way not possible or reliable with other languages (e.g. VBScript and SendKeys). AutoIt is also very small, self-contained and will run on 95, 98, ME, NT4, 2000, XP, 2003 out of the box with no annoying “runtimes” required! You can even make compiled executable scripts that can run without AutoIt being installed!

AutoIt was initially designed for PC “roll out” situations to reliably configure thousands of PCs, but with the arrival of v3 it has become a powerful language able to cope with most scripting needs.

AutoIt can:

  • Provide a general-purpose scripting language for all Windows versions
  • Simulate keystrokes (supports most keyboard layouts)
  • Simulate mouse movements and clicks
  • Move, resize and manipulate windows
  • Interact directly with “controls” on a window (set/get text from edit controls, check boxes and radio buttons, select items in drop-down lists, etc.)
  • Create complex user interfaces (GUIs)
  • Work with the clipboard to cut/paste text items
  • Provide a scriptable RunAs function for Windows 2000/XP/2003
标签: ,

遵守创作共用协议,转载请链接形式注明来自http://bianbian.org 做人要厚道

相关日志

Posted in AutoIt3, Technology | No Comments »