Menu

TIme

2003-01-13
2012-09-26
  • Nobody/Anonymous

    How to get the windows' time in win32

     
    • Nobody/Anonymous

      Maybe like this....

      #include <windows.h>

      int WINAPI
      WinMain (HINSTANCE hThisI, HINSTANCE hPrevI, LPSTR arg, int style)
      {
      SYSTEMTIME time;
      char timestring[20];

      GetLocalTime (&time);
      wsprintf (timestring, "%02u:%02u.%02u", time.wHour, time.wMinute, time.wSecond);

      MessageBox(NULL,timestring,"timebox",MB_OK);
      }

      /Roger

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.