400 lines
15 KiB
Plaintext
400 lines
15 KiB
Plaintext
/*
|
|
* Task Manager
|
|
*
|
|
* Copyright 1999-2001 Brian Palmer
|
|
*
|
|
*
|
|
* This library is free software; you can redistribute it and/or
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
* License as published by the Free Software Foundation; either
|
|
* version 2.1 of the License, or (at your option) any later version.
|
|
*
|
|
* This library is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
* Lesser General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
* License along with this library; if not, write to the Free Software
|
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
|
*/
|
|
|
|
#include "resource.h"
|
|
|
|
#pragma code_page(65001)
|
|
|
|
LANGUAGE LANG_ENGLISH, SUBLANG_DEFAULT
|
|
|
|
/*
|
|
Menus
|
|
*/
|
|
|
|
IDR_TASKMANAGER MENU
|
|
BEGIN
|
|
POPUP "&File"
|
|
BEGIN
|
|
MENUITEM "&New Task (Run...)", ID_FILE_NEW
|
|
MENUITEM SEPARATOR
|
|
MENUITEM "E&xit Task Manager", ID_FILE_EXIT
|
|
END
|
|
POPUP "&Options"
|
|
BEGIN
|
|
MENUITEM "&Always On Top", ID_OPTIONS_ALWAYSONTOP
|
|
, CHECKED
|
|
MENUITEM "&Minimize On Use", ID_OPTIONS_MINIMIZEONUSE
|
|
, CHECKED
|
|
MENUITEM "&Hide When Minimized", ID_OPTIONS_HIDEWHENMINIMIZED
|
|
, CHECKED
|
|
MENUITEM "&Show 16-bit tasks", ID_OPTIONS_SHOW16BITTASKS
|
|
, CHECKED
|
|
END
|
|
POPUP "&View"
|
|
BEGIN
|
|
MENUITEM "&Refresh Now", ID_VIEW_REFRESH
|
|
POPUP "&Update Speed"
|
|
BEGIN
|
|
MENUITEM "&High", ID_VIEW_UPDATESPEED_HIGH
|
|
MENUITEM "&Normal", ID_VIEW_UPDATESPEED_NORMAL
|
|
, CHECKED
|
|
MENUITEM "&Low", ID_VIEW_UPDATESPEED_LOW
|
|
MENUITEM "&Paused", ID_VIEW_UPDATESPEED_PAUSED
|
|
|
|
END
|
|
MENUITEM SEPARATOR
|
|
MENUITEM "Lar&ge Icons", ID_VIEW_LARGE
|
|
MENUITEM "S&mall Icons", ID_VIEW_SMALL
|
|
MENUITEM "&Details", ID_VIEW_DETAILS, CHECKED
|
|
MENUITEM "&Select Columns...", ID_VIEW_SELECTCOLUMNS
|
|
POPUP "&CPU History"
|
|
BEGIN
|
|
MENUITEM "&One Graph, All CPUs", ID_VIEW_CPUHISTORY_ONEGRAPHALL
|
|
|
|
MENUITEM "One Graph &Per CPU", ID_VIEW_CPUHISTORY_ONEGRAPHPERCPU
|
|
, CHECKED
|
|
END
|
|
MENUITEM "&Show Kernel Times", ID_VIEW_SHOWKERNELTIMES
|
|
END
|
|
POPUP "&Windows"
|
|
BEGIN
|
|
MENUITEM "Tile &Horizontally", ID_WINDOWS_TILEHORIZONTALLY
|
|
MENUITEM "Tile &Vertically", ID_WINDOWS_TILEVERTICALLY
|
|
MENUITEM "&Minimize", ID_WINDOWS_MINIMIZE
|
|
MENUITEM "Ma&ximize", ID_WINDOWS_MAXIMIZE
|
|
MENUITEM "&Cascade", ID_WINDOWS_CASCADE
|
|
MENUITEM "&Bring To Front", ID_WINDOWS_BRINGTOFRONT
|
|
END
|
|
POPUP "&Help"
|
|
BEGIN
|
|
MENUITEM "Task Manager &Help Topics", ID_HELP_TOPICS
|
|
MENUITEM SEPARATOR
|
|
MENUITEM "&About Task Manager", ID_HELP_ABOUT
|
|
END
|
|
END
|
|
|
|
IDR_WINDOWSMENU MENU
|
|
BEGIN
|
|
MENUITEM "Tile &Horizontally", ID_WINDOWS_TILEHORIZONTALLY
|
|
MENUITEM "Tile &Vertically", ID_WINDOWS_TILEVERTICALLY
|
|
MENUITEM "&Minimize", ID_WINDOWS_MINIMIZE
|
|
MENUITEM "Ma&ximize", ID_WINDOWS_MAXIMIZE
|
|
MENUITEM "&Cascade", ID_WINDOWS_CASCADE
|
|
MENUITEM "&Bring To Front", ID_WINDOWS_BRINGTOFRONT
|
|
END
|
|
|
|
IDR_APPLICATION_PAGE_CONTEXT1 MENU
|
|
BEGIN
|
|
POPUP "DUMMY"
|
|
BEGIN
|
|
MENUITEM "&New Task (Run...)", ID_FILE_NEW
|
|
MENUITEM SEPARATOR
|
|
MENUITEM "Lar&ge Icons", ID_VIEW_LARGE
|
|
MENUITEM "S&mall Icons", ID_VIEW_SMALL
|
|
MENUITEM "&Details", ID_VIEW_DETAILS, CHECKED
|
|
END
|
|
END
|
|
|
|
IDR_APPLICATION_PAGE_CONTEXT2 MENU
|
|
BEGIN
|
|
POPUP "DUMMY"
|
|
BEGIN
|
|
MENUITEM "&Switch To", ID_APPLICATION_PAGE_SWITCHTO
|
|
MENUITEM "&Bring To Front", ID_WINDOWS_BRINGTOFRONT
|
|
MENUITEM SEPARATOR
|
|
MENUITEM "Tile &Horizontally", ID_WINDOWS_TILEHORIZONTALLY
|
|
MENUITEM "Tile &Vertically", ID_WINDOWS_TILEVERTICALLY
|
|
MENUITEM "&Minimize", ID_WINDOWS_MINIMIZE
|
|
MENUITEM "Ma&ximize", ID_WINDOWS_MAXIMIZE
|
|
MENUITEM "&Cascade", ID_WINDOWS_CASCADE
|
|
MENUITEM SEPARATOR
|
|
MENUITEM "&End Task", ID_APPLICATION_PAGE_ENDTASK
|
|
MENUITEM "&Go To Process", ID_APPLICATION_PAGE_GOTOPROCESS
|
|
END
|
|
END
|
|
|
|
IDR_TRAY_POPUP MENU
|
|
BEGIN
|
|
POPUP "DUMMY"
|
|
BEGIN
|
|
MENUITEM "&Restore", ID_RESTORE
|
|
MENUITEM "&Close", ID_FILE_EXIT
|
|
MENUITEM SEPARATOR
|
|
MENUITEM "&Always On Top", ID_OPTIONS_ALWAYSONTOP
|
|
END
|
|
END
|
|
|
|
IDR_PROCESS_PAGE_CONTEXT MENU
|
|
BEGIN
|
|
POPUP "DUMMY"
|
|
BEGIN
|
|
MENUITEM "&End Process", ID_PROCESS_PAGE_ENDPROCESS
|
|
MENUITEM "End Process &Tree", ID_PROCESS_PAGE_ENDPROCESSTREE
|
|
|
|
MENUITEM "&Debug", ID_PROCESS_PAGE_DEBUG
|
|
MENUITEM SEPARATOR
|
|
POPUP "Set &Priority"
|
|
BEGIN
|
|
MENUITEM "&Realtime", ID_PROCESS_PAGE_SETPRIORITY_REALTIME
|
|
|
|
MENUITEM "&High", ID_PROCESS_PAGE_SETPRIORITY_HIGH
|
|
|
|
MENUITEM "&AboveNormal", ID_PROCESS_PAGE_SETPRIORITY_ABOVENORMAL
|
|
|
|
MENUITEM "&Normal", ID_PROCESS_PAGE_SETPRIORITY_NORMAL
|
|
|
|
MENUITEM "&BelowNormal", ID_PROCESS_PAGE_SETPRIORITY_BELOWNORMAL
|
|
|
|
MENUITEM "&Low", ID_PROCESS_PAGE_SETPRIORITY_LOW
|
|
|
|
END
|
|
MENUITEM "Set &Affinity...", ID_PROCESS_PAGE_SETAFFINITY
|
|
MENUITEM "Edit Debug &Channels...", ID_PROCESS_PAGE_DEBUGCHANNELS
|
|
END
|
|
END
|
|
|
|
/*
|
|
String Tables
|
|
*/
|
|
|
|
STRINGTABLE
|
|
BEGIN
|
|
IDS_APP_TITLE "Task Manager"
|
|
IDC_TASKMGR "Task Manager"
|
|
IDS_RUNDLG_CAPTION "Create New Task"
|
|
END
|
|
|
|
STRINGTABLE
|
|
BEGIN
|
|
ID_FILE_NEW "Runs a new program"
|
|
ID_OPTIONS_ALWAYSONTOP "Task Manager remains in front of all other windows unless minimized"
|
|
ID_OPTIONS_MINIMIZEONUSE
|
|
"Task Manager is minimized when a SwitchTo operation is performed"
|
|
ID_OPTIONS_HIDEWHENMINIMIZED "Hide the Task Manager when it is minimized"
|
|
ID_VIEW_REFRESH "Force Task Manager to update now, regardless of Update Speed setting"
|
|
ID_VIEW_LARGE "Displays tasks by using large icons"
|
|
ID_VIEW_SMALL "Displays tasks by using small icons"
|
|
ID_VIEW_DETAILS "Displays information about each task"
|
|
ID_VIEW_UPDATESPEED_HIGH "Updates the display twice per second"
|
|
ID_VIEW_UPDATESPEED_NORMAL "Updates the display every two seconds"
|
|
ID_VIEW_UPDATESPEED_LOW "Updates the display every four seconds"
|
|
END
|
|
|
|
STRINGTABLE
|
|
BEGIN
|
|
ID_VIEW_UPDATESPEED_PAUSED "Does not automatically update"
|
|
ID_WINDOWS_TILEHORIZONTALLY
|
|
"Tiles the windows horizontally on the desktop"
|
|
ID_WINDOWS_TILEVERTICALLY "Tiles the windows vertically on the desktop"
|
|
ID_WINDOWS_MINIMIZE "Minimizes the windows"
|
|
ID_WINDOWS_MAXIMIZE "Maximizes the windows"
|
|
ID_WINDOWS_CASCADE "Cascades the windows diagonally on the desktop"
|
|
ID_WINDOWS_BRINGTOFRONT "Brings the window front, but does not switch to it"
|
|
ID_HELP_TOPICS "Displays Task Manager help topics"
|
|
ID_HELP_ABOUT "Displays program information, version number, and copyright"
|
|
ID_FILE_EXIT "Exits the Task Manager application"
|
|
ID_OPTIONS_SHOW16BITTASKS
|
|
"Shows 16-bit tasks under the associated ntvdm.exe"
|
|
ID_VIEW_SELECTCOLUMNS "Select which columns will be visible on the Process page"
|
|
ID_VIEW_SHOWKERNELTIMES "Displays kernel time in the performance graphs"
|
|
ID_VIEW_CPUHISTORY_ONEGRAPHALL
|
|
"A single history graph shows total CPU usage"
|
|
ID_VIEW_CPUHISTORY_ONEGRAPHPERCPU "Each CPU has its own history graph"
|
|
ID_APPLICATION_PAGE_SWITCHTO
|
|
"Brings a task to the foreground, switch focus to that task"
|
|
END
|
|
|
|
STRINGTABLE
|
|
BEGIN
|
|
ID_ENDTASK "Tells the selected tasks to close"
|
|
ID_GOTOPROCESS "Switches the focus to the process of the selected task"
|
|
ID_RESTORE "Restores the Task Manager from its hidden state"
|
|
ID_PROCESS_PAGE_ENDPROCESS "Removes the process from the system"
|
|
ID_PROCESS_PAGE_ENDPROCESSTREE
|
|
"Removes this process and all descendants from the system"
|
|
ID_PROCESS_PAGE_DEBUG "Attaches the debugger to this process"
|
|
ID_PROCESS_PAGE_SETAFFINITY
|
|
"Controls which processors the process will be allowed to run on"
|
|
ID_PROCESS_PAGE_SETPRIORITY_REALTIME
|
|
"Sets process to the REALTIME priority class"
|
|
ID_PROCESS_PAGE_SETPRIORITY_HIGH "Sets process to the HIGH priority class"
|
|
ID_PROCESS_PAGE_SETPRIORITY_ABOVENORMAL
|
|
"Sets process to the ABOVE NORMAL priority class"
|
|
ID_PROCESS_PAGE_SETPRIORITY_NORMAL
|
|
"Sets process to the NORMAL priority class"
|
|
ID_PROCESS_PAGE_SETPRIORITY_BELOWNORMAL
|
|
"Sets process to the BELOW NORMAL priority class"
|
|
ID_PROCESS_PAGE_SETPRIORITY_LOW "Sets process to the LOW priority class"
|
|
ID_PROCESS_PAGE_DEBUGCHANNELS
|
|
"Controls Debug Channels"
|
|
END
|
|
|
|
STRINGTABLE
|
|
BEGIN
|
|
IDS_VIEW_LARGE "Lar&ge Icons"
|
|
IDS_VIEW_SMALL "S&mall Icons"
|
|
IDS_VIEW_DETAILS "&Details"
|
|
IDS_WINDOWS "&Windows"
|
|
IDS_VIEW_SELECTCOLUMNS "&Select Columns..."
|
|
IDS_OPTIONS_SHOW16BITTASKS "&Show 16-bit tasks"
|
|
IDS_VIEW_CPUHISTORY "&CPU History"
|
|
IDS_VIEW_CPUHISTORY_ONEGRAPHALL "&One Graph, All CPUs"
|
|
IDS_VIEW_CPUHISTORY_ONEGRAPHPERCPU "One Graph &Per CPU"
|
|
IDS_VIEW_SHOWKERNELTIMES "&Show Kernel Times"
|
|
IDS_APPLICATIONS "Applications"
|
|
IDS_PROCESSES "Processes"
|
|
IDS_PERFORMANCE "Performance"
|
|
IDS_STATUS_BAR_CPU_USAGE "CPU Usage: %3d%%"
|
|
IDS_STATUS_BAR_PROCESSES "Processes: %d"
|
|
IDS_STATUS_BAR_MEMORY_USAGE "Mem Usage: %dK / %dK"
|
|
END
|
|
|
|
STRINGTABLE
|
|
BEGIN
|
|
IDS_IMAGENAME "Image Name"
|
|
IDS_PID "PID"
|
|
IDS_CPUUSAGE "CPU"
|
|
IDS_CPUTIME "CPU Time"
|
|
IDS_MEMORYUSAGE "Mem Usage"
|
|
IDS_MEMORYUSAGEDELTA "Mem Delta"
|
|
IDS_PEAKMEMORYUSAGE "Peak Mem Usage"
|
|
IDS_PAGEFAULTS "Page Faults"
|
|
IDS_USEROBJECTS "USER Objects"
|
|
IDS_IOREADS "I/O Reads"
|
|
IDS_IOREADBYTES "I/O Read Bytes"
|
|
IDS_SESSIONID "Session ID"
|
|
IDS_USERNAME "Username"
|
|
IDS_PAGEFAULTSDELTA "PF Delta"
|
|
IDS_VIRTUALMEMORYSIZE "VM Size"
|
|
IDS_PAGEDPOOL "Paged Pool"
|
|
IDS_NONPAGEDPOOL "NP Pool"
|
|
IDS_BASEPRIORITY "Base Pri"
|
|
IDS_HANDLECOUNT "Handles"
|
|
IDS_THREADCOUNT "Threads"
|
|
IDS_GDIOBJECTS "GDI Objects"
|
|
IDS_IOWRITES "I/O Writes"
|
|
IDS_IOWRITEBYTES "I/O Write Bytes"
|
|
IDS_IOOTHER "I/O Other"
|
|
IDS_IOOTHERBYTES "I/O Other Bytes"
|
|
END
|
|
|
|
STRINGTABLE
|
|
BEGIN
|
|
IDS_WARNING_TITLE "Task Manager Warning"
|
|
IDS_PRIORITY_CHANGE_MESSAGE "WARNING: Changing the priority class of this process may\n\
|
|
cause undesired results including system instability. Are you\n\
|
|
sure you want to change the priority class?"
|
|
IDS_PRIORITY_UNABLE2CHANGE "Unable to Change Priority"
|
|
IDS_TERMINATE_MESSAGE "WARNING: Terminating a process can cause undesired\n\
|
|
results including loss of data and system instability. The\n\
|
|
process will not be given the chance to save its state or\n\
|
|
data before it is terminated. Are you sure you want to\n\
|
|
terminate the process?"
|
|
IDS_TERMINATE_UNABLE2TERMINATE "Unable to Terminate Process"
|
|
IDS_DEBUG_MESSAGE "WARNING: Debugging this process may result in loss of data.\n\
|
|
Are you sure you wish to attach the debugger?"
|
|
IDS_DEBUG_UNABLE2DEBUG "Unable to Debug Process"
|
|
IDS_AFFINITY_ERROR_MESSAGE "The process must have affinity with at least one processor"
|
|
IDS_AFFINITY_ERROR_TITLE "Invalid Option"
|
|
IDS_AFFINITY_UNABLE2ACCESS "Unable to Access or Set Process Affinity"
|
|
END
|
|
|
|
STRINGTABLE
|
|
BEGIN
|
|
IDS_SYSTEM_IDLE_PROCESS "System Idle Process"
|
|
IDS_APPLICATION_NOT_RESPONDING "Not Responding"
|
|
IDS_APPLICATION_RUNNING "Running"
|
|
IDS_APPLICATION_TASK "Task"
|
|
IDS_APPLICATION_STATUS "Status"
|
|
IDS_DEBUG_CHANNEL "Debug Channels"
|
|
IDS_DEBUG_CHANNEL_FIXME "Fixme"
|
|
IDS_DEBUG_CHANNEL_ERR "Err"
|
|
IDS_DEBUG_CHANNEL_WARN "Warn"
|
|
IDS_DEBUG_CHANNEL_TRACE "Trace"
|
|
END
|
|
|
|
LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
|
|
|
|
/*
|
|
Icon
|
|
*/
|
|
|
|
/* Icon with lowest ID value placed first to ensure application icon
|
|
remains consistent on all systems. */
|
|
/* @makedep: taskmgr.ico */
|
|
IDI_TASKMANAGER ICON taskmgr.ico
|
|
|
|
/* @makedep: window.ico */
|
|
IDI_WINDOW ICON window.ico
|
|
|
|
/* @makedep: windowsm.ico */
|
|
IDI_WINDOWSM ICON windowsm.ico
|
|
|
|
/*
|
|
Version
|
|
*/
|
|
|
|
VS_VERSION_INFO VERSIONINFO
|
|
FILEVERSION 1,0,0,1
|
|
PRODUCTVERSION 1,0,0,1
|
|
FILEFLAGSMASK 0x3fL
|
|
#ifdef _DEBUG
|
|
FILEFLAGS 0x1L
|
|
#else
|
|
FILEFLAGS 0x0L
|
|
#endif
|
|
FILEOS 0x40004L
|
|
FILETYPE 0x1L
|
|
FILESUBTYPE 0x0L
|
|
BEGIN
|
|
BLOCK "StringFileInfo"
|
|
BEGIN
|
|
BLOCK "040904b0"
|
|
BEGIN
|
|
VALUE "CompanyName", "Brian Palmer\0"
|
|
VALUE "FileDescription", "Task Manager by Brian Palmer\0"
|
|
VALUE "FileVersion", "1.0.0.1\0"
|
|
VALUE "InternalName", "taskmgr\0"
|
|
VALUE "LegalCopyright", "Copyright © Brian Palmer 2000\0"
|
|
VALUE "OriginalFilename", "taskmgr.exe\0"
|
|
VALUE "ProductName", "Task Manager by Brian Palmer\0"
|
|
VALUE "ProductVersion", "1.0.0.1\0"
|
|
END
|
|
END
|
|
BLOCK "VarFileInfo"
|
|
BEGIN
|
|
VALUE "Translation", 0x409, 1200
|
|
END
|
|
END
|
|
|
|
/*
|
|
Bitmap
|
|
*/
|
|
|
|
/* @makedep: traymask.bmp */
|
|
IDB_TRAYMASK BITMAP traymask.bmp
|
|
|
|
/* @makedep: trayicon.bmp */
|
|
IDB_TRAYICON BITMAP trayicon.bmp
|
|
|
|
/* @makedep: font.bmp */
|
|
IDB_FONT BITMAP font.bmp
|