05bd251440
- Themed status bar/header: hot-part tracking with partial invalidation, owner-draw/icon/RTL support, sizegrip drawn last, header images/alignment, buffered header paint, DPI change handling, and capture-change hover reset. - Fill erase background in dialog/static hooks and sysinfo container to avoid flicker; add menu popup border frame. - Explorer theme mode follows the Windows dark preference. - Service list: add 'Group services by' (type, load order group, svchost group, start type) with synthetic group nodes. - Session properties: query nltest account info on a background thread and decode its security descriptor with a read-only permissions viewer. - Add PhIsLaunchedByTaskScheduler and PhGetWindowsBuildString. - phlib buffered paint uses UxTheme unless PHLIB_PAINT_BUFFER is defined. - Add I/O total bytes process column; set initial focus on several process property pages. - Plugins: only walk WOW64 stacks for WOW64 processes, add WindowExplorer pause/resume, remove disk cache events page, refresh frame on netoptions border changes, and fix Updater SymCrypt hash size init.
126 lines
3.4 KiB
C
126 lines
3.4 KiB
C
/*
|
|
* Copyright (c) 2022 Winsider Seminars & Solutions, Inc. All rights reserved.
|
|
*
|
|
* This file is part of System Informer.
|
|
*
|
|
* Authors:
|
|
*
|
|
* wj32 2009-2016
|
|
*
|
|
*/
|
|
|
|
#include <phapp.h>
|
|
#include <phsettings.h>
|
|
#include <procprp.h>
|
|
#include <procprv.h>
|
|
|
|
static VOID PhpLayoutServiceListControl(
|
|
_In_ HWND hwndDlg,
|
|
_In_ HWND ServiceListHandle
|
|
)
|
|
{
|
|
RECT rect;
|
|
|
|
if (!PhGetWindowRect(GetDlgItem(hwndDlg, IDC_SERVICES_LAYOUT), &rect))
|
|
return;
|
|
|
|
MapWindowRect(NULL, hwndDlg, &rect);
|
|
|
|
MoveWindow(
|
|
ServiceListHandle,
|
|
rect.left,
|
|
rect.top,
|
|
rect.right - rect.left,
|
|
rect.bottom - rect.top,
|
|
TRUE
|
|
);
|
|
}
|
|
|
|
INT_PTR CALLBACK PhpProcessServicesDlgProc(
|
|
_In_ HWND hwndDlg,
|
|
_In_ UINT uMsg,
|
|
_In_ WPARAM wParam,
|
|
_In_ LPARAM lParam
|
|
)
|
|
{
|
|
PPH_PROCESS_PROPPAGECONTEXT propPageContext;
|
|
PPH_PROCESS_ITEM processItem;
|
|
|
|
if (!PhPropPageDlgProcHeader(hwndDlg, uMsg, lParam, NULL, &propPageContext, &processItem))
|
|
return FALSE;
|
|
|
|
switch (uMsg)
|
|
{
|
|
case WM_INITDIALOG:
|
|
{
|
|
PPH_SERVICE_ITEM *services;
|
|
ULONG numberOfServices;
|
|
ULONG i;
|
|
HWND serviceListHandle;
|
|
|
|
// Get a copy of the process' service list.
|
|
|
|
PhAcquireQueuedLockShared(&processItem->ServiceListLock);
|
|
|
|
numberOfServices = processItem->ServiceList->Count;
|
|
services = PhAllocate(numberOfServices * sizeof(PPH_SERVICE_ITEM));
|
|
|
|
{
|
|
ULONG enumerationKey = 0;
|
|
PPH_SERVICE_ITEM serviceItem;
|
|
|
|
i = 0;
|
|
|
|
while (PhEnumPointerList(processItem->ServiceList, &enumerationKey, &serviceItem))
|
|
{
|
|
PhReferenceObject(serviceItem);
|
|
services[i++] = serviceItem;
|
|
}
|
|
}
|
|
|
|
PhReleaseQueuedLockShared(&processItem->ServiceListLock);
|
|
|
|
serviceListHandle = PhCreateServiceListControl(
|
|
hwndDlg,
|
|
services,
|
|
numberOfServices
|
|
);
|
|
SendMessage(serviceListHandle, WM_PH_SET_LIST_VIEW_SETTINGS, 0, (LPARAM)SETTING_PROCESS_SERVICE_LIST_VIEW_COLUMNS);
|
|
ShowWindow(serviceListHandle, SW_SHOW);
|
|
|
|
propPageContext->Context = serviceListHandle;
|
|
|
|
PhInitializeWindowTheme(hwndDlg, PhEnableThemeSupport);
|
|
|
|
PhSetDialogFocus(hwndDlg, serviceListHandle);
|
|
}
|
|
break;
|
|
case WM_SHOWWINDOW:
|
|
{
|
|
PPH_LAYOUT_ITEM dialogItem;
|
|
|
|
if (dialogItem = PhBeginPropPageLayout(hwndDlg, propPageContext))
|
|
{
|
|
PhAddPropPageLayoutItem(hwndDlg, GetDlgItem(hwndDlg, IDC_SERVICES_LAYOUT), dialogItem, PH_ANCHOR_ALL);
|
|
PhEndPropPageLayout(hwndDlg, propPageContext);
|
|
|
|
PhpLayoutServiceListControl(hwndDlg, (HWND)propPageContext->Context);
|
|
}
|
|
}
|
|
break;
|
|
case WM_SIZE:
|
|
{
|
|
PhpLayoutServiceListControl(hwndDlg, (HWND)propPageContext->Context);
|
|
}
|
|
break;
|
|
case WM_CTLCOLORBTN:
|
|
return HANDLE_WM_CTLCOLORBTN(hwndDlg, wParam, lParam, PhWindowThemeControlColor);
|
|
case WM_CTLCOLORDLG:
|
|
return HANDLE_WM_CTLCOLORDLG(hwndDlg, wParam, lParam, PhWindowThemeControlColor);
|
|
case WM_CTLCOLORSTATIC:
|
|
return HANDLE_WM_CTLCOLORSTATIC(hwndDlg, wParam, lParam, PhWindowThemeControlColor);
|
|
}
|
|
|
|
return FALSE;
|
|
}
|