2004-01-10 02:14:13 +00:00
|
|
|
/*
|
[0.4.11][TASKMGR] Backport many fixes and improvements
Some commits I do port back all the way down till releases/0.4.7:
partially 0.4.15-dev-6768-g 63eaf2bd529f5bf94cde65afc26944e98b47850b [TASKMGR] *.rc Deduplicate dynamic menu strings (#5772) (I left out the FIXME-comments)
0.4.15-dev-6712-g 46b4b5581d1fc4c1b50cfc0ee8b82b77be182dc6 [TASKMGR] Favor _countof(), no functional change intended (#5757)
0.4.15-dev-6703-g 6528ab8fcb41eb47ee17cf738760126e6758af94 [TASKMGR] de-DE.rc Update part 3
0.4.15-dev-6702-g 65ce20896afa19032612871506dd5d1e8eb73119 [TASKMGR] *.rc Strip unused IDD_DEBUG_CHANNELS_DIALOG
0.4.15-dev-6700-g e15d68ba5d9906674b363cf8362ed08494e53a76 [TASKMGR] de-DE German Update & bug-fixes
partially 0.4.15-dev-6447-g 016acd170dd75a7a24af235339a5321e2c24bf5a [TASKMGR] Do not free shared icon for ShellAbout() calls (I picked just the taskmgr part) (was part of larger PR5519)
0.4.15-dev-6297-g 831288fe691ec311c5b910f05d9b833b4b952261 [TASKMGR] Fix text truncation for fr-FR.rc (#5380) CORE-18523
0.4.15-dev-6127-g c706222f3f1b2a63e8cc969ee756c8be92527853 [TASKMGR] Fix the license. Turns out it's LGPL-2.1-or-later from the texts.
0.4.15-dev-6124-g 9927163455b83fea29c6420a688535b8e233bff6 [TASKMGR] Reorder page controls to have natural TAB-ordering.
0.4.15-dev-6122-g d5707eefe2f08d230c07ab4693ac0bd59e809f85 [TASKMGR] High speed update is twice per second, and not every second.
0.4.15-dev-6121-g 2da0506f2a9fc02acede7d7ff479399013830fad [TASKMGR] Remove more dead code.
partially 0.4.15-dev-6120-g 6e77747b305add73133faa2049b8bd34e3e2534e [TASKMGR] Simplify tray icon code. (I left out using the strsafe.h-dependent stuff, as this is safe also in old-style)
0.4.15-dev-6119-g 0b4c8bdd1cb4cf1a50c1076c7ded19ee7e9f9198 [TASKMGR] Clamp the values returned from PerfDataGetProcessorUsage() and PerfDataGetProcessorSystemUsage() inside these functions.
0.4.15-dev-6118-g 7b53126375ee8889cf24615fa2ea646feabee0ae [TASKMGR] Completely reformat perfpage.c, perfpage.h, procpage.h and trayicon.c
partially 0.4.15-dev-6117-g da7dcec6a06c052339120ed4baa3caf24594f163 [TASKMGR] Reformat the files' headers
0.4.15-dev-6115-g 36aea8e56eb6eb9f1cab5fd6ce040b80ef6a302f [TASKMGR] affinity.c: Use _countof instead of sizeof/sizeof (was part of the larger CORE18991)
partially 0.4.15-dev-6109-g 99fb812be4ba86139438bf7961f2030ac9e016be [TASKMGR] Refactor trayicon.c
0.4.15-dev-5404-g c093d4f8038e7ddec1ca193edc573c48e12f12ff [TASKMGR] Prevent context menu on idle process (#4889) CORE-18640
0.4.15-dev-5031-g 46ea5171bdfaba2606486e27821fdd9ee88e551a [TASKMGR] Pixel-perfection for left border (#4680) CORE-18061
0.4.15-dev-4988-g de5af76811bbd318cdef46e193f306833e3fa740 [TASKMGR] Fix overlapping controls (French only) (#4658)
0.4.15-dev-4987-g f8c28b977363444ad31124a6794347c53532b43f [TASKMGR] Fix UI on SwitchTo for multiple application (#4652)
0.4.15-dev-3497-g e8a7e0da2bcbd842f95e4224e72bfb5d748dbd05 [TASKMGR] Make 'Hide When Minimized' non-default (#4169)
0.4.15-dev-3085-g 515e0cf38f8d07e59bb003f930eb08d33dc5f85d [TASKMGR] Handles: Get number only, skip data (#3910)
and a few *.rc improvements that are not explicitly mentioned here,
especially I stripped the menuLoop-statusbar-help-texts within the older branches.
I also port back the following feature into all releases down to releases/0.4.8, but I left out releases/0.4.7 for now:
0.4.13-dev-875-g 3276824586fefd531f4473046618fa2724442a53 [TASKMGR] Implement proper process tree ending (#1738)
A few improvements are still left to be done in a future commit (mostly around the plotgraphs and the trayicon-handling),
but I need to have a closer look at them and their impact on binary size,
so I do not want to squash them into this bigger backport,
where I concentrated on the safe/obvious and easy things.
Binary size decreases for all branches:
master taskmgr.exe RosBEWin2.2.2 GCC8.4.0dbg 708.608 -> 696.832 (0.4.15-dev-6768-g63eaf2b)
0.4.14 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 660.992 -> 549.888
0.4.13 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 659.968 -> 542.720
0.4.12 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 662.016 -> 545.792
0.4.11 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 662.016 -> 545.792
0.4.10 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 645.120 -> 532.480
0.4. 9 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 645.120 -> 532.480
0.4. 8 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 645.120 -> 532.480
0.4. 7 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 645.120 -> 531.456
taskmgr.exe MS XPSP3 german 140.800 Bytes
0.4.14 taskmgr.exe RosBEWin2.1.6 MSVC2010SP1rls I18N=de-DE -> 110.080 Bytes (my current taskmgr of choice)
0.4. 8 taskmgr.exe RosBEWin2.1.6 MSVC2010SP1rls I18N=en-US -> 108.032 Bytes
0.4. 7 taskmgr.exe RosBEWin2.1.6 MSVC2010SP1rls I18N=en-US -> 107.520 Bytes
2023-10-19 13:05:47 +00:00
|
|
|
* PROJECT: ReactOS Task Manager
|
|
|
|
* LICENSE: LGPL-2.1-or-later (https://spdx.org/licenses/LGPL-2.1-or-later)
|
|
|
|
* COPYRIGHT: 1999-2001 Brian Palmer <brianp@reactos.org>
|
|
|
|
* 2005 Klemens Friedl <frik85@reactos.at>
|
2004-01-10 02:14:13 +00:00
|
|
|
*/
|
|
|
|
|
2013-01-24 23:00:42 +00:00
|
|
|
#include "precomp.h"
|
2004-01-10 02:14:13 +00:00
|
|
|
|
2007-08-03 07:35:39 +00:00
|
|
|
UINT ColumnDataHints[COLUMN_NMAX];
|
2004-01-10 02:14:13 +00:00
|
|
|
|
2007-08-03 07:35:39 +00:00
|
|
|
#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)
|
2014-11-23 20:10:15 +00:00
|
|
|
DECLARE_COLUMN_PRESET(COMMANDLINE, 450, FALSE)
|
2007-08-03 07:35:39 +00:00
|
|
|
};
|
|
|
|
|
[0.4.11][TASKMGR] Backport many fixes and improvements
Some commits I do port back all the way down till releases/0.4.7:
partially 0.4.15-dev-6768-g 63eaf2bd529f5bf94cde65afc26944e98b47850b [TASKMGR] *.rc Deduplicate dynamic menu strings (#5772) (I left out the FIXME-comments)
0.4.15-dev-6712-g 46b4b5581d1fc4c1b50cfc0ee8b82b77be182dc6 [TASKMGR] Favor _countof(), no functional change intended (#5757)
0.4.15-dev-6703-g 6528ab8fcb41eb47ee17cf738760126e6758af94 [TASKMGR] de-DE.rc Update part 3
0.4.15-dev-6702-g 65ce20896afa19032612871506dd5d1e8eb73119 [TASKMGR] *.rc Strip unused IDD_DEBUG_CHANNELS_DIALOG
0.4.15-dev-6700-g e15d68ba5d9906674b363cf8362ed08494e53a76 [TASKMGR] de-DE German Update & bug-fixes
partially 0.4.15-dev-6447-g 016acd170dd75a7a24af235339a5321e2c24bf5a [TASKMGR] Do not free shared icon for ShellAbout() calls (I picked just the taskmgr part) (was part of larger PR5519)
0.4.15-dev-6297-g 831288fe691ec311c5b910f05d9b833b4b952261 [TASKMGR] Fix text truncation for fr-FR.rc (#5380) CORE-18523
0.4.15-dev-6127-g c706222f3f1b2a63e8cc969ee756c8be92527853 [TASKMGR] Fix the license. Turns out it's LGPL-2.1-or-later from the texts.
0.4.15-dev-6124-g 9927163455b83fea29c6420a688535b8e233bff6 [TASKMGR] Reorder page controls to have natural TAB-ordering.
0.4.15-dev-6122-g d5707eefe2f08d230c07ab4693ac0bd59e809f85 [TASKMGR] High speed update is twice per second, and not every second.
0.4.15-dev-6121-g 2da0506f2a9fc02acede7d7ff479399013830fad [TASKMGR] Remove more dead code.
partially 0.4.15-dev-6120-g 6e77747b305add73133faa2049b8bd34e3e2534e [TASKMGR] Simplify tray icon code. (I left out using the strsafe.h-dependent stuff, as this is safe also in old-style)
0.4.15-dev-6119-g 0b4c8bdd1cb4cf1a50c1076c7ded19ee7e9f9198 [TASKMGR] Clamp the values returned from PerfDataGetProcessorUsage() and PerfDataGetProcessorSystemUsage() inside these functions.
0.4.15-dev-6118-g 7b53126375ee8889cf24615fa2ea646feabee0ae [TASKMGR] Completely reformat perfpage.c, perfpage.h, procpage.h and trayicon.c
partially 0.4.15-dev-6117-g da7dcec6a06c052339120ed4baa3caf24594f163 [TASKMGR] Reformat the files' headers
0.4.15-dev-6115-g 36aea8e56eb6eb9f1cab5fd6ce040b80ef6a302f [TASKMGR] affinity.c: Use _countof instead of sizeof/sizeof (was part of the larger CORE18991)
partially 0.4.15-dev-6109-g 99fb812be4ba86139438bf7961f2030ac9e016be [TASKMGR] Refactor trayicon.c
0.4.15-dev-5404-g c093d4f8038e7ddec1ca193edc573c48e12f12ff [TASKMGR] Prevent context menu on idle process (#4889) CORE-18640
0.4.15-dev-5031-g 46ea5171bdfaba2606486e27821fdd9ee88e551a [TASKMGR] Pixel-perfection for left border (#4680) CORE-18061
0.4.15-dev-4988-g de5af76811bbd318cdef46e193f306833e3fa740 [TASKMGR] Fix overlapping controls (French only) (#4658)
0.4.15-dev-4987-g f8c28b977363444ad31124a6794347c53532b43f [TASKMGR] Fix UI on SwitchTo for multiple application (#4652)
0.4.15-dev-3497-g e8a7e0da2bcbd842f95e4224e72bfb5d748dbd05 [TASKMGR] Make 'Hide When Minimized' non-default (#4169)
0.4.15-dev-3085-g 515e0cf38f8d07e59bb003f930eb08d33dc5f85d [TASKMGR] Handles: Get number only, skip data (#3910)
and a few *.rc improvements that are not explicitly mentioned here,
especially I stripped the menuLoop-statusbar-help-texts within the older branches.
I also port back the following feature into all releases down to releases/0.4.8, but I left out releases/0.4.7 for now:
0.4.13-dev-875-g 3276824586fefd531f4473046618fa2724442a53 [TASKMGR] Implement proper process tree ending (#1738)
A few improvements are still left to be done in a future commit (mostly around the plotgraphs and the trayicon-handling),
but I need to have a closer look at them and their impact on binary size,
so I do not want to squash them into this bigger backport,
where I concentrated on the safe/obvious and easy things.
Binary size decreases for all branches:
master taskmgr.exe RosBEWin2.2.2 GCC8.4.0dbg 708.608 -> 696.832 (0.4.15-dev-6768-g63eaf2b)
0.4.14 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 660.992 -> 549.888
0.4.13 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 659.968 -> 542.720
0.4.12 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 662.016 -> 545.792
0.4.11 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 662.016 -> 545.792
0.4.10 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 645.120 -> 532.480
0.4. 9 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 645.120 -> 532.480
0.4. 8 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 645.120 -> 532.480
0.4. 7 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 645.120 -> 531.456
taskmgr.exe MS XPSP3 german 140.800 Bytes
0.4.14 taskmgr.exe RosBEWin2.1.6 MSVC2010SP1rls I18N=de-DE -> 110.080 Bytes (my current taskmgr of choice)
0.4. 8 taskmgr.exe RosBEWin2.1.6 MSVC2010SP1rls I18N=en-US -> 108.032 Bytes
0.4. 7 taskmgr.exe RosBEWin2.1.6 MSVC2010SP1rls I18N=en-US -> 107.520 Bytes
2023-10-19 13:05:47 +00:00
|
|
|
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);
|
2004-01-10 02:14:13 +00:00
|
|
|
|
|
|
|
void AddColumns(void)
|
|
|
|
{
|
2007-10-31 23:26:27 +00:00
|
|
|
LRESULT size;
|
|
|
|
WCHAR szTemp[256];
|
|
|
|
unsigned int n;
|
2004-01-10 02:14:13 +00:00
|
|
|
|
2007-08-03 07:35:39 +00:00
|
|
|
for (n=0; n<COLUMN_NMAX; n++) {
|
|
|
|
if (TaskManagerSettings.Columns[n]) {
|
[0.4.11][TASKMGR] Backport many fixes and improvements
Some commits I do port back all the way down till releases/0.4.7:
partially 0.4.15-dev-6768-g 63eaf2bd529f5bf94cde65afc26944e98b47850b [TASKMGR] *.rc Deduplicate dynamic menu strings (#5772) (I left out the FIXME-comments)
0.4.15-dev-6712-g 46b4b5581d1fc4c1b50cfc0ee8b82b77be182dc6 [TASKMGR] Favor _countof(), no functional change intended (#5757)
0.4.15-dev-6703-g 6528ab8fcb41eb47ee17cf738760126e6758af94 [TASKMGR] de-DE.rc Update part 3
0.4.15-dev-6702-g 65ce20896afa19032612871506dd5d1e8eb73119 [TASKMGR] *.rc Strip unused IDD_DEBUG_CHANNELS_DIALOG
0.4.15-dev-6700-g e15d68ba5d9906674b363cf8362ed08494e53a76 [TASKMGR] de-DE German Update & bug-fixes
partially 0.4.15-dev-6447-g 016acd170dd75a7a24af235339a5321e2c24bf5a [TASKMGR] Do not free shared icon for ShellAbout() calls (I picked just the taskmgr part) (was part of larger PR5519)
0.4.15-dev-6297-g 831288fe691ec311c5b910f05d9b833b4b952261 [TASKMGR] Fix text truncation for fr-FR.rc (#5380) CORE-18523
0.4.15-dev-6127-g c706222f3f1b2a63e8cc969ee756c8be92527853 [TASKMGR] Fix the license. Turns out it's LGPL-2.1-or-later from the texts.
0.4.15-dev-6124-g 9927163455b83fea29c6420a688535b8e233bff6 [TASKMGR] Reorder page controls to have natural TAB-ordering.
0.4.15-dev-6122-g d5707eefe2f08d230c07ab4693ac0bd59e809f85 [TASKMGR] High speed update is twice per second, and not every second.
0.4.15-dev-6121-g 2da0506f2a9fc02acede7d7ff479399013830fad [TASKMGR] Remove more dead code.
partially 0.4.15-dev-6120-g 6e77747b305add73133faa2049b8bd34e3e2534e [TASKMGR] Simplify tray icon code. (I left out using the strsafe.h-dependent stuff, as this is safe also in old-style)
0.4.15-dev-6119-g 0b4c8bdd1cb4cf1a50c1076c7ded19ee7e9f9198 [TASKMGR] Clamp the values returned from PerfDataGetProcessorUsage() and PerfDataGetProcessorSystemUsage() inside these functions.
0.4.15-dev-6118-g 7b53126375ee8889cf24615fa2ea646feabee0ae [TASKMGR] Completely reformat perfpage.c, perfpage.h, procpage.h and trayicon.c
partially 0.4.15-dev-6117-g da7dcec6a06c052339120ed4baa3caf24594f163 [TASKMGR] Reformat the files' headers
0.4.15-dev-6115-g 36aea8e56eb6eb9f1cab5fd6ce040b80ef6a302f [TASKMGR] affinity.c: Use _countof instead of sizeof/sizeof (was part of the larger CORE18991)
partially 0.4.15-dev-6109-g 99fb812be4ba86139438bf7961f2030ac9e016be [TASKMGR] Refactor trayicon.c
0.4.15-dev-5404-g c093d4f8038e7ddec1ca193edc573c48e12f12ff [TASKMGR] Prevent context menu on idle process (#4889) CORE-18640
0.4.15-dev-5031-g 46ea5171bdfaba2606486e27821fdd9ee88e551a [TASKMGR] Pixel-perfection for left border (#4680) CORE-18061
0.4.15-dev-4988-g de5af76811bbd318cdef46e193f306833e3fa740 [TASKMGR] Fix overlapping controls (French only) (#4658)
0.4.15-dev-4987-g f8c28b977363444ad31124a6794347c53532b43f [TASKMGR] Fix UI on SwitchTo for multiple application (#4652)
0.4.15-dev-3497-g e8a7e0da2bcbd842f95e4224e72bfb5d748dbd05 [TASKMGR] Make 'Hide When Minimized' non-default (#4169)
0.4.15-dev-3085-g 515e0cf38f8d07e59bb003f930eb08d33dc5f85d [TASKMGR] Handles: Get number only, skip data (#3910)
and a few *.rc improvements that are not explicitly mentioned here,
especially I stripped the menuLoop-statusbar-help-texts within the older branches.
I also port back the following feature into all releases down to releases/0.4.8, but I left out releases/0.4.7 for now:
0.4.13-dev-875-g 3276824586fefd531f4473046618fa2724442a53 [TASKMGR] Implement proper process tree ending (#1738)
A few improvements are still left to be done in a future commit (mostly around the plotgraphs and the trayicon-handling),
but I need to have a closer look at them and their impact on binary size,
so I do not want to squash them into this bigger backport,
where I concentrated on the safe/obvious and easy things.
Binary size decreases for all branches:
master taskmgr.exe RosBEWin2.2.2 GCC8.4.0dbg 708.608 -> 696.832 (0.4.15-dev-6768-g63eaf2b)
0.4.14 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 660.992 -> 549.888
0.4.13 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 659.968 -> 542.720
0.4.12 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 662.016 -> 545.792
0.4.11 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 662.016 -> 545.792
0.4.10 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 645.120 -> 532.480
0.4. 9 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 645.120 -> 532.480
0.4. 8 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 645.120 -> 532.480
0.4. 7 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 645.120 -> 531.456
taskmgr.exe MS XPSP3 german 140.800 Bytes
0.4.14 taskmgr.exe RosBEWin2.1.6 MSVC2010SP1rls I18N=de-DE -> 110.080 Bytes (my current taskmgr of choice)
0.4. 8 taskmgr.exe RosBEWin2.1.6 MSVC2010SP1rls I18N=en-US -> 108.032 Bytes
0.4. 7 taskmgr.exe RosBEWin2.1.6 MSVC2010SP1rls I18N=en-US -> 107.520 Bytes
2023-10-19 13:05:47 +00:00
|
|
|
LoadStringW(hInst, ColumnPresets[n].dwIdsName, szTemp, _countof(szTemp));
|
2007-08-03 07:35:39 +00:00
|
|
|
InsertColumn(n, szTemp, LVCFMT_LEFT, TaskManagerSettings.ColumnSizeArray[n], -1);
|
|
|
|
}
|
2005-03-27 20:01:18 +00:00
|
|
|
}
|
2004-01-10 02:14:13 +00:00
|
|
|
|
2007-11-09 15:26:02 +00:00
|
|
|
size = SendMessageW(hProcessPageHeaderCtrl, HDM_GETITEMCOUNT, 0, 0);
|
[0.4.11][TASKMGR] Backport many fixes and improvements
Some commits I do port back all the way down till releases/0.4.7:
partially 0.4.15-dev-6768-g 63eaf2bd529f5bf94cde65afc26944e98b47850b [TASKMGR] *.rc Deduplicate dynamic menu strings (#5772) (I left out the FIXME-comments)
0.4.15-dev-6712-g 46b4b5581d1fc4c1b50cfc0ee8b82b77be182dc6 [TASKMGR] Favor _countof(), no functional change intended (#5757)
0.4.15-dev-6703-g 6528ab8fcb41eb47ee17cf738760126e6758af94 [TASKMGR] de-DE.rc Update part 3
0.4.15-dev-6702-g 65ce20896afa19032612871506dd5d1e8eb73119 [TASKMGR] *.rc Strip unused IDD_DEBUG_CHANNELS_DIALOG
0.4.15-dev-6700-g e15d68ba5d9906674b363cf8362ed08494e53a76 [TASKMGR] de-DE German Update & bug-fixes
partially 0.4.15-dev-6447-g 016acd170dd75a7a24af235339a5321e2c24bf5a [TASKMGR] Do not free shared icon for ShellAbout() calls (I picked just the taskmgr part) (was part of larger PR5519)
0.4.15-dev-6297-g 831288fe691ec311c5b910f05d9b833b4b952261 [TASKMGR] Fix text truncation for fr-FR.rc (#5380) CORE-18523
0.4.15-dev-6127-g c706222f3f1b2a63e8cc969ee756c8be92527853 [TASKMGR] Fix the license. Turns out it's LGPL-2.1-or-later from the texts.
0.4.15-dev-6124-g 9927163455b83fea29c6420a688535b8e233bff6 [TASKMGR] Reorder page controls to have natural TAB-ordering.
0.4.15-dev-6122-g d5707eefe2f08d230c07ab4693ac0bd59e809f85 [TASKMGR] High speed update is twice per second, and not every second.
0.4.15-dev-6121-g 2da0506f2a9fc02acede7d7ff479399013830fad [TASKMGR] Remove more dead code.
partially 0.4.15-dev-6120-g 6e77747b305add73133faa2049b8bd34e3e2534e [TASKMGR] Simplify tray icon code. (I left out using the strsafe.h-dependent stuff, as this is safe also in old-style)
0.4.15-dev-6119-g 0b4c8bdd1cb4cf1a50c1076c7ded19ee7e9f9198 [TASKMGR] Clamp the values returned from PerfDataGetProcessorUsage() and PerfDataGetProcessorSystemUsage() inside these functions.
0.4.15-dev-6118-g 7b53126375ee8889cf24615fa2ea646feabee0ae [TASKMGR] Completely reformat perfpage.c, perfpage.h, procpage.h and trayicon.c
partially 0.4.15-dev-6117-g da7dcec6a06c052339120ed4baa3caf24594f163 [TASKMGR] Reformat the files' headers
0.4.15-dev-6115-g 36aea8e56eb6eb9f1cab5fd6ce040b80ef6a302f [TASKMGR] affinity.c: Use _countof instead of sizeof/sizeof (was part of the larger CORE18991)
partially 0.4.15-dev-6109-g 99fb812be4ba86139438bf7961f2030ac9e016be [TASKMGR] Refactor trayicon.c
0.4.15-dev-5404-g c093d4f8038e7ddec1ca193edc573c48e12f12ff [TASKMGR] Prevent context menu on idle process (#4889) CORE-18640
0.4.15-dev-5031-g 46ea5171bdfaba2606486e27821fdd9ee88e551a [TASKMGR] Pixel-perfection for left border (#4680) CORE-18061
0.4.15-dev-4988-g de5af76811bbd318cdef46e193f306833e3fa740 [TASKMGR] Fix overlapping controls (French only) (#4658)
0.4.15-dev-4987-g f8c28b977363444ad31124a6794347c53532b43f [TASKMGR] Fix UI on SwitchTo for multiple application (#4652)
0.4.15-dev-3497-g e8a7e0da2bcbd842f95e4224e72bfb5d748dbd05 [TASKMGR] Make 'Hide When Minimized' non-default (#4169)
0.4.15-dev-3085-g 515e0cf38f8d07e59bb003f930eb08d33dc5f85d [TASKMGR] Handles: Get number only, skip data (#3910)
and a few *.rc improvements that are not explicitly mentioned here,
especially I stripped the menuLoop-statusbar-help-texts within the older branches.
I also port back the following feature into all releases down to releases/0.4.8, but I left out releases/0.4.7 for now:
0.4.13-dev-875-g 3276824586fefd531f4473046618fa2724442a53 [TASKMGR] Implement proper process tree ending (#1738)
A few improvements are still left to be done in a future commit (mostly around the plotgraphs and the trayicon-handling),
but I need to have a closer look at them and their impact on binary size,
so I do not want to squash them into this bigger backport,
where I concentrated on the safe/obvious and easy things.
Binary size decreases for all branches:
master taskmgr.exe RosBEWin2.2.2 GCC8.4.0dbg 708.608 -> 696.832 (0.4.15-dev-6768-g63eaf2b)
0.4.14 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 660.992 -> 549.888
0.4.13 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 659.968 -> 542.720
0.4.12 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 662.016 -> 545.792
0.4.11 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 662.016 -> 545.792
0.4.10 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 645.120 -> 532.480
0.4. 9 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 645.120 -> 532.480
0.4. 8 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 645.120 -> 532.480
0.4. 7 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 645.120 -> 531.456
taskmgr.exe MS XPSP3 german 140.800 Bytes
0.4.14 taskmgr.exe RosBEWin2.1.6 MSVC2010SP1rls I18N=de-DE -> 110.080 Bytes (my current taskmgr of choice)
0.4. 8 taskmgr.exe RosBEWin2.1.6 MSVC2010SP1rls I18N=en-US -> 108.032 Bytes
0.4. 7 taskmgr.exe RosBEWin2.1.6 MSVC2010SP1rls I18N=en-US -> 107.520 Bytes
2023-10-19 13:05:47 +00:00
|
|
|
SendMessageW(hProcessPageHeaderCtrl, HDM_SETORDERARRAY, (WPARAM)size, (LPARAM)&TaskManagerSettings.ColumnOrderArray);
|
2004-01-10 02:14:13 +00:00
|
|
|
|
|
|
|
UpdateColumnDataHints();
|
|
|
|
}
|
|
|
|
|
2008-02-15 19:22:55 +00:00
|
|
|
static int InsertColumn(int nCol, LPCWSTR lpszColumnHeading, int nFormat, int nWidth, int nSubItem)
|
2004-01-10 02:14:13 +00:00
|
|
|
{
|
2007-10-31 23:26:27 +00:00
|
|
|
LVCOLUMN column;
|
2004-01-10 02:14:13 +00:00
|
|
|
|
|
|
|
column.mask = LVCF_TEXT|LVCF_FMT;
|
2007-11-09 15:26:02 +00:00
|
|
|
column.pszText = (LPWSTR)lpszColumnHeading;
|
2004-01-10 02:14:13 +00:00
|
|
|
column.fmt = nFormat;
|
|
|
|
|
|
|
|
if (nWidth != -1)
|
|
|
|
{
|
|
|
|
column.mask |= LVCF_WIDTH;
|
|
|
|
column.cx = nWidth;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (nSubItem != -1)
|
|
|
|
{
|
|
|
|
column.mask |= LVCF_SUBITEM;
|
|
|
|
column.iSubItem = nSubItem;
|
|
|
|
}
|
|
|
|
|
|
|
|
return ListView_InsertColumn(hProcessPageListCtrl, nCol, &column);
|
|
|
|
}
|
|
|
|
|
|
|
|
void SaveColumnSettings(void)
|
|
|
|
{
|
2007-10-31 23:26:27 +00:00
|
|
|
HDITEM hditem;
|
2007-11-09 19:46:01 +00:00
|
|
|
int i, n;
|
2007-10-31 23:26:27 +00:00
|
|
|
WCHAR text[260];
|
2008-02-15 19:22:55 +00:00
|
|
|
WCHAR szTemp[256];
|
2007-10-31 23:26:27 +00:00
|
|
|
LRESULT size;
|
2004-01-10 02:14:13 +00:00
|
|
|
|
|
|
|
/* Reset column data */
|
2007-08-03 07:35:39 +00:00
|
|
|
for (i=0; i<COLUMN_NMAX; i++) {
|
2004-01-10 02:14:13 +00:00
|
|
|
TaskManagerSettings.ColumnOrderArray[i] = i;
|
2007-08-03 07:35:39 +00:00
|
|
|
TaskManagerSettings.Columns[i] = FALSE;
|
|
|
|
TaskManagerSettings.ColumnSizeArray[i] = ColumnPresets[i].size;
|
|
|
|
}
|
2004-01-10 02:14:13 +00:00
|
|
|
|
|
|
|
/* Get header order */
|
2007-11-09 15:26:02 +00:00
|
|
|
size = SendMessageW(hProcessPageHeaderCtrl, HDM_GETITEMCOUNT, 0, 0);
|
[0.4.11][TASKMGR] Backport many fixes and improvements
Some commits I do port back all the way down till releases/0.4.7:
partially 0.4.15-dev-6768-g 63eaf2bd529f5bf94cde65afc26944e98b47850b [TASKMGR] *.rc Deduplicate dynamic menu strings (#5772) (I left out the FIXME-comments)
0.4.15-dev-6712-g 46b4b5581d1fc4c1b50cfc0ee8b82b77be182dc6 [TASKMGR] Favor _countof(), no functional change intended (#5757)
0.4.15-dev-6703-g 6528ab8fcb41eb47ee17cf738760126e6758af94 [TASKMGR] de-DE.rc Update part 3
0.4.15-dev-6702-g 65ce20896afa19032612871506dd5d1e8eb73119 [TASKMGR] *.rc Strip unused IDD_DEBUG_CHANNELS_DIALOG
0.4.15-dev-6700-g e15d68ba5d9906674b363cf8362ed08494e53a76 [TASKMGR] de-DE German Update & bug-fixes
partially 0.4.15-dev-6447-g 016acd170dd75a7a24af235339a5321e2c24bf5a [TASKMGR] Do not free shared icon for ShellAbout() calls (I picked just the taskmgr part) (was part of larger PR5519)
0.4.15-dev-6297-g 831288fe691ec311c5b910f05d9b833b4b952261 [TASKMGR] Fix text truncation for fr-FR.rc (#5380) CORE-18523
0.4.15-dev-6127-g c706222f3f1b2a63e8cc969ee756c8be92527853 [TASKMGR] Fix the license. Turns out it's LGPL-2.1-or-later from the texts.
0.4.15-dev-6124-g 9927163455b83fea29c6420a688535b8e233bff6 [TASKMGR] Reorder page controls to have natural TAB-ordering.
0.4.15-dev-6122-g d5707eefe2f08d230c07ab4693ac0bd59e809f85 [TASKMGR] High speed update is twice per second, and not every second.
0.4.15-dev-6121-g 2da0506f2a9fc02acede7d7ff479399013830fad [TASKMGR] Remove more dead code.
partially 0.4.15-dev-6120-g 6e77747b305add73133faa2049b8bd34e3e2534e [TASKMGR] Simplify tray icon code. (I left out using the strsafe.h-dependent stuff, as this is safe also in old-style)
0.4.15-dev-6119-g 0b4c8bdd1cb4cf1a50c1076c7ded19ee7e9f9198 [TASKMGR] Clamp the values returned from PerfDataGetProcessorUsage() and PerfDataGetProcessorSystemUsage() inside these functions.
0.4.15-dev-6118-g 7b53126375ee8889cf24615fa2ea646feabee0ae [TASKMGR] Completely reformat perfpage.c, perfpage.h, procpage.h and trayicon.c
partially 0.4.15-dev-6117-g da7dcec6a06c052339120ed4baa3caf24594f163 [TASKMGR] Reformat the files' headers
0.4.15-dev-6115-g 36aea8e56eb6eb9f1cab5fd6ce040b80ef6a302f [TASKMGR] affinity.c: Use _countof instead of sizeof/sizeof (was part of the larger CORE18991)
partially 0.4.15-dev-6109-g 99fb812be4ba86139438bf7961f2030ac9e016be [TASKMGR] Refactor trayicon.c
0.4.15-dev-5404-g c093d4f8038e7ddec1ca193edc573c48e12f12ff [TASKMGR] Prevent context menu on idle process (#4889) CORE-18640
0.4.15-dev-5031-g 46ea5171bdfaba2606486e27821fdd9ee88e551a [TASKMGR] Pixel-perfection for left border (#4680) CORE-18061
0.4.15-dev-4988-g de5af76811bbd318cdef46e193f306833e3fa740 [TASKMGR] Fix overlapping controls (French only) (#4658)
0.4.15-dev-4987-g f8c28b977363444ad31124a6794347c53532b43f [TASKMGR] Fix UI on SwitchTo for multiple application (#4652)
0.4.15-dev-3497-g e8a7e0da2bcbd842f95e4224e72bfb5d748dbd05 [TASKMGR] Make 'Hide When Minimized' non-default (#4169)
0.4.15-dev-3085-g 515e0cf38f8d07e59bb003f930eb08d33dc5f85d [TASKMGR] Handles: Get number only, skip data (#3910)
and a few *.rc improvements that are not explicitly mentioned here,
especially I stripped the menuLoop-statusbar-help-texts within the older branches.
I also port back the following feature into all releases down to releases/0.4.8, but I left out releases/0.4.7 for now:
0.4.13-dev-875-g 3276824586fefd531f4473046618fa2724442a53 [TASKMGR] Implement proper process tree ending (#1738)
A few improvements are still left to be done in a future commit (mostly around the plotgraphs and the trayicon-handling),
but I need to have a closer look at them and their impact on binary size,
so I do not want to squash them into this bigger backport,
where I concentrated on the safe/obvious and easy things.
Binary size decreases for all branches:
master taskmgr.exe RosBEWin2.2.2 GCC8.4.0dbg 708.608 -> 696.832 (0.4.15-dev-6768-g63eaf2b)
0.4.14 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 660.992 -> 549.888
0.4.13 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 659.968 -> 542.720
0.4.12 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 662.016 -> 545.792
0.4.11 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 662.016 -> 545.792
0.4.10 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 645.120 -> 532.480
0.4. 9 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 645.120 -> 532.480
0.4. 8 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 645.120 -> 532.480
0.4. 7 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 645.120 -> 531.456
taskmgr.exe MS XPSP3 german 140.800 Bytes
0.4.14 taskmgr.exe RosBEWin2.1.6 MSVC2010SP1rls I18N=de-DE -> 110.080 Bytes (my current taskmgr of choice)
0.4. 8 taskmgr.exe RosBEWin2.1.6 MSVC2010SP1rls I18N=en-US -> 108.032 Bytes
0.4. 7 taskmgr.exe RosBEWin2.1.6 MSVC2010SP1rls I18N=en-US -> 107.520 Bytes
2023-10-19 13:05:47 +00:00
|
|
|
SendMessageW(hProcessPageHeaderCtrl, HDM_GETORDERARRAY, (WPARAM)size, (LPARAM)&TaskManagerSettings.ColumnOrderArray);
|
2004-01-10 02:14:13 +00:00
|
|
|
|
|
|
|
/* Get visible columns */
|
2007-11-09 19:46:01 +00:00
|
|
|
for (i = 0; i < SendMessageW(hProcessPageHeaderCtrl, HDM_GETITEMCOUNT, 0, 0); i++) {
|
2004-01-10 02:14:13 +00:00
|
|
|
memset(&hditem, 0, sizeof(HDITEM));
|
|
|
|
|
|
|
|
hditem.mask = HDI_TEXT|HDI_WIDTH;
|
|
|
|
hditem.pszText = text;
|
|
|
|
hditem.cchTextMax = 260;
|
|
|
|
|
2007-11-09 15:26:02 +00:00
|
|
|
SendMessageW(hProcessPageHeaderCtrl, HDM_GETITEM, i, (LPARAM) &hditem);
|
2004-01-10 02:14:13 +00:00
|
|
|
|
2007-11-09 19:46:01 +00:00
|
|
|
for (n = 0; n < COLUMN_NMAX; n++) {
|
[0.4.11][TASKMGR] Backport many fixes and improvements
Some commits I do port back all the way down till releases/0.4.7:
partially 0.4.15-dev-6768-g 63eaf2bd529f5bf94cde65afc26944e98b47850b [TASKMGR] *.rc Deduplicate dynamic menu strings (#5772) (I left out the FIXME-comments)
0.4.15-dev-6712-g 46b4b5581d1fc4c1b50cfc0ee8b82b77be182dc6 [TASKMGR] Favor _countof(), no functional change intended (#5757)
0.4.15-dev-6703-g 6528ab8fcb41eb47ee17cf738760126e6758af94 [TASKMGR] de-DE.rc Update part 3
0.4.15-dev-6702-g 65ce20896afa19032612871506dd5d1e8eb73119 [TASKMGR] *.rc Strip unused IDD_DEBUG_CHANNELS_DIALOG
0.4.15-dev-6700-g e15d68ba5d9906674b363cf8362ed08494e53a76 [TASKMGR] de-DE German Update & bug-fixes
partially 0.4.15-dev-6447-g 016acd170dd75a7a24af235339a5321e2c24bf5a [TASKMGR] Do not free shared icon for ShellAbout() calls (I picked just the taskmgr part) (was part of larger PR5519)
0.4.15-dev-6297-g 831288fe691ec311c5b910f05d9b833b4b952261 [TASKMGR] Fix text truncation for fr-FR.rc (#5380) CORE-18523
0.4.15-dev-6127-g c706222f3f1b2a63e8cc969ee756c8be92527853 [TASKMGR] Fix the license. Turns out it's LGPL-2.1-or-later from the texts.
0.4.15-dev-6124-g 9927163455b83fea29c6420a688535b8e233bff6 [TASKMGR] Reorder page controls to have natural TAB-ordering.
0.4.15-dev-6122-g d5707eefe2f08d230c07ab4693ac0bd59e809f85 [TASKMGR] High speed update is twice per second, and not every second.
0.4.15-dev-6121-g 2da0506f2a9fc02acede7d7ff479399013830fad [TASKMGR] Remove more dead code.
partially 0.4.15-dev-6120-g 6e77747b305add73133faa2049b8bd34e3e2534e [TASKMGR] Simplify tray icon code. (I left out using the strsafe.h-dependent stuff, as this is safe also in old-style)
0.4.15-dev-6119-g 0b4c8bdd1cb4cf1a50c1076c7ded19ee7e9f9198 [TASKMGR] Clamp the values returned from PerfDataGetProcessorUsage() and PerfDataGetProcessorSystemUsage() inside these functions.
0.4.15-dev-6118-g 7b53126375ee8889cf24615fa2ea646feabee0ae [TASKMGR] Completely reformat perfpage.c, perfpage.h, procpage.h and trayicon.c
partially 0.4.15-dev-6117-g da7dcec6a06c052339120ed4baa3caf24594f163 [TASKMGR] Reformat the files' headers
0.4.15-dev-6115-g 36aea8e56eb6eb9f1cab5fd6ce040b80ef6a302f [TASKMGR] affinity.c: Use _countof instead of sizeof/sizeof (was part of the larger CORE18991)
partially 0.4.15-dev-6109-g 99fb812be4ba86139438bf7961f2030ac9e016be [TASKMGR] Refactor trayicon.c
0.4.15-dev-5404-g c093d4f8038e7ddec1ca193edc573c48e12f12ff [TASKMGR] Prevent context menu on idle process (#4889) CORE-18640
0.4.15-dev-5031-g 46ea5171bdfaba2606486e27821fdd9ee88e551a [TASKMGR] Pixel-perfection for left border (#4680) CORE-18061
0.4.15-dev-4988-g de5af76811bbd318cdef46e193f306833e3fa740 [TASKMGR] Fix overlapping controls (French only) (#4658)
0.4.15-dev-4987-g f8c28b977363444ad31124a6794347c53532b43f [TASKMGR] Fix UI on SwitchTo for multiple application (#4652)
0.4.15-dev-3497-g e8a7e0da2bcbd842f95e4224e72bfb5d748dbd05 [TASKMGR] Make 'Hide When Minimized' non-default (#4169)
0.4.15-dev-3085-g 515e0cf38f8d07e59bb003f930eb08d33dc5f85d [TASKMGR] Handles: Get number only, skip data (#3910)
and a few *.rc improvements that are not explicitly mentioned here,
especially I stripped the menuLoop-statusbar-help-texts within the older branches.
I also port back the following feature into all releases down to releases/0.4.8, but I left out releases/0.4.7 for now:
0.4.13-dev-875-g 3276824586fefd531f4473046618fa2724442a53 [TASKMGR] Implement proper process tree ending (#1738)
A few improvements are still left to be done in a future commit (mostly around the plotgraphs and the trayicon-handling),
but I need to have a closer look at them and their impact on binary size,
so I do not want to squash them into this bigger backport,
where I concentrated on the safe/obvious and easy things.
Binary size decreases for all branches:
master taskmgr.exe RosBEWin2.2.2 GCC8.4.0dbg 708.608 -> 696.832 (0.4.15-dev-6768-g63eaf2b)
0.4.14 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 660.992 -> 549.888
0.4.13 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 659.968 -> 542.720
0.4.12 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 662.016 -> 545.792
0.4.11 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 662.016 -> 545.792
0.4.10 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 645.120 -> 532.480
0.4. 9 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 645.120 -> 532.480
0.4. 8 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 645.120 -> 532.480
0.4. 7 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 645.120 -> 531.456
taskmgr.exe MS XPSP3 german 140.800 Bytes
0.4.14 taskmgr.exe RosBEWin2.1.6 MSVC2010SP1rls I18N=de-DE -> 110.080 Bytes (my current taskmgr of choice)
0.4. 8 taskmgr.exe RosBEWin2.1.6 MSVC2010SP1rls I18N=en-US -> 108.032 Bytes
0.4. 7 taskmgr.exe RosBEWin2.1.6 MSVC2010SP1rls I18N=en-US -> 107.520 Bytes
2023-10-19 13:05:47 +00:00
|
|
|
LoadStringW(hInst, ColumnPresets[n].dwIdsName, szTemp, _countof(szTemp));
|
2007-11-09 15:26:02 +00:00
|
|
|
if (_wcsicmp(text, szTemp) == 0)
|
2007-08-03 07:35:39 +00:00
|
|
|
{
|
|
|
|
TaskManagerSettings.Columns[n] = TRUE;
|
|
|
|
TaskManagerSettings.ColumnSizeArray[n] = hditem.cxy;
|
|
|
|
}
|
2004-01-10 02:14:13 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void ProcessPage_OnViewSelectColumns(void)
|
|
|
|
{
|
2007-10-31 23:26:27 +00:00
|
|
|
int i;
|
2004-01-10 02:14:13 +00:00
|
|
|
|
2007-11-09 15:26:02 +00:00
|
|
|
if (DialogBoxW(hInst, MAKEINTRESOURCEW(IDD_COLUMNS_DIALOG), hMainWnd, ColumnsDialogWndProc) == IDOK)
|
2004-01-10 02:14:13 +00:00
|
|
|
{
|
|
|
|
for (i=Header_GetItemCount(hProcessPageHeaderCtrl)-1; i>=0; i--)
|
|
|
|
{
|
2006-03-04 17:27:40 +00:00
|
|
|
(void)ListView_DeleteColumn(hProcessPageListCtrl, i);
|
2004-01-10 02:14:13 +00:00
|
|
|
}
|
|
|
|
|
2007-08-03 07:35:39 +00:00
|
|
|
for (i=0; i<COLUMN_NMAX; i++) {
|
2004-01-10 02:14:13 +00:00
|
|
|
TaskManagerSettings.ColumnOrderArray[i] = i;
|
2007-08-03 07:35:39 +00:00
|
|
|
TaskManagerSettings.ColumnSizeArray[i] = ColumnPresets[i].size;
|
|
|
|
}
|
2004-01-10 02:14:13 +00:00
|
|
|
|
|
|
|
AddColumns();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2004-10-11 21:08:06 +00:00
|
|
|
INT_PTR CALLBACK
|
|
|
|
ColumnsDialogWndProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
|
2004-01-10 02:14:13 +00:00
|
|
|
{
|
2007-10-31 23:26:27 +00:00
|
|
|
unsigned int i;
|
2004-01-10 02:14:13 +00:00
|
|
|
|
|
|
|
switch (message)
|
|
|
|
{
|
|
|
|
case WM_INITDIALOG:
|
2007-08-03 07:35:39 +00:00
|
|
|
for (i=0; i<COLUMN_NMAX; i++) {
|
|
|
|
if (TaskManagerSettings.Columns[i])
|
2012-12-24 10:51:02 +00:00
|
|
|
CheckDlgButton(hDlg, ColumnPresets[i].dwIdcCtrl, BST_CHECKED);
|
2007-08-03 07:35:39 +00:00
|
|
|
}
|
2004-01-10 02:14:13 +00:00
|
|
|
return TRUE;
|
|
|
|
|
|
|
|
case WM_COMMAND:
|
|
|
|
if (LOWORD(wParam) == IDCANCEL)
|
|
|
|
{
|
|
|
|
EndDialog(hDlg, LOWORD(wParam));
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (LOWORD(wParam) == IDOK)
|
|
|
|
{
|
2007-08-03 07:35:39 +00:00
|
|
|
for (i=0; i<COLUMN_NMAX; i++)
|
2012-12-24 10:51:02 +00:00
|
|
|
TaskManagerSettings.Columns[i] = (BOOL)IsDlgButtonChecked(hDlg, ColumnPresets[i].dwIdcCtrl);
|
2004-01-10 02:14:13 +00:00
|
|
|
|
|
|
|
EndDialog(hDlg, LOWORD(wParam));
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
void UpdateColumnDataHints(void)
|
|
|
|
{
|
2007-10-31 23:26:27 +00:00
|
|
|
HDITEM hditem;
|
|
|
|
WCHAR text[260];
|
|
|
|
ULONG Index;
|
2014-10-22 16:01:24 +00:00
|
|
|
ULONG uItems;
|
2007-10-31 23:26:27 +00:00
|
|
|
WCHAR szTemp[256];
|
2014-10-22 16:01:24 +00:00
|
|
|
UINT i;
|
|
|
|
|
|
|
|
uItems = min(SendMessageW(hProcessPageHeaderCtrl, HDM_GETITEMCOUNT, 0, 0), COLUMN_NMAX);
|
2004-01-10 02:14:13 +00:00
|
|
|
|
2014-10-22 16:01:24 +00:00
|
|
|
for (Index=0; Index<uItems; Index++)
|
2004-01-10 02:14:13 +00:00
|
|
|
{
|
|
|
|
memset(&hditem, 0, sizeof(HDITEM));
|
|
|
|
|
|
|
|
hditem.mask = HDI_TEXT;
|
|
|
|
hditem.pszText = text;
|
|
|
|
hditem.cchTextMax = 260;
|
|
|
|
|
2007-11-09 15:26:02 +00:00
|
|
|
SendMessageW(hProcessPageHeaderCtrl, HDM_GETITEM, Index, (LPARAM) &hditem);
|
2004-01-10 02:14:13 +00:00
|
|
|
|
2007-08-03 07:35:39 +00:00
|
|
|
for (i=0; i<COLUMN_NMAX; i++) {
|
[0.4.11][TASKMGR] Backport many fixes and improvements
Some commits I do port back all the way down till releases/0.4.7:
partially 0.4.15-dev-6768-g 63eaf2bd529f5bf94cde65afc26944e98b47850b [TASKMGR] *.rc Deduplicate dynamic menu strings (#5772) (I left out the FIXME-comments)
0.4.15-dev-6712-g 46b4b5581d1fc4c1b50cfc0ee8b82b77be182dc6 [TASKMGR] Favor _countof(), no functional change intended (#5757)
0.4.15-dev-6703-g 6528ab8fcb41eb47ee17cf738760126e6758af94 [TASKMGR] de-DE.rc Update part 3
0.4.15-dev-6702-g 65ce20896afa19032612871506dd5d1e8eb73119 [TASKMGR] *.rc Strip unused IDD_DEBUG_CHANNELS_DIALOG
0.4.15-dev-6700-g e15d68ba5d9906674b363cf8362ed08494e53a76 [TASKMGR] de-DE German Update & bug-fixes
partially 0.4.15-dev-6447-g 016acd170dd75a7a24af235339a5321e2c24bf5a [TASKMGR] Do not free shared icon for ShellAbout() calls (I picked just the taskmgr part) (was part of larger PR5519)
0.4.15-dev-6297-g 831288fe691ec311c5b910f05d9b833b4b952261 [TASKMGR] Fix text truncation for fr-FR.rc (#5380) CORE-18523
0.4.15-dev-6127-g c706222f3f1b2a63e8cc969ee756c8be92527853 [TASKMGR] Fix the license. Turns out it's LGPL-2.1-or-later from the texts.
0.4.15-dev-6124-g 9927163455b83fea29c6420a688535b8e233bff6 [TASKMGR] Reorder page controls to have natural TAB-ordering.
0.4.15-dev-6122-g d5707eefe2f08d230c07ab4693ac0bd59e809f85 [TASKMGR] High speed update is twice per second, and not every second.
0.4.15-dev-6121-g 2da0506f2a9fc02acede7d7ff479399013830fad [TASKMGR] Remove more dead code.
partially 0.4.15-dev-6120-g 6e77747b305add73133faa2049b8bd34e3e2534e [TASKMGR] Simplify tray icon code. (I left out using the strsafe.h-dependent stuff, as this is safe also in old-style)
0.4.15-dev-6119-g 0b4c8bdd1cb4cf1a50c1076c7ded19ee7e9f9198 [TASKMGR] Clamp the values returned from PerfDataGetProcessorUsage() and PerfDataGetProcessorSystemUsage() inside these functions.
0.4.15-dev-6118-g 7b53126375ee8889cf24615fa2ea646feabee0ae [TASKMGR] Completely reformat perfpage.c, perfpage.h, procpage.h and trayicon.c
partially 0.4.15-dev-6117-g da7dcec6a06c052339120ed4baa3caf24594f163 [TASKMGR] Reformat the files' headers
0.4.15-dev-6115-g 36aea8e56eb6eb9f1cab5fd6ce040b80ef6a302f [TASKMGR] affinity.c: Use _countof instead of sizeof/sizeof (was part of the larger CORE18991)
partially 0.4.15-dev-6109-g 99fb812be4ba86139438bf7961f2030ac9e016be [TASKMGR] Refactor trayicon.c
0.4.15-dev-5404-g c093d4f8038e7ddec1ca193edc573c48e12f12ff [TASKMGR] Prevent context menu on idle process (#4889) CORE-18640
0.4.15-dev-5031-g 46ea5171bdfaba2606486e27821fdd9ee88e551a [TASKMGR] Pixel-perfection for left border (#4680) CORE-18061
0.4.15-dev-4988-g de5af76811bbd318cdef46e193f306833e3fa740 [TASKMGR] Fix overlapping controls (French only) (#4658)
0.4.15-dev-4987-g f8c28b977363444ad31124a6794347c53532b43f [TASKMGR] Fix UI on SwitchTo for multiple application (#4652)
0.4.15-dev-3497-g e8a7e0da2bcbd842f95e4224e72bfb5d748dbd05 [TASKMGR] Make 'Hide When Minimized' non-default (#4169)
0.4.15-dev-3085-g 515e0cf38f8d07e59bb003f930eb08d33dc5f85d [TASKMGR] Handles: Get number only, skip data (#3910)
and a few *.rc improvements that are not explicitly mentioned here,
especially I stripped the menuLoop-statusbar-help-texts within the older branches.
I also port back the following feature into all releases down to releases/0.4.8, but I left out releases/0.4.7 for now:
0.4.13-dev-875-g 3276824586fefd531f4473046618fa2724442a53 [TASKMGR] Implement proper process tree ending (#1738)
A few improvements are still left to be done in a future commit (mostly around the plotgraphs and the trayicon-handling),
but I need to have a closer look at them and their impact on binary size,
so I do not want to squash them into this bigger backport,
where I concentrated on the safe/obvious and easy things.
Binary size decreases for all branches:
master taskmgr.exe RosBEWin2.2.2 GCC8.4.0dbg 708.608 -> 696.832 (0.4.15-dev-6768-g63eaf2b)
0.4.14 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 660.992 -> 549.888
0.4.13 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 659.968 -> 542.720
0.4.12 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 662.016 -> 545.792
0.4.11 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 662.016 -> 545.792
0.4.10 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 645.120 -> 532.480
0.4. 9 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 645.120 -> 532.480
0.4. 8 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 645.120 -> 532.480
0.4. 7 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 645.120 -> 531.456
taskmgr.exe MS XPSP3 german 140.800 Bytes
0.4.14 taskmgr.exe RosBEWin2.1.6 MSVC2010SP1rls I18N=de-DE -> 110.080 Bytes (my current taskmgr of choice)
0.4. 8 taskmgr.exe RosBEWin2.1.6 MSVC2010SP1rls I18N=en-US -> 108.032 Bytes
0.4. 7 taskmgr.exe RosBEWin2.1.6 MSVC2010SP1rls I18N=en-US -> 107.520 Bytes
2023-10-19 13:05:47 +00:00
|
|
|
LoadStringW(hInst, ColumnPresets[i].dwIdsName, szTemp, _countof(szTemp));
|
2007-11-09 15:26:02 +00:00
|
|
|
if (_wcsicmp(text, szTemp) == 0)
|
2007-08-03 07:35:39 +00:00
|
|
|
ColumnDataHints[Index] = i;
|
|
|
|
}
|
2004-01-10 02:14:13 +00:00
|
|
|
}
|
|
|
|
}
|