微波EDA网,见证研发工程师的成长!
首页 > 硬件设计 > 嵌入式设计 > 定制 Windows CE .NET 用户界面

定制 Windows CE .NET 用户界面

时间:02-24 来源:互联网 点击:

Mike Hall
Microsoft Corporation

Steve Maillet
Entelechy Consulting

April 4, 2002

// interface翻译成界面,部分时候翻译成接口

(没有全文翻译,只是摘记了一些有用的信息,和自己的一些理解)

WinCE 的UI是skinnable。

Recently, while preparing for a talk at an Embedded event, a bullet point in my presentation seemed to beg for elaboration: the skinnable UI for Microsoft? Windows? CE .NET. I had talked to this point at a number of conferences, but had spent little time playing with the code to produce a customized UI. Since I had a few moments in the speaker lounge (and also an article to write), it seemed a good time to take a look at how the UI can be customized for Windows CE. On my wish list: customized screen colors, Windows controls that don't look like they belong to Windows, an OK/Close button in the non-client area that looks like a smiley face, a replacement shell (perhaps based on Microsoft? Internet Explorer 5.5 browser), and a shiny bike with basket and bell for Christmas...

Okay, so on with the article; let's see what's lurking beneath the hood of the Windows CE UI.

Windows CE .NET 提供为你的嵌入式设计定制用户界面的能力。如 POS terminals, ATM machines, or other 'fixed function' devices。也可以用Internet 浏览器和应用程序.以前版本的WINCE也可以定制用户界面,但带有明显的WINDOWS外观和感觉。现在WINCE 。NET改变了这个。

这里有一些选择,在为一个Windows CE .NET 设备定制界面时:

· 使用 Microsoft Internet Explorer 作为设备的shell. 这是一个非常弹性的选择。使用HTML(和DHTML)编制高度定制化的用户界面是快速的,简单的和弹性的。可以充分利用位图,动画,动态。

· 创建一个独立的应用程序来取代标准shell。在概念上,这个和使用IE是类似的。是一个很好的选择在一个功能单一的设备上,如点销售终端(point-of-sale terminal)上。 It's possible to change the appearance of controls within an application by subclassing the control, which is achieved through GetWindowLong( ) and SetWindowLong( ) API's. (Feel free to check out any of the number of articles on MSDN that discuss subclassing.)

· 在操作系统里改变某些用户界面组件的外观。可以通过改变位图和代码来实现。

Microsoft在Windows CE .NET中提供了2种皮肤: Windows 95 外观和Windows XP 外观. 这些分别为通用控件,windows控件,和非客户区提供windows外观。“皮肤”文件 在下面文件夹处:

\WINCE420\PUBLIC\COMMON\OAK\DRIVERS\SKINNABLEUI.

在skinnableui 文件夹下提供的代码可以改动(因为是在public树下),可以被你的设备所采用。

Take a look in the skinnableui folder. There are two sets of user interface components: GWE/COMMCTRL (Windows 95 appearance) and GWEXP/COMMCTRLXP (Windows XP).

Here's how we choose which of the 'skins' is applied to our device:

1. Build an operating system image using the default catalog options; this will give a Windows 95 appearance.

2. 从catalog里选择Windows XP skin。在 Core O/S/Display Based Devices/Shell and User Interface/User Interface/Customizable UI/Windows XP-like sample skin. 加这个组件到平台里,或者设置the SYSGEN_XPSKIN 环境变量.

How do these skins differ? Let's take a look at some of the UI differences. We can then take a look at how to further customize the Windows CE .NET user interface.


Figure 1. Windows 95 外观,使用标准皮肤。


Figure 2. Windows XP 外观, 使用XP-风格皮肤。

Let's now examine how we modify the Windows CE .NET user interface. This includes:

· Changing the user interface colors.

· Modifying user interface bitmaps.

· Modifying Windows CE .NET controls appearance.

· Modifying standard UI dialogs (for instance, Startupwhich can be used to show device configuration or password screen, Out of Memory, and Touch Screen Calibration).

· Using Internet Explorer as the shell of our device.

Changing th

Copyright © 2017-2020 微波EDA网 版权所有

网站地图

Top