1 /* 2 * PROJECT: ReactOS Task Manager 3 * LICENSE: LGPL-2.1-or-later (https://spdx.org/licenses/LGPL-2.1-or-later) 4 * PURPOSE: Main Header 5 * COPYRIGHT: Copyright 1999-2001 Brian Palmer <brianp@reactos.org> 6 */ 7 8 #pragma once 9 10 #include "resource.h" 11 12 #define RUN_APPS_PAGE 13 #define RUN_PROC_PAGE 14 #define RUN_PERF_PAGE 15 16 #define STATUS_WINDOW 2001 17 #define STATUS_SIZE1 85 18 #define STATUS_SIZE2 190 19 #define STATUS_SIZE3 400 20 21 typedef struct 22 { 23 /* Window size & position settings */ 24 BOOL Maximized; 25 int Left; 26 int Top; 27 int Right; 28 int Bottom; 29 30 /* Tab settings */ 31 int ActiveTabPage; 32 33 /* Options menu settings */ 34 BOOL AlwaysOnTop; 35 BOOL MinimizeOnUse; 36 BOOL HideWhenMinimized; 37 BOOL Show16BitTasks; 38 39 /* Update speed settings */ 40 /* How many half-seconds in between updates (i.e. 0 - Paused, 1 - High, 2 - Normal, 4 - Low) */ 41 DWORD UpdateSpeed; 42 43 /* Applications page settings */ 44 DWORD ViewMode; 45 46 /* Processes page settings */ 47 BOOL ShowProcessesFromAllUsers; /* Server-only? */ 48 BOOL Columns[COLUMN_NMAX]; 49 int ColumnOrderArray[COLUMN_NMAX]; 50 int ColumnSizeArray[COLUMN_NMAX]; 51 int SortColumn; 52 BOOL SortAscending; 53 54 /* Performance page settings */ 55 BOOL CPUHistory_OneGraphPerCPU; 56 BOOL ShowKernelTimes; 57 58 } TASKMANAGER_SETTINGS, *LPTASKMANAGER_SETTINGS; 59 60 /* Global Variables: */ 61 extern HINSTANCE hInst; /* current instance */ 62 extern HWND hMainWnd; /* Main Window */ 63 extern HWND hStatusWnd; /* Status Bar Window */ 64 extern HWND hTabWnd; /* Tab Control Window */ 65 extern int nMinimumWidth; /* Minimum width of the dialog (OnSize()'s cx) */ 66 extern int nMinimumHeight; /* Minimum height of the dialog (OnSize()'s cy) */ 67 extern int nOldWidth; /* Holds the previous client area width */ 68 extern int nOldHeight; /* Holds the previous client area height */ 69 extern TASKMANAGER_SETTINGS TaskManagerSettings; 70 71 /* Forward declarations of functions included in this code module: */ 72 INT_PTR CALLBACK TaskManagerWndProc(HWND, UINT, WPARAM, LPARAM); 73 BOOL OnCreate(HWND hWnd); 74 void OnSize(WPARAM nType, int cx, int cy); 75 void OnMove(WPARAM nType, int cx, int cy); 76 void FillSolidRect(HDC hDC, LPCRECT lpRect, COLORREF clr); 77 void LoadSettings(void); 78 void SaveSettings(void); 79 void TaskManager_OnRestoreMainWindow(void); 80 void TaskManager_OnMenuSelect(HWND hWnd, UINT nItemID, UINT nFlags, HMENU hSysMenu); 81 void TaskManager_OnViewUpdateSpeed(DWORD); 82 void TaskManager_OnTabWndSelChange(void); 83 BOOL ConfirmMessageBox(HWND hWnd, LPCWSTR Text, LPCWSTR Title, UINT Type); 84 VOID ShowWin32Error(DWORD dwError); 85 LPTSTR GetLastErrorText( LPTSTR lpszBuf, DWORD dwSize ); 86 DWORD EndLocalThread(HANDLE *hThread, DWORD dwThread); 87