Important Notice
The pages on this site contain documentation for very old MS-DOS software,
purely for historical purposes.
If you're looking for up-to-date documentation, particularly for programming,
you should not rely on the information found here, as it will be woefully
out of date.
WinStartTimer (1.2)
◄Function Group► ◄Overview► ◄Up► ◄Next► ◄Previous►
────────────────────────────────────────────────────────────────────────────
#define INCL_WINTIMER
USHORT WinStartTimer(hab, hwnd, idTimer, dtTimeout)
HAB hab; /* handle of the anchor block */
HWND hwnd; /* handle of the window */
USHORT idTimer; /* timer identifier */
USHORT dtTimeout; /* time-out value */
The WinStartTimer function starts a timer. A time-out value is specified,
and every time a time-out occurs, a WM_TIMER message is posted to the
specified window.
A second call to WinStartTimer for a timer that already exists will reset
that timer.
Parameter Description
────────────────────────────────────────────────────────────────────────────
hab Identifies the anchor block.
hwnd Identifies the window that is part of the timer identification.
If the hwnd parameter is NULL, then the idTimer parameter is
ignored and WinStartTimer returns a unique nonzero identification
value that identifies the timer. The timer message is posted in
the queue associated with the current thread, with the hwnd
parameter equal to NULL.
idTimer Identifies the timer. If hwnd is NULL, this parameter is
ignored.
dtTimeout Specifies the timer delay, in milliseconds. A dtTimeout value of
zero will cause the timer to time out as fast as possible;
generally, this is about 1/18 of a second.
Return Value
The return value is TRUE if the function is successful and if hwnd is not
NULL. Otherwise, it is FALSE, indicating that an error occurred. If hwnd is
NULL, the return value is a unique nonzero value, or zero if an error
occurs.
Comments
If the hwnd parameter is NULL, then the return value from this function must
be used as the idTimer parameter in any subsequent call to WinStopTimer.
See Also
WinStopTimer
♦