// Collection of code snippets by Arne Vajhøj 
// (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) 
#include <iostream>

using namespace std;

#include <windows.h>

VOID CALLBACK sayhello(HWND hWnd, UINT nMsg, UINT nIDEvent, DWORD dwTime)
{
    cout << "Hello" << endl;
}

int main()
{
    UINT id = SetTimer(NULL, 0, 1000, sayhello);
    // necesarry to get the timer called
    for(int i = 0; i < 10; i++)
    {
        MSG msg;
        GetMessage(&msg, NULL, 0, 0);
        DispatchMessage(&msg);
    }
    KillTimer(NULL, id);
    return 0;
}
