WindowsMobile应用程序开发.ppt
文本预览下载声明
普通Windows Mobile应用程序开发 Windows Mobile应用开发培训 陈震邦 2009.4.18 Microsoft Windows mobile系统的特点:类似于小电脑,目前主流配置:CPU:180~600MHZ;程序内存64-128MB;ROM内存:128-256MB与其他手机系统比较优点:1、内置office系统2、含Internet、多媒体等PDA功能3、可安装卸载软件,有触摸屏等等4、支持很多硬件设备—SDRAM,USB,PCI等缺点:1、操作复杂2、对硬件要求高3、体积较大Windows mobile 软件平台分类:1、SmartPhone2、Pocket PC Windows Mobile的体系结构与特征 采用Windows兼容的Win32 API方式 使用的API和WINCE基本相同,另外还加入了Windows Mobile特有的API. 对COM/ActiveX的支持上,Windows Mobile只支持“轻量级”的COM,而且对COM的执行是在进程内完成的。 支持MFC 支持Microsoft .NET Compact Framework Windows Mobile应用开发环境和常用工具介绍 Visual studio 2005/2008 Windows mobile sdk Remote Spy Remote Heep Remote Register Editor Remote Zoom In Remote File Viewer Remote Process Viewer ActiveSync 4.5 Windows Mobile常用测试工具介绍 CETK(系统集成测试工具) Hopper(随机测试) Vsbenchmark (硬件性能测试) Visual unit(单元测试) Agenda Windows Mobile 编程考虑 Win32/MFC/WTL三种mobile上编程方式比较 设计Windows Mobile用户界面 窗口、基础控件 内核服务 文件系统 POOM MAPI Cellcore API UI自定义 Windows Mobile编程考虑 1、Win32 API 标准Win32 API的子集 部分简化的API函数 独特的Windows Mobile API函数 消息的考虑,消息通知机制 可能要修改的数据类型 Windows Mobile编程考虑 2、Windows Mobile平台和外壳考虑 屏幕大小规格 (QCIF176X220, QVGA240x320, VGA480x640) 更小的显示器、更灵活的通讯方式 平台硬件环境考虑 鼠标 ?触摸屏 键盘 ?软键盘、硬键、光标笔 Windows Mobile编程考虑 3、基于Unicode 环境 在代码中包含Tchar.h,它包含所有的字符转换函数。 使用Win32字符串函数,而不是C run-time函数。 使用TCHAR和LPTSTR进行声明。声明一个变量为TCHAR类型,用户可以编译代码为Unicode和ASCII。 使用TEXT宏来转换一个字符串。 使用Cstring 和MultiByteToWideChar( ) 转换字符串 Windows Mobile编程考虑 Unicode C-Runtime函数 ANSI string functions strlen() - query length strcpy() - copy string strcat() - concatenate string Unicode string functions wcslen() - query length wcscpy() - copy string wcscat() - concatenate string Bi-Modal string functions _tcslen() - query length _tcscpy() - copy string _tcscat() - concatenate string Windows Mobile编程考虑 Unicode C-Runtime 转换函数 Converting to Unicode Converting from Unicode Windows Mobile编程考虑 为了防止这样的错误发生,可以按照下面的代码来改写。 Windows Mobile编程考虑 4、进程 只最多支持32个进程,默认至少开启5个进程: nk.exe :内核服务 FileSys.exe:文件系统服务 GWES.exe: GUI支持 device.exe:加载和维护驱动程序 services.exe管理和停止服务
显示全部