📄 131-132.html
字号:
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=5//-->
<!--PAGES=131-132//-->
<!--UNASSIGNED1//-->
<!--UNASSIGNED2//-->
<CENTER>
<TABLE BORDER>
<TR>
<TD><A HREF="127-131.html">Previous</A></TD>
<TD><A HREF="../ewtoc.html">Table of Contents</A></TD>
<TD><A HREF="132-137.html">Next</A></TD>
</TR>
</TABLE>
</CENTER>
<P><BR></P>
<P><FONT SIZE="+1"><B>Date Time Picker Control Messages and Notifications</B></FONT></P>
<P>Tables 5.4 and 5.5 give a complete list of date time picker control messages and notifications, along with their meanings.
</P>
<TABLE WIDTH="100%" BORDER RULES="ROWS"><CAPTION ALIGN=LEFT><B>Table 5.4</B> Date Time Picker Control Messages
<TR>
<TH WIDTH="25%" ALIGN="LEFT">MESSAGE
<TH WIDTH="75%" ALIGN="LEFT">MEANING
<TR>
<TD VALIGN="TOP">DTM_GETMCCOLOR
<TD>Retrieves the color of the specified part of the month calendar child control contained by the date time picker. Message is only supported for date time pickers that do not have the DTS_UPDOWN style bit set, i.e., that have month calendar controls. Compare to MCM_GETCOLOR.
<TR>
<TD VALIGN="TOP">DTM_GETMCFONT
<TD>Retrieves the font currently in use by the month calendar child control contained by the date time picker. Message is only supported for date time pickers that do not have the DTS_UPDOWN style bit set.
<TR>
<TD VALIGN="TOP">DTM_GETMONTHCAL
<TD>Retrieves the HWND of the month calendar child control contained by the date time picker. Only supported for date time pickers that do not have the DTS_UPDOWN style bit set.
<TR>
<TD VALIGN="TOP">DTM_GETRANGE
<TD>Message gets the range of date time values that the date time picker can display.
<TR>
<TD VALIGN="TOP">DTM_GETSYSTEMTIME
<TD>Retrieves the time currently displayed in the date time picker. Time is returned as a SYSTEMTIME.
<TR>
<TD VALIGN="TOP">DTM_SETFORMAT
<TD>Message sets the date time picker control’s display format string.
<TR>
<TD VALIGN="TOP">DTM_SETMCCOLOR
<TD>Message sets the color of the specified part of the month calendar child control contained by the date time picker. Message is only supported for date time pickers that do not have the DTS_UPDOWN style bit set. Compare to MCM_SETCOLOR.
<TR>
<TD VALIGN="TOP">DTM_SETMCFONT
<TD>Message sets the font used by the month calendar child control contained by the date time picker. Message is only supported for date time pickers that do not have the DTS_UPDOWN style bit set.
<TR>
<TD VALIGN="TOP">DTM_SETRANGE
<TD>Message sets the range of date time values that the date time picker can display.
<TR>
<TD VALIGN="TOP">DTM_SETSYSTEMTIME
<TD>Message sets the date and time to be displayed by the date time picker.
</TABLE>
<P>
</P>
<TABLE WIDTH="100%" BORDER RULES="ROWS"><CAPTION ALIGN=LEFT><B>Table 5.5</B> Date Time Picker Control Notifications
<TR>
<TH WIDTH="25%" ALIGN="LEFT">NOTIFICATION
<TH WIDTH="75%" ALIGN="LEFT">MEANING
<TR>
<TD VALIGN="TOP">DTN_CLOSEUP
<TD>Sent by the control when the user closes the drop-down month calendar child control contained by the date time picker. Only applicable to date time pickers that do not have the DTS_UPDOWN style bit set.
<TR>
<TD VALIGN="TOP">DTN_DATETIMECHANGE
<TD>Sent by the control whenever the date time display changes.
<TR>
<TD VALIGN="TOP">DTN_DROPDOWN
<TD>Sent by the control when the user opens the drop-down month calendar child control contained by the date time picker. Only applicable to date time pickers that do not have the DTS_UPDOWN style bit set.
<TR>
<TD VALIGN="TOP">DTN_FORMAT
<TD>Sent by the control for each callback field in a format string. The application responds by providing the text to display in the callback fields.
<TR>
<TD VALIGN="TOP">DTN_FORMATQUERY
<TD>Sent by the control for each callback field in a format string. The application responds by specifying the maximum pixel width of the text that can be displayed in the corresponding callback field.
<TR>
<TD VALIGN="TOP">DTN_USERSTRING
<TD>Sent by the control after the user edits text in the date time picker’s date time display.
<TR>
<TD VALIGN="TOP">DTN_WMKEYDOWN
<TD>Sent by the control whenever the user types in a callback field. Responding to this notification allows the control owner to implement custom behavior for keystrokes such as arrow keys.
</TABLE>
<P><FONT SIZE="+1"><B>The Complete Sample Application</B></FONT></P>
<P>I’ll be the first to admit that this application won’t be making any headlines, but it will help make you more familiar with how to use date time picker controls.
</P>
<P><B>datetime.h</B></P>
<!-- CODE //-->
<PRE>
#ifndef __DATETIME_H_
#define __DATETIME_H_
//Child control IDs
#define IDC_EXIT 1024
#define IDC_DATETIME 1025
TCHAR pszAppName[] = TEXT("DATETIMESAMPLE");
TCHAR pszTitle[] = TEXT("Windows CE Date Time Control");
HINSTANCE ghInst;
int nWidth; //Main window width
int nHeight; //Main window height
/* Define the various windows used in this application:
hwndMain —> The main application window.
hwndExit —> Exit button
hwndDateTime —> Date time picker control
*/
HWND hwndMain;
HWND hwndExit;
HWND hwndDateTime;
LRESULT CALLBACK WndProc(HWND hwnd,
UINT message,
WPARAM wParam,
LPARAM lParam);
#endif
</PRE>
<!-- END CODE //-->
<P><BR></P>
<CENTER>
<TABLE BORDER>
<TR>
<TD><A HREF="127-131.html">Previous</A></TD>
<TD><A HREF="../ewtoc.html">Table of Contents</A></TD>
<TD><A HREF="132-137.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 + -