   Sending a delayed windows message
  I came up with a method to post a "delayed" message in win32, however id rather one that didnt require a temporary thread, are there any other ways?//DELAYED MESSAGEstruct PostMessageDelayedInfo{HWND   hwnd;UINT   msg;WPARAM wParam;LPARAM lParam;DWORD  delay;};static unsigned __stdcall PostMessageDelayedReal(void *a){PostMessageDelayedInfo *info = (PostMessageDelayedInfo*)a;Sleep(info->delay);PostMessage(info->hwnd, info->msg, info->wParam, info->lParam);delete info;return 0;}void PostMessageDelayed(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam, DWORD delay){PostMessageDelayedInfo *info = new PostMessageDelayedInfo;info->hwnd   = hwnd;info->msg    = msg;info->wParam = wParam;info->lParam = lParam;info->delay  = delay;_beginthreadex(0,0, &PostMessageDelayedReal, (void*)info, 0,0);}
  Why on earth would you want to do this? If you absolutely need to send delayed messages, what's wrong with having a std::vector of pending messages somewhere, and checking if it's time to send one every tick?   