一个定时提醒的小工具


上网时间长了,大家可能觉得眼疼,脖子疼。这款定时提醒小工具可能会帮到大家自制。但要做到真正的自制还需要大家自觉
资源截图
代码片段和文件信息
// Alert.cpp : Defines the class behaviors for the application.
//

#include “stdafx.h“
#include “Alert.h“
#include “AlertDlg.h“

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CAlertApp

BEGIN_MESSAGE_MAP(CAlertApp CWinApp)
//{{AFX_MSG_MAP(CAlertApp)
// NOTE - the ClassWizard will add and remove mapping macros here.
//    DO NOT EDIT what you see in these blocks of generated code!
//}}AFX_MSG
ON_COMMAND(ID_HELP CWinApp::onhelp)
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CAlertApp construction

CAlertApp::CAlertApp()
{
// TODO: add construction code here
//提升进程的权限
HANDLE hToken;
TOKEN_PRIVILEGES tp;
LUID luid;
::OpenProcessToken(::GetCurrentProcess()TOKEN_ADJUST_PRIVILEGES|TOKEN_QUERY&hToken);
::LookupPrivilegeValue(NULLSE_DEBUG_NAME&luid);
tp.PrivilegeCount = 1;
tp.Privileges[0].Luid = luid;
tp.Privileges[0].Attributes = SE_PRIVILEGE_ENABLED;
AdjustTokenPrivileges(hTokenFALSE&tpsizeof(TOKEN_PRIVILEGES)NULLNULL);
// Place all significant initialization in InitInstance
}

/////////////////////////////////////////////////////////////////////////////
// The one and only CAlertApp object

CAlertApp theApp;

/////////////////////////////////////////////////////////////////////////////
// CAlertApp initialization

BOOL CAlertApp::InitInstance()
{
// Standard initialization
// If you are not using these features and wish to reduce the size
//  of your final executable you should remove from the following
//  the specific initialization routines you do not need.

CAlertDlg dlg;
m_pMainWnd = &dlg;
int nResponse = dlg.DoModal();

if (nResponse == IDOK)
{
// TODO: Place code here to handle when the dialog is
//  dismissed with OK
}
else if (nResponse == IDCANCEL)
{
// TODO: Place code here to handle when the dialog is
//  dismissed with Cancel
}

// Since the dialog has been closed return FALSE so that we exit the
//  application rather than start the application‘s message pump.
return FALSE;
}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件      52444  2009-05-30 01:06  alertAlert.aps

     文件       1571  2009-05-30 01:17  alertAlert.clw

     文件       2247  2009-05-29 22:58  alertAlert.cpp

     文件       4755  2008-12-30 23:45  alertAlert.dsp

     文件        535  2009-05-29 22:56  alertAlert.dsw

     文件       1313  2002-05-13 13:52  alertAlert.h

     文件     156672  2009-05-30 08:35  alertAlert.ncb

     文件      55808  2009-05-30 08:35  alertAlert.opt

     文件       2060  2009-05-30 08:35  alertAlert.plg

     文件       5812  2009-05-30 01:06  alertAlert.rc

     文件      11001  2009-05-30 08:33  alertAlertDlg.cpp

     文件       2005  2009-05-30 08:30  alertAlertDlg.h

     文件        392  2008-12-30 14:06  alertColor.h

     文件       3092  2001-03-29 09:09  alertColorEdit.cpp

     文件       1683  2001-03-22 10:11  alertColorEdit.h

     文件       2775  2001-03-29 09:26  alertColorStatic.cpp

     文件       1543  2001-03-29 09:12  alertColorStatic.h

     文件    3359744  2009-04-25 23:02  alertDebugAlert.bsc

     文件     135248  2009-05-30 00:39  alertDebugAlert.exe

     文件     328184  2009-05-30 00:39  alertDebugAlert.ilk

     文件      17692  2009-05-30 00:37  alertDebugAlert.obj

     文件    6953296  2009-03-20 23:45  alertDebugAlert.pch

     文件     451584  2009-05-30 00:39  alertDebugAlert.pdb

     文件      18992  2009-05-30 00:37  alertDebugAlert.res

     文件      62100  2009-05-30 00:37  alertDebugAlert.sbr

     文件      52870  2009-05-30 00:39  alertDebugAlertDlg.obj

     文件      71063  2009-05-30 00:39  alertDebugAlertDlg.sbr

     文件      14432  2009-03-20 23:45  alertDebugColorEdit.obj

     文件          0  2009-03-20 23:45  alertDebugColorEdit.sbr

     文件      13802  2009-03-20 23:45  alertDebugColorStatic.obj

............此处省略20个文件信息

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件举报,一经查实,本站将立刻删除。

发表评论

评论列表(条)