📄 329-333.html
字号:
<option value="/reference/whatsnew.html">New Titles
<option value="">-----------
<option value="/reference/dir.archive1.html">Free Archive
</SELECT>
</font></td>
</tr>
</table>
</form>
<!-- LEFT NAV SEARCH END -->
</td>
<!-- PUB PARTNERS END -->
<!-- END LEFT NAV -->
<td rowspan="8" align="right" valign="top"><img src="/images/iswbls.gif" width=1 height=400 alt="" border="0"></td>
<td><img src="/images/white.gif" width="5" height="1" alt="" border="0"></td>
<!-- end of ITK left NAV -->
<!-- begin main content -->
<td width="100%" valign="top" align="left">
<!-- END SUB HEADER -->
<!--Begin Content Column -->
<FONT FACE="Arial,Helvetica" SIZE="-1">
To access the contents, click the chapter and section titles.
</FONT>
<P>
<B>Essential Windows CE Application Programming</B>
<FONT SIZE="-1">
<BR>
<I>(Publisher: John Wiley & Sons, Inc.)</I>
<BR>
Author(s): Robert Burdick
<BR>
ISBN: 0471327476
<BR>
Publication Date: 03/01/99
</FONT>
<P>
<form name="Search" method="GET" action="http://search.earthweb.com/search97/search_redir.cgi">
<INPUT TYPE="hidden" NAME="Action" VALUE="Search">
<INPUT TYPE="hidden" NAME="SearchPage" VALUE="http://search.earthweb.com/search97/samples/forms/srchdemo.htm">
<INPUT TYPE="hidden" NAME="Collection" VALUE="ITK">
<INPUT TYPE="hidden" NAME="ResultTemplate" VALUE="itk-simple-intrabook.hts">
<INPUT TYPE="hidden" NAME="ViewTemplate" VALUE="view.hts">
<font face="arial, helvetica" size=2><b>Search this book:</b></font><br>
<INPUT NAME="queryText" size=50 VALUE=""> <input type="submit" name="submitbutton" value="Go!">
<INPUT type=hidden NAME="section_on" VALUE="on">
<INPUT type=hidden NAME="section" VALUE="http://www.itknowledge.com/reference/standard/0471327476/">
</form>
<!-- Empty Reference Subhead -->
<!--ISBN=0471327476//-->
<!--TITLE=Essential Windows CE Application Programming//-->
<!--AUTHOR=Robert Burdick//-->
<!--PUBLISHER=John Wiley & Sons, Inc.//-->
<!--IMPRINT=Wiley Computer Publishing//-->
<!--CHAPTER=13//-->
<!--PAGES=329-333//-->
<!--UNASSIGNED1//-->
<!--UNASSIGNED2//-->
<CENTER>
<TABLE BORDER>
<TR>
<TD><A HREF="../ch12/325-328.html">Previous</A></TD>
<TD><A HREF="../ewtoc.html">Table of Contents</A></TD>
<TD><A HREF="333-338.html">Next</A></TD>
</TR>
</TABLE>
</CENTER>
<P><BR></P>
<H2><A NAME="Heading1"></A><FONT COLOR="#000077">Chapter 13<BR>Palm-size PC Input Techniques
</FONT></H2>
<P><BIG><BIG>T</BIG></BIG>raditional computing devices such as personal computers get a large amount of their user input from a keyboard. Composing e-mail, writing documents in a word processor, or even simply entering a password typically requires keyboard input.</P>
<P>But Windows CE-based devices are not required to have a keyboard. For example, users of Palm-size PCs are very comfortable using these devices without a keyboard. Despite the presence of a software keyboard that can be invoked at any time, the majority of user input gets to a Palm-size PC via the stylus, navigation buttons, or even voice.</P>
<BLOCKQUOTE>
<P><FONT SIZE="-1"><HR><B>AFTER COMPLETING THIS CHAPTER YOU WILL KNOW HOW TO …</B>
<DL>
<DD><B>Use the rich ink control</B>
<DD><B>Program Palm-size PC navigation buttons</B>
<DD><B>Use the voice recorder control</B>
</DL>
<HR></FONT>
</BLOCKQUOTE>
<P>This chapter also introduces the Palm-size PC emulation environment for the first time. If you have installed the Palm-size PC SDK, you are able to build applications for the Palm-size PC target. The Palm-size PC emulation environment is shown in Figure 13.1.
</P>
<P><A NAME="Fig1"></A><A HREF="javascript:displayWindow('images/13-01.jpg',240,320 )"><IMG SRC="images/13-01t.jpg"></A>
<BR><A HREF="javascript:displayWindow('images/13-01.jpg',240,320)"><FONT COLOR="#000077"><B>Figure 13.1</B></FONT></A> The Palm-size PC emulation environment.</P>
<H3><A NAME="Heading2"></A><FONT COLOR="#000077">The Rich Ink Control</FONT></H3>
<P>To get our feet wet, we begin this chapter with a discussion of the rich ink control. This control is the easiest way for a Palm-size PC application to provide rudimentary stylus input capability.
</P>
<P>As usual, our discussion is motivated by a simple sample application. INK.EXE is the application that results from building the project in the \Samples\ink directory on the companion CD. This application allows users to enter inking input and save such input to files in the object store. It also gives users the option of opening and displaying such files. Figure 13.2 shows the INK.EXE application in action.</P>
<P><A NAME="Fig2"></A><A HREF="javascript:displayWindow('images/13-02.jpg',240,320 )"><IMG SRC="images/13-02t.jpg"></A>
<BR><A HREF="javascript:displayWindow('images/13-02.jpg',240,320)"><FONT COLOR="#000077"><B>Figure 13.2</B></FONT></A> Using the rich ink control.</P>
<P>The application allows users to save inking input to files with the .ink extension. This feature is implemented using the Save As common dialog. (Refer to Chapter 3 for an overview of programming the Windows CE common dialogs.) Users invoke the save feature by selecting the Save Ink File option from the File menu, as shown in Figure 13.3.
</P>
<P><A NAME="Fig3"></A><A HREF="javascript:displayWindow('images/13-03.jpg',240,320 )"><IMG SRC="images/13-03t.jpg"></A>
<BR><A HREF="javascript:displayWindow('images/13-03.jpg',240,320)"><FONT COLOR="#000077"><B>Figure 13.3</B></FONT></A> The Save Ink File menu option.</P>
<P>Invoking this menu option displays the Save As dialog, which lets the user specify the name and location of the file in which to save the inking data. Figure 13.4 shows the Save As dialog as it appears after the Create In button has been pressed. By default, INK.EXE saves files in a directory called \MyDocuments\InkFiles.
</P>
<P><A NAME="Fig4"></A><A HREF="javascript:displayWindow('images/13-04.jpg',240,320 )"><IMG SRC="images/13-04t.jpg"></A>
<BR><A HREF="javascript:displayWindow('images/13-04.jpg',240,320)"><FONT COLOR="#000077"><B>Figure 13.4</B></FONT></A> Saving an inking input file.</P>
<P>The Open Ink File option of the File menu lets the user open and display an existing .ink file. This option displays an Open File common dialog to allow the user to choose which .ink file to open.
</P>
<P><FONT SIZE="+1"><B>Rich Ink Control Features</B></FONT></P>
<P>The rich ink control is actually implemented as an edit control that includes inking support. A user can type into a rich ink control using the Palm-size PC soft keyboard to enter regular text, as shown in Figure 13.5.
</P>
<P><A NAME="Fig5"></A><A HREF="javascript:displayWindow('images/13-05.jpg',240,320 )"><IMG SRC="images/13-05t.jpg"></A>
<BR><A HREF="javascript:displayWindow('images/13-05.jpg',240,320)"><FONT COLOR="#000077"><B>Figure 13.5</B></FONT></A> Entering text from the soft keyboard.</P>
<P>The rich ink control also includes a command bar containing a menu of options. This command bar can be shown by pressing the large Restore button that appears at the bottom right of the control’s client area. Pressing the Restore button when the command bar is visible hides the command bar.
</P>
<P>This command bar can also be hidden or shown programmatically by your application, as we will discuss later.</P>
<P>The menu contained by this command bar provides various options for customizing the rich ink control. For example, one of the options on the Edit menu is called Format. Choosing this option invokes the dialog box shown in Figure 13.7. This dialog allows the user to specify various options related to the color and size of the pen used for inking.</P><P><BR></P>
<CENTER>
<TABLE BORDER>
<TR>
<TD><A HREF="../ch12/325-328.html">Previous</A></TD>
<TD><A HREF="../ewtoc.html">Table of Contents</A></TD>
<TD><A HREF="333-338.html">Next</A></TD>
</TR>
</TABLE>
</CENTER>
<!-- all of the reference materials (books) have the footer and subfoot reveresed -->
<!-- reference_subfoot = footer -->
<!-- reference_footer = subfoot -->
<!-- BEGIN SUB FOOTER -->
<br><br>
</TD>
</TR>
</TABLE>
<table width="640" border=0 cellpadding=0 cellspacing=0>
<tr>
<td align="left" width=135><img src="/images/white.gif" width=100 height="1" alt="" border="0"></td>
<!-- END SUB FOOTER -->
<!-- all of the books have the footer and subfoot reveresed -->
<!-- reference_subfoot = footer -->
<!-- reference_footer = subfoot -->
<!-- FOOTER -->
<td width="515" align="left" bgcolor="#FFFFFF">
<font face="arial, helvetica" size="1"><b><a href="/products.html"><font color="#006666">Products</font></a> | <a href="/contactus.html"><font color="#006666">Contact Us</font></a> | <a href="/aboutus.html"><font color="#006666">About Us</font></a> | <a href="http://www.earthweb.com/corporate/privacy.html" target="_blank"><font color="#006666">Privacy</font></a> | <a href="http://www.itmarketer.com/" target="_blank"><font color="#006666">Ad Info</font></a> | <a href="/"><font color="#006666">Home</font></a></b>
<br><br>
Use of this site is subject to certain <a href="/agreement.html">Terms & Conditions</a>, <a href="/copyright.html">Copyright © 1996-1999 EarthWeb Inc.</a><br>
All rights reserved. Reproduction whole or in part in any form or medium without express written permision of EarthWeb is prohibited.</font><p>
</td>
</tr>
</table>
</BODY>
</HTML>
<!-- END FOOTER -->
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -