/*
 * Window Procedure fragments to test TimerCount documentation
 *      bug in Windows API
 * Written by Leor Zolman, 2/93
 */

/* Declarations at top of Window Procedure: */

    TIMERINFO lpti;
    char timetext[100];

/* Code to be placed in WM_CREATE processing section: */

 case WM_CREATE:

    lpti.dwSize = sizeof (TIMERINFO);

    while (1)
    {
        if (!TimerCount(&lpti))
            MessageBox(hwnd, "Error running TimerCount!",
                "TimerCount Test", MB_OK);

        sprintf(timetext, "SinceStart = %ld", lpti.dwmsSinceStart);

        if (MessageBox(hwnd, timetext,
                "TimerCount test", MB_OKCANCEL) == IDCANCEL)
            break;
    }

	/* ... */
