資源簡介
使用Visual Studio 2005 C++ 寫的內存監測例子
可監測多個進程內存狀況
測試環境: Windows XP
其他: INI配置語言、托盤圖標.

代碼片段和文件信息
//?MemMonitor.cpp?:?Defines?the?class?behaviors?for?the?application.
//
#include?“stdafx.h“
#include?“MemMonitor.h“
#include?“MemMonitorDlg.h“
#ifdef?_DEBUG
#define?new?DEBUG_NEW
#endif
//?CMemMonitorApp
BEGIN_MESSAGE_MAP(CMemMonitorApp?CWinApp)
ON_COMMAND(ID_HELP?&CWinApp::onhelp)
END_MESSAGE_MAP()
//?CMemMonitorApp?construction
CMemMonitorApp::CMemMonitorApp()
{
//?TODO:?add?construction?code?here
//?Place?all?significant?initialization?in?InitInstance
}
//?The?one?and?only?CMemMonitorApp?object
CMemMonitorApp?theApp;
//?CMemMonitorApp?initialization
BOOL?CMemMonitorApp::InitInstance()
{
//?InitCommonControlsEx()?is?required?on?Windows?XP?if?an?application
//?manifest?specifies?use?of?ComCtl32.dll?version?6?or?later?to?enable
//?visual?styles.??Otherwise?any?window?creation?will?fail.
INITCOMMONCONTROLSEX?InitCtrls;
InitCtrls.dwSize?=?sizeof(InitCtrls);
//?Set?this?to?include?all?the?common?control?classes?you?want?to?use
//?in?your?application.
InitCtrls.dwICC?=?ICC_WIN95_CLASSES;
InitCommonControlsEx(&InitCtrls);
CWinApp::InitInstance();
AfxEnableControlContainer();
//?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
//?Change?the?registry?key?under?which?our?settings?are?stored
//?TODO:?You?should?modify?this?string?to?be?something?appropriate
//?such?as?the?name?of?your?company?or?organization
SetRegistryKey(_T(“Local?AppWizard-Generated?Applications“));
CMemMonitorDlg?dlg;
m_pMainWnd?=?&dlg;
INT_PTR?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;
}
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2012-03-22?22:40??MemMonitor\
?????目錄???????????0??2012-03-22?22:40??MemMonitor\ExecuteFile\
?????文件?????????257??2011-06-25?13:51??MemMonitor\ExecuteFile\History.log
?????文件?????????290??2011-06-25?13:53??MemMonitor\ExecuteFile\lang.ini
?????文件?????????290??2011-06-25?13:33??MemMonitor\ExecuteFile\langCHS.ini
?????文件?????????290??2011-06-25?13:53??MemMonitor\ExecuteFile\langCHT.ini
?????文件??????163840??2011-06-25?13:41??MemMonitor\ExecuteFile\MemMonitor.exe
?????文件?????????290??2011-06-25?13:33??MemMonitor\lang.ini
?????目錄???????????0??2012-03-22?22:41??MemMonitor\Manual\
?????文件??????261730??2011-05-21?12:11??MemMonitor\Manual\MemoryMonitorUserManual.pdf
?????文件????????2136??2011-05-20?18:35??MemMonitor\MemMonitor.cpp
?????文件?????????528??2011-05-20?18:35??MemMonitor\MemMonitor.h
?????文件????????5492??2011-06-25?13:41??MemMonitor\MemMonitor.rc
?????文件?????????884??2011-05-20?18:35??MemMonitor\MemMonitor.sln
?????文件????????6055??2011-06-25?12:47??MemMonitor\MemMonitor.vcproj
?????文件???????13924??2011-06-25?13:38??MemMonitor\MemMonitorDlg.cpp
?????文件????????1711??2011-06-25?13:21??MemMonitor\MemMonitorDlg.h
?????文件????????3798??2011-05-23?10:19??MemMonitor\MemoryMonitor.cpp
?????文件?????????300??2011-05-23?10:19??MemMonitor\MemoryMonitor.h
?????文件????????4313??2011-05-20?18:35??MemMonitor\ReadMe.txt
?????目錄???????????0??2012-03-22?22:40??MemMonitor\res\
?????文件????????1419??2011-06-25?13:33??MemMonitor\resource.h
?????文件???????99678??2011-05-16?13:31??MemMonitor\res\MemMonitor.ico
?????文件?????????401??2011-05-20?18:35??MemMonitor\res\MemMonitor.rc2
?????文件?????????210??2011-05-20?18:35??MemMonitor\stdafx.cpp
?????文件????????2864??2011-05-20?18:35??MemMonitor\stdafx.h
?????文件????????6674??2012-03-22?22:41??MemMonitor\STLIniFile.h
?????文件????????6796??2011-04-14?14:45??MemMonitor\TrayIcon.cpp
?????文件????????1875??2011-04-14?14:45??MemMonitor\TrayIcon.h
?????文件????????2132??2011-06-25?12:59??MemMonitor\utility.cpp
?????文件?????????628??2011-06-25?12:12??MemMonitor\utility.h
............此處省略0個文件信息
- 上一篇:RANSAC算法 C++實現
- 下一篇:計算機圖形學大作業 二維圖形變換
評論
共有 條評論