我想写个.exe,它的作用是每月1号提醒我做一件很重要的事。
请问各位大虾该怎么写啊!

解决方案 »

  1.   

    SYSTEMTIME st;
    GetSystemTime(&st);
    if (st.wDay == 1)
      // ...
      

  2.   

    CTime m_time; 
    if( m_time .GetDay ()==1)
    {
      add your code
    }
      

  3.   

    简单例子
    #include <windows.h>
    VOID CALLBACK TimerProc(
      HWND hwnd,         // handle to window
      UINT uMsg,         // WM_TIMER message
      UINT_PTR idEvent,  // timer identifier
      DWORD dwTime       // current system time
    )
    {
    SYSTEMTIME Time;
    GetLocalTime(&Time); if(Time.wDay==1)
    {
    if(MessageBox(NULL,"有很重要的事哦!不用再提醒了吧.","提醒",MB_YESNO)==IDYES)
    {
    PostQuitMessage(0);
    }
    }
    }int APIENTRY WinMain(HINSTANCE hInstance,
                         HINSTANCE hPrevInstance,
                         LPSTR     lpCmdLine,
                         int       nCmdShow)
    {
      // TODO: Place code here.
    SetTimer(NULL,0,180000,(TIMERPROC)TimerProc);
    MSG msg;
    while(GetMessage(&msg,NULL,0,0))
    {
    TranslateMessage(&msg);
    DispatchMessage(&msg);
    }
    return 0;
    }