/* * ReactOS Task Manager * * column.c * * Copyright (C) 1999 - 2001 Brian Palmer * 2005 Klemens Friedl * * 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 Street, Fifth Floor, Boston, MA 02110-1301 USA */ #include "precomp.h" UINT ColumnDataHints[COLUMN_NMAX]; #define DECLARE_COLUMN_PRESET(_name, _size, _state) \ { IDS_TAB_##_name, IDC_##_name, _size, _state }, const PresetColumnEntry ColumnPresets[COLUMN_NMAX] = { DECLARE_COLUMN_PRESET(IMAGENAME, 105, TRUE) DECLARE_COLUMN_PRESET(PID, 50, TRUE) DECLARE_COLUMN_PRESET(USERNAME, 107, FALSE) DECLARE_COLUMN_PRESET(SESSIONID, 70, FALSE) DECLARE_COLUMN_PRESET(CPUUSAGE, 35, TRUE) DECLARE_COLUMN_PRESET(CPUTIME, 70, TRUE) DECLARE_COLUMN_PRESET(MEMORYUSAGE, 70, TRUE) DECLARE_COLUMN_PRESET(PEAKMEMORYUSAGE, 100, FALSE) DECLARE_COLUMN_PRESET(MEMORYUSAGEDELTA, 70, FALSE) DECLARE_COLUMN_PRESET(PAGEFAULTS, 70, FALSE) DECLARE_COLUMN_PRESET(PAGEFAULTSDELTA, 70, FALSE) DECLARE_COLUMN_PRESET(VIRTUALMEMORYSIZE, 70, FALSE) DECLARE_COLUMN_PRESET(PAGEDPOOL, 70, FALSE) DECLARE_COLUMN_PRESET(NONPAGEDPOOL, 70, FALSE) DECLARE_COLUMN_PRESET(BASEPRIORITY, 60, FALSE) DECLARE_COLUMN_PRESET(HANDLECOUNT, 60, FALSE) DECLARE_COLUMN_PRESET(THREADCOUNT, 60, FALSE) DECLARE_COLUMN_PRESET(USEROBJECTS, 60, FALSE) DECLARE_COLUMN_PRESET(GDIOBJECTS, 60, FALSE) DECLARE_COLUMN_PRESET(IOREADS, 70, FALSE) DECLARE_COLUMN_PRESET(IOWRITES, 70, FALSE) DECLARE_COLUMN_PRESET(IOOTHER, 70, FALSE) DECLARE_COLUMN_PRESET(IOREADBYTES, 70, FALSE) DECLARE_COLUMN_PRESET(IOWRITEBYTES, 70, FALSE) DECLARE_COLUMN_PRESET(IOOTHERBYTES, 70, FALSE) DECLARE_COLUMN_PRESET(COMMANDLINE, 450, FALSE) }; static int InsertColumn(int nCol, LPCWSTR lpszColumnHeading, int nFormat, int nWidth, int nSubItem); INT_PTR CALLBACK ColumnsDialogWndProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam); void AddColumns(void) { LRESULT size; WCHAR szTemp[256]; unsigned int n; for (n=0; n=0; i--) { (void)ListView_DeleteColumn(hProcessPageListCtrl, i); } for (i=0; i