?? starting.html
字號:
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="GENERATOR" content="/www/htdocs/earthwalkdesigns//earcgi/EWDHtml.cgi">
<!-- -->
<!-- ******************************************* -->
<!-- * * -->
<!-- * EarthWalk Designs Programming Services. * -->
<!-- * WWW.EarthWalkDesigns.Com * -->
<!-- * * -->
<!-- * Jay Wheeler (Jay@EarthWalkDesigns.com) * -->
<!-- * December 1997 * -->
<!-- * * -->
<!-- ******************************************* -->
<!-- -->
<!-- This page was designed by Jay Wheeler. -->
<title>MFC Timers - A Tutorial</title>
</head>
<body bgcolor="#ffffff" text="#000000" link="#990033" vlink="#333399" alink="#ff0000">
<font size=" 3 " face=" Century Schoolbook ">
<center>
<a href="http://www.earthwalkdesigns.com"><img src="EarthWalk.gif" border="0" align="center" ></a>
<br>
<font size="+2">
<b>MFC Timers - A Tutorial
</b></font>
<br>
<img src="Colorbar.gif" border="0" align="center" ><br>
</center>
<b><u>Starting the timer</u></b>
<p>
To start the timer, you must issue a <b><i>SetTimer</i></b> command:
<p>
<ul>
<i>t-number</i><b> = SetTimer (</b><i>t-message</i><b>,
</b><i>t-interval</i><b>, NULL)</b>
</ul>
<p>
<i><b>where</b></i>:
<ul>
<table>
<tr>
<td valign=top>
<i>t-message</i>
<td>
The message number assigned for processing the timer request.
<br>
This is referred to as <b>IDT_TIMER_0</b> in the
<a href="Install.html">installation</a>
instructions.
<tr>
<td valign=top>
<i>t-interval</i>
<td>
The timer duration, in mSec.
<tr>
<td valign=top>
<i>t-number</i>
<td>
The system timer number assigned to this event, or 0 if no timers available.
</table>
</ul>
<p>
<b>For Example:</b>
<p>
<ul>
<pre>
UINT StartTimer (UINT TimerDuration)
{
UINT TimerVal;
TimerVal = SetTimer (IDT_TIMER_0, TimerDuration, NULL);
if (TimerVal == 0)
{
MessageBox ("Unable to obtain timer","IDT_TIMER_0",MB_OK|MB_SYSTEMMODAL);
}
return TimerVal;
}// end StartTimer
</pre>
To start the timer, pass it the value of the timer duration, in milliseconds (mSec). If
the returned value is non-zero, the timer has been initialized.
<p>
<b>Note:</b> You must save the assigned timer value in order to stop the timer, and also
to know which timer to process in a multi-timer application.
<p>
</ul>
<p>
<center>
<img src="Colorbar.gif" border="0" align="center" ><br>
</center>
<font size="-1">
Copyright (c) 1997,1998. EarthWalk Designs.
<br>
Direct all inquiries to:<a href="mailto:jay@earthwalkdesigns.com">Jay Wheeler</a>
at EarthWalkDesigns.com
</font>
</p><br></font></body>
</html>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -