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 157 // he-IL.rc determines minimum width: 72 == 157 - 85 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 /* 0 - Paused, 1 - High, 2 - Normal, 4 - Low */ 40 DWORD UpdateSpeed; 41 42 /* Applications page settings */ 43 DWORD ViewMode; 44 45 /* Processes page settings */ 46 BOOL ShowProcessesFromAllUsers; 47 BOOL Columns[COLUMN_NMAX]; 48 int ColumnOrderArray[COLUMN_NMAX]; 49 int ColumnSizeArray[COLUMN_NMAX]; 50 int SortColumn; 51 BOOL SortAscending; 52 53 /* Performance page settings */ 54 BOOL CPUHistory_OneGraphPerCPU; 55 BOOL ShowKernelTimes; 56 } TASKMANAGER_SETTINGS, *LPTASKMANAGER_SETTINGS; 57 58 /* Global Variables: */ 59 extern HINSTANCE hInst; /* current instance */ 60 extern HWND hMainWnd; /* Main Window */ 61 extern HWND hStatusWnd; /* Status Bar Window */ 62 extern HWND hTabWnd; /* Tab Control Window */ 63 extern int nMinimumWidth; /* Minimum width of the dialog (OnSize()'s cx) */ 64 extern int nMinimumHeight; /* Minimum height of the dialog (OnSize()'s cy) */ 65 extern int nOldWidth; /* Holds the previous client area width */ 66 extern int nOldHeight; /* Holds the previous client area height */ 67 extern TASKMANAGER_SETTINGS TaskManagerSettings; 68 69 /* Forward declarations of functions included in this code module: */ 70 INT_PTR CALLBACK TaskManagerWndProc(HWND, UINT, WPARAM, LPARAM); 71 BOOL OnCreate(HWND hWnd); 72 void OnSize(WPARAM nType, int cx, int cy); 73 void OnMove(WPARAM nType, int cx, int cy); 74 void FillSolidRect(HDC hDC, LPCRECT lpRect, COLORREF clr); 75 void LoadSettings(void); 76 void SaveSettings(void); 77 void TaskManager_OnRestoreMainWindow(void); 78 void TaskManager_OnMenuSelect(HWND hWnd, UINT nItemID, UINT nFlags, HMENU hSysMenu); 79 void TaskManager_OnViewUpdateSpeed(DWORD); 80 void TaskManager_OnTabWndSelChange(void); 81 BOOL ConfirmMessageBox(HWND hWnd, LPCWSTR Text, LPCWSTR Title, UINT Type); 82 VOID ShowWin32Error(DWORD dwError); 83 LPTSTR GetLastErrorText(LPTSTR lpszBuf, DWORD dwSize); 84 DWORD EndLocalThread(HANDLE *hThread, DWORD dwThread); 85