Update graphs and guisup types

This commit is contained in:
dmex
2024-09-09 01:35:03 +10:00
parent 284f445345
commit 5bf7f29306
16 changed files with 961 additions and 130 deletions
+12
View File
@@ -207,6 +207,18 @@ typedef struct _PH_NF_ICON_REGISTRATION_DATA
PPH_NF_ICON_UPDATE_CALLBACK UpdateCallback;
PPH_NF_ICON_MESSAGE_CALLBACK MessageCallback;
} PH_NF_ICON_REGISTRATION_DATA, *PPH_NF_ICON_REGISTRATION_DATA;
VOID PhDrawTrayIconText(
_In_ HDC hdc,
_In_ PVOID Bits,
_Inout_ PPH_GRAPH_DRAW_INFO DrawInfo,
_In_ PPH_STRINGREF Text
);
HFONT PhNfGetTrayIconFont(
_In_opt_ LONG DpiValue
);
// end_phapppub
#endif
+1 -12
View File
@@ -43,7 +43,7 @@ typedef struct _PH_NF_BITMAP
BOOLEAN Initialized;
HDC Hdc;
HBITMAP Bitmap;
PVOID Bits;
LPRGBQUAD Bits;
LONG Width;
LONG Height;
LONG TaskbarDpi;
@@ -57,17 +57,6 @@ HICON PhNfpGetBlackIcon(
VOID
);
VOID PhDrawTrayIconText(
_In_ HDC hdc,
_In_ PVOID Bits,
_Inout_ PPH_GRAPH_DRAW_INFO DrawInfo,
_In_ PPH_STRINGREF Text
);
HFONT PhNfGetTrayIconFont(
_In_opt_ LONG DpiValue
);
BOOLEAN PhNfpAddNotifyIcon(
_In_ PPH_NF_ICON Icon
);
+7 -4
View File
@@ -23,7 +23,7 @@
typedef enum _PH_GENERAL_CALLBACK
{
GeneralCallbackMainWindowShowing = 0, // INT ShowCommand [main thread]
GeneralCallbackProcessesUpdated = 1, // [main thread]
GeneralCallbackProcessesUpdated = 1, // ULONG RunId [main thread]
GeneralCallbackGetProcessHighlightingColor = 2, // PPH_PLUGIN_GET_HIGHLIGHTING_COLOR Data [main thread]
GeneralCallbackGetProcessTooltipText = 3, // PPH_PLUGIN_GET_TOOLTIP_TEXT Data [main thread]
GeneralCallbackProcessPropertiesInitializing = 4, // PPH_PLUGIN_PROCESS_PROPCONTEXT Data [properties thread]
@@ -71,8 +71,9 @@ typedef enum _PH_GENERAL_CALLBACK
GeneralCallbackNetworkProviderRemovedEvent, // [network provider thread]
GeneralCallbackNetworkProviderUpdatedEvent, // [network provider thread]
GeneralCallbackLoggedEvent,
GeneralCallbackTrayIconsInitializing,
GeneralCallbackLoggedEvent, // [multiple provider threads]
GeneralCallbackTrayIconsInitializing, // [work queue thread]
GeneralCallbackWindowNotifyEvent,
GeneralCallbackProcessStatsNotifyEvent,
GeneralCallbackSettingsUpdated,
@@ -358,6 +359,8 @@ typedef PPH_MINIINFO_SECTION (NTAPI *PPH_MINIINFO_FIND_SECTION)(
_In_ PPH_STRINGREF Name
);
typedef struct _PH_MINIINFO_LIST_SECTION PH_MINIINFO_LIST_SECTION, *PPH_MINIINFO_LIST_SECTION;
typedef PPH_MINIINFO_LIST_SECTION (NTAPI *PPH_MINIINFO_CREATE_LIST_SECTION)(
_In_ PWSTR Name,
_In_ ULONG Flags,
@@ -375,7 +378,7 @@ typedef struct _PH_PLUGIN_MINIINFO_POINTERS
// begin_phapppub
typedef struct _PH_NF_ICON_REGISTRATION_DATA *PPH_NF_ICON_REGISTRATION_DATA;
typedef struct _PH_PLUGIN *PPH_PLUGIN;
typedef struct _PH_PLUGIN PH_PLUGIN, *PPH_PLUGIN;
/**
* Creates a notification icon.
+1 -1
View File
@@ -45,7 +45,7 @@ typedef struct _PH_SYSINFO_PARAMETERS
ULONG MinimumGraphHeight;
ULONG SectionViewGraphHeight;
ULONG PanelWidth;
LONG PanelWidth;
LONG WindowDpi;
// end_phapppub
+7 -4
View File
@@ -6,7 +6,7 @@
* Authors:
*
* wj32 2011-2016
* dmex 2016-2023
* dmex 2016-2024
*
*/
@@ -280,9 +280,12 @@ VOID PhSipSetOneGraphPerCpu(
VOID
);
VOID PhSipNotifyCpuGraph(
_In_ ULONG Index,
_In_ NMHDR *Header
BOOLEAN NTAPI PhSipCpuGraphCallback(
_In_ HWND GraphHandle,
_In_ ULONG GraphMessage,
_In_ PVOID Parameter1,
_In_ PVOID Parameter2,
_In_ PVOID Context
);
VOID PhSipUpdateCpuGraphs(
+40 -28
View File
@@ -44,6 +44,7 @@ static ULONG PhMipRefreshAutomatically;
static BOOLEAN PhMipPinned;
static HWND PhMipWindow = NULL;
static HWND PhMipLayoutWindow = NULL;
static PH_LAYOUT_MANAGER PhMipLayoutManager;
static RECT MinimumSize;
static PH_CALLBACK_REGISTRATION ProcessesUpdatedRegistration;
@@ -104,7 +105,7 @@ VOID PhPinMiniInformation(
PhMipContainerWindow = CreateWindowEx(
WS_EX_TOOLWINDOW,
MAKEINTATOM(windowAtom),
PhApplicationName,
NULL,
WS_BORDER | WS_THICKFRAME | WS_POPUP,
0,
0,
@@ -259,6 +260,7 @@ INT_PTR CALLBACK PhMipMiniInfoDialogProc(
case WM_INITDIALOG:
{
PhMipWindow = hwndDlg;
PhMipLayoutWindow = GetDlgItem(hwndDlg, IDC_LAYOUT);
PhMipOnInitDialog();
}
break;
@@ -347,8 +349,6 @@ VOID PhMipContainerOnShowWindow(
NULL,
&ProcessesUpdatedRegistration
);
PhMipContainerOnSize();
}
else
{
@@ -464,7 +464,7 @@ VOID PhMipOnInitDialog(
SET_BUTTON_ICON(PhMipWindow, IDC_PINWINDOW, pin);
PhInitializeLayoutManager(&PhMipLayoutManager, PhMipWindow);
PhAddLayoutItem(&PhMipLayoutManager, GetDlgItem(PhMipWindow, IDC_LAYOUT), NULL, PH_ANCHOR_ALL);
PhAddLayoutItem(&PhMipLayoutManager, PhMipLayoutWindow, NULL, PH_ANCHOR_ALL);
PhAddLayoutItem(&PhMipLayoutManager, sectionWindow, NULL, PH_ANCHOR_LEFT | PH_ANCHOR_RIGHT | PH_ANCHOR_BOTTOM | PH_LAYOUT_FORCE_INVALIDATE);
PhAddLayoutItem(&PhMipLayoutManager, GetDlgItem(PhMipWindow, IDC_OPTIONS), NULL, PH_ANCHOR_RIGHT | PH_ANCHOR_BOTTOM);
PhAddLayoutItem(&PhMipLayoutManager, GetDlgItem(PhMipWindow, IDC_PINWINDOW), NULL, PH_ANCHOR_RIGHT | PH_ANCHOR_BOTTOM);
@@ -472,9 +472,9 @@ VOID PhMipOnInitDialog(
Button_SetCheck(GetDlgItem(PhMipWindow, IDC_PINWINDOW), !!PhGetIntegerSetting(L"MiniInfoWindowPinned"));
// Subclass the window procedure.
oldWndProc = (WNDPROC)GetWindowLongPtr(sectionWindow, GWLP_WNDPROC);
oldWndProc = PhGetWindowProcedure(sectionWindow);
PhSetWindowContext(sectionWindow, 0xF, oldWndProc);
SetWindowLongPtr(sectionWindow, GWLP_WNDPROC, (LONG_PTR)PhMipSectionControlHookWndProc);
PhSetWindowProcedure(sectionWindow, PhMipSectionControlHookWndProc);
}
VOID PhMipOnShowWindow(
@@ -955,9 +955,10 @@ VOID PhMipLayout(
)
{
RECT clientRect;
RECT rect;
RECT windowRect;
GetClientRect(PhMipContainerWindow, &clientRect);
MoveWindow(
PhMipWindow,
clientRect.left, clientRect.top,
@@ -967,42 +968,42 @@ VOID PhMipLayout(
PhLayoutManagerLayout(&PhMipLayoutManager);
GetWindowRect(GetDlgItem(PhMipWindow, IDC_LAYOUT), &rect);
MapWindowPoints(NULL, PhMipWindow, (POINT *)&rect, 2);
GetWindowRect(PhMipLayoutWindow, &windowRect);
MapWindowRect(NULL, PhMipWindow, &windowRect);
if (CurrentSection && CurrentSection->DialogHandle)
{
if (CurrentSection->Flags & PH_MINIINFO_SECTION_NO_UPPER_MARGINS)
{
rect.left = 0;
rect.top = 0;
rect.right = clientRect.right;
windowRect.left = 0;
windowRect.top = 0;
windowRect.right = clientRect.right;
}
else
{
LONG leftDistance = rect.left - clientRect.left;
LONG rightDistance = clientRect.right - rect.right;
LONG leftDistance = windowRect.left - clientRect.left;
LONG rightDistance = clientRect.right - windowRect.right;
LONG minDistance;
if (leftDistance != rightDistance)
{
// HACK: Enforce symmetry. Sometimes these are off by a pixel.
minDistance = min(leftDistance, rightDistance);
rect.left = clientRect.left + minDistance;
rect.right = clientRect.right - minDistance;
windowRect.left = clientRect.left + minDistance;
windowRect.right = clientRect.right - minDistance;
}
}
MoveWindow(
CurrentSection->DialogHandle,
rect.left, rect.top,
rect.right - rect.left, rect.bottom - rect.top,
windowRect.left, windowRect.top,
windowRect.right - windowRect.left, windowRect.bottom - windowRect.top,
TRUE
);
}
GetWindowRect(GetDlgItem(PhMipWindow, IDC_PINWINDOW), &rect);
MapWindowPoints(NULL, PhMipWindow, (POINT *)&rect, 2);
//GetWindowRect(GetDlgItem(PhMipWindow, IDC_PINWINDOW), &windowRect);
//MapWindowPoints(NULL, PhMipWindow, (POINT *)&rect, 2);
}
VOID PhMipBeginChildControlPin(
@@ -1289,7 +1290,11 @@ BOOLEAN PhMipListSectionCallback(
// We don't want to hold process item references while the mini info window
// is hidden.
PhMipClearListSection(listSection);
TreeNew_NodesStructured(listSection->TreeNewHandle);
if (listSection->TreeNewHandle)
{
TreeNew_NodesStructured(listSection->TreeNewHandle);
}
}
}
break;
@@ -1351,9 +1356,9 @@ INT_PTR CALLBACK PhMipListSectionDialogProc(
layoutItem->Margin.right = -1;
PhSetControlTheme(listSection->TreeNewHandle, L"explorer");
TreeNew_SetRedraw(listSection->TreeNewHandle, FALSE);
TreeNew_SetCallback(listSection->TreeNewHandle, PhMipListSectionTreeNewCallback, listSection);
TreeNew_SetRowHeight(listSection->TreeNewHandle, PhMipCalculateRowHeight(hwndDlg));
TreeNew_SetRedraw(listSection->TreeNewHandle, FALSE);
PhAddTreeNewColumnEx2(listSection->TreeNewHandle, MIP_SINGLE_COLUMN_ID, TRUE, L"Process", 1,
PH_ALIGN_LEFT, 0, 0, TN_COLUMN_FLAG_CUSTOMDRAW);
TreeNew_SetRedraw(listSection->TreeNewHandle, TRUE);
@@ -1371,6 +1376,7 @@ INT_PTR CALLBACK PhMipListSectionDialogProc(
case WM_SIZE:
{
PhLayoutManagerLayout(&listSection->LayoutManager);
TreeNew_AutoSizeColumn(listSection->TreeNewHandle, MIP_SINGLE_COLUMN_ID, TN_AUTOSIZE_REMAINING_SPACE);
}
break;
@@ -1429,8 +1435,11 @@ VOID PhMipTickListSection(
ListSection->Callback(ListSection, MiListSectionAssignSortData, &assignSortData, NULL);
}
TreeNew_NodesStructured(ListSection->TreeNewHandle);
TreeNew_AutoSizeColumn(ListSection->TreeNewHandle, MIP_SINGLE_COLUMN_ID, TN_AUTOSIZE_REMAINING_SPACE);
if (ListSection->TreeNewHandle)
{
TreeNew_NodesStructured(ListSection->TreeNewHandle);
TreeNew_AutoSizeColumn(ListSection->TreeNewHandle, MIP_SINGLE_COLUMN_ID, TN_AUTOSIZE_REMAINING_SPACE);
}
ListSection->Callback(ListSection, MiListSectionTick, NULL, NULL);
}
@@ -1449,6 +1458,9 @@ VOID PhMipClearListSection(
PhMipDestroyGroupNode(ListSection->NodeList->Items[i]);
PhClearList(ListSection->NodeList);
PhDereferenceObject(ListSection->NodeList);
ListSection->NodeList = PhCreateList(2);
}
LONG PhMipCalculateRowHeight(
@@ -1959,7 +1971,7 @@ VOID PhMipHandleListSectionCommand(
}
BOOLEAN PhMipCpuListSectionCallback(
_In_ struct _PH_MINIINFO_LIST_SECTION *ListSection,
_In_ PPH_MINIINFO_LIST_SECTION ListSection,
_In_ PH_MINIINFO_LIST_SECTION_MESSAGE Message,
_In_opt_ PVOID Parameter1,
_In_opt_ PVOID Parameter2
@@ -2086,7 +2098,7 @@ int __cdecl PhMipCpuListSectionNodeCompareFunction(
}
BOOLEAN PhMipCommitListSectionCallback(
_In_ struct _PH_MINIINFO_LIST_SECTION *ListSection,
_In_ PPH_MINIINFO_LIST_SECTION ListSection,
_In_ PH_MINIINFO_LIST_SECTION_MESSAGE Message,
_In_opt_ PVOID Parameter1,
_In_opt_ PVOID Parameter2
@@ -2195,7 +2207,7 @@ int __cdecl PhMipCommitListSectionNodeCompareFunction(
}
BOOLEAN PhMipPhysicalListSectionCallback(
_In_ struct _PH_MINIINFO_LIST_SECTION *ListSection,
_In_ PPH_MINIINFO_LIST_SECTION ListSection,
_In_ PH_MINIINFO_LIST_SECTION_MESSAGE Message,
_In_opt_ PVOID Parameter1,
_In_opt_ PVOID Parameter2
@@ -2306,7 +2318,7 @@ int __cdecl PhMipPhysicalListSectionNodeCompareFunction(
}
BOOLEAN PhMipIoListSectionCallback(
_In_ struct _PH_MINIINFO_LIST_SECTION *ListSection,
_In_ PPH_MINIINFO_LIST_SECTION ListSection,
_In_ PH_MINIINFO_LIST_SECTION_MESSAGE Message,
_In_opt_ PVOID Parameter1,
_In_opt_ PVOID Parameter2
+112 -26
View File
@@ -679,6 +679,86 @@ VOID PhSipOnCommand(
}
}
BOOLEAN NTAPI PhSipGraphCallback(
_In_ HWND GraphHandle,
_In_ ULONG GraphMessage,
_In_ PVOID Parameter1,
_In_ PVOID Parameter2,
_In_ PVOID Context
)
{
switch (GraphMessage)
{
case GCN_GETDRAWINFO:
{
PPH_GRAPH_GETDRAWINFO getDrawInfo = (PPH_GRAPH_GETDRAWINFO)Parameter1;
PPH_GRAPH_DRAW_INFO drawInfo = getDrawInfo->DrawInfo;
PPH_SYSINFO_SECTION section = (PPH_SYSINFO_SECTION)Context;
section->Callback(section, SysInfoGraphGetDrawInfo, drawInfo, NULL);
if (CurrentView == SysInfoSectionView)
{
drawInfo->Flags &= ~(PH_GRAPH_USE_GRID_X | PH_GRAPH_USE_GRID_Y | PH_GRAPH_LABEL_MAX_Y);
}
else
{
LONG badWidth = CurrentParameters.PanelWidth;
// Try not to draw max data point labels that will get covered by the
// fade-out part of the graph.
if (badWidth < drawInfo->Width)
drawInfo->LabelMaxYIndexLimit = (drawInfo->Width - badWidth) / 2;
else
drawInfo->LabelMaxYIndexLimit = ULONG_MAX;
}
}
break;
case GCN_GETTOOLTIPTEXT:
{
PPH_GRAPH_GETTOOLTIPTEXT getTooltipText = (PPH_GRAPH_GETTOOLTIPTEXT)Parameter1;
PPH_SYSINFO_SECTION section = (PPH_SYSINFO_SECTION)Context;
if (getTooltipText->Index < getTooltipText->TotalCount)
{
PH_SYSINFO_GRAPH_GET_TOOLTIP_TEXT graphGetTooltipText;
graphGetTooltipText.Index = getTooltipText->Index;
PhInitializeEmptyStringRef(&graphGetTooltipText.Text);
section->Callback(section, SysInfoGraphGetTooltipText, &graphGetTooltipText, NULL);
getTooltipText->Text = graphGetTooltipText.Text;
}
}
break;
case GCN_DRAWPANEL:
{
PPH_GRAPH_DRAWPANEL drawPanel = (PPH_GRAPH_DRAWPANEL)Parameter1;
PPH_SYSINFO_SECTION section = (PPH_SYSINFO_SECTION)Context;
if (CurrentView == SysInfoSummaryView)
{
PhSipDrawPanel(section, drawPanel->hdc, &drawPanel->Rect);
}
}
break;
case GCN_MOUSEEVENT:
{
PPH_GRAPH_MOUSEEVENT mouseEvent = (PPH_GRAPH_MOUSEEVENT)Parameter1;
PPH_SYSINFO_SECTION section = (PPH_SYSINFO_SECTION)Context;
if (mouseEvent->Message == WM_LBUTTONDOWN)
{
PhSipEnterSectionView(section);
}
}
break;
}
return TRUE;
}
_Success_(return)
BOOLEAN PhSipOnNotify(
_In_ NMHDR *Header,
@@ -708,7 +788,7 @@ BOOLEAN PhSipOnNotify(
}
else
{
ULONG badWidth = CurrentParameters.PanelWidth;
LONG badWidth = CurrentParameters.PanelWidth;
// Try not to draw max data point labels that will get covered by the
// fade-out part of the graph.
@@ -882,10 +962,7 @@ VOID PhSipOnUserMessage(
section->GraphState.Valid = FALSE;
section->GraphState.TooltipIndex = ULONG_MAX;
Graph_MoveGrid(section->GraphHandle, 1);
Graph_Draw(section->GraphHandle);
Graph_UpdateTooltip(section->GraphHandle);
InvalidateRect(section->GraphHandle, NULL, FALSE);
Graph_Update(section->GraphHandle);
InvalidateRect(section->PanelHandle, NULL, FALSE);
}
@@ -898,6 +975,8 @@ VOID PhSipOnUserMessage(
PPH_SYSINFO_SECTION section;
PH_GRAPH_OPTIONS options;
PhSipUpdateColorParameters();
if (SectionList)
{
for (i = 0; i < SectionList->Count; i++)
@@ -919,14 +998,7 @@ VOID PhSiNotifyChangeSettings(
VOID
)
{
HWND window;
PhSipUpdateColorParameters();
window = PhSipWindow;
if (window)
PostMessage(window, SI_MSG_SYSINFO_CHANGE_SETTINGS, 0, 0);
}
VOID PhSiSetColorsGraphDrawInfo(
@@ -1210,6 +1282,7 @@ PPH_SYSINFO_SECTION PhSipCreateSection(
{
PPH_SYSINFO_SECTION section;
PH_GRAPH_OPTIONS options;
PH_GRAPH_CREATEPARAMS graphCreateParams;
section = PhAllocateZero(sizeof(PH_SYSINFO_SECTION));
section->Name = Template->Name;
@@ -1217,28 +1290,33 @@ PPH_SYSINFO_SECTION PhSipCreateSection(
section->Callback = Template->Callback;
section->Context = Template->Context;
memset(&options, 0, sizeof(PH_GRAPH_OPTIONS));
options.FadeOutBackColor = CurrentParameters.GraphBackColor;
options.FadeOutWidth = CurrentParameters.PanelWidth + PH_SYSINFO_FADE_ADD;
options.DefaultCursor = PhLoadCursor(NULL, IDC_HAND);
memset(&graphCreateParams, 0, sizeof(PH_GRAPH_CREATEPARAMS));
graphCreateParams.Size = sizeof(PH_GRAPH_CREATEPARAMS);
graphCreateParams.Callback = PhSipGraphCallback;
graphCreateParams.Options = options;
graphCreateParams.Context = section;
section->GraphHandle = CreateWindow(
PH_GRAPH_CLASSNAME,
NULL,
WS_VISIBLE | WS_CHILD | WS_BORDER | WS_TABSTOP | GC_STYLE_FADEOUT | GC_STYLE_DRAW_PANEL,
0,
0,
3,
3,
0,
0,
PhSipWindow,
NULL,
PhInstanceHandle,
NULL
NULL,
&graphCreateParams
);
PhInitializeGraphState(&section->GraphState);
section->Parameters = &CurrentParameters;
Graph_GetOptions(section->GraphHandle, &options);
options.FadeOutBackColor = CurrentParameters.GraphBackColor;
options.FadeOutWidth = CurrentParameters.PanelWidth + PH_SYSINFO_FADE_ADD;
options.DefaultCursor = PhLoadCursor(NULL, IDC_HAND);
Graph_SetOptions(section->GraphHandle, &options);
if (PhEnableTooltipSupport) Graph_SetTooltip(section->GraphHandle, TRUE);
section->Parameters = &CurrentParameters;
section->PanelId = IDDYNAMIC + SectionList->Count * 2 + 2;
section->PanelHandle = CreateWindow(
@@ -1247,11 +1325,11 @@ PPH_SYSINFO_SECTION PhSipCreateSection(
WS_CHILD | SS_OWNERDRAW | SS_NOTIFY,
0,
0,
3,
3,
0,
0,
PhSipWindow,
UlongToHandle(section->PanelId),
PhInstanceHandle,
NULL,
NULL
);
@@ -2396,3 +2474,11 @@ VOID NTAPI PhSipSysInfoUpdateHandler(
{
PostMessage(PhSipWindow, SI_MSG_SYSINFO_UPDATE, 0, 0);
}
VOID NTAPI PhSipSysInfoSettingsCallback(
_In_opt_ PVOID Parameter,
_In_opt_ PVOID Context
)
{
PostMessage(PhSipWindow, SI_MSG_SYSINFO_CHANGE_SETTINGS, 0, 0);
}
+3 -3
View File
@@ -156,14 +156,14 @@ LRESULT CALLBACK PhColorBoxWndProc(
case WM_PAINT:
{
PAINTSTRUCT paintStruct;
RECT clientRect;
RECT updateRect;
HBRUSH oldBrush;
HPEN oldPen;
HDC hdc;
if (hdc = BeginPaint(hwnd, &paintStruct))
{
clientRect = paintStruct.rcPaint;
updateRect = paintStruct.rcPaint;
// Border color
SetDCPenColor(hdc, RGB(0x44, 0x44, 0x44));
@@ -179,7 +179,7 @@ LRESULT CALLBACK PhColorBoxWndProc(
oldPen = SelectPen(hdc, GetStockPen(DC_PEN));
// Draw the border and fill.
Rectangle(hdc, clientRect.left, clientRect.top, clientRect.right, clientRect.bottom);
Rectangle(hdc, updateRect.left, updateRect.top, updateRect.right, updateRect.bottom);
// Restore the original border and fill.
SelectPen(hdc, oldPen);
+1
View File
@@ -85,6 +85,7 @@ NTSTATUS PhDosErrorToNtStatus(
case ERROR_PROC_NOT_FOUND: return STATUS_PROCEDURE_NOT_FOUND;
case ERROR_NOT_LOCKED: return STATUS_NOT_LOCKED;
case ERROR_BAD_PATHNAME: return STATUS_OBJECT_PATH_INVALID;
case ERROR_INVALID_ORDINAL: return STATUS_ORDINAL_NOT_FOUND;
case ERROR_ALREADY_EXISTS: return STATUS_OBJECT_NAME_COLLISION;
case ERROR_DELETE_PENDING: return STATUS_DELETE_PENDING;
case ERROR_MORE_DATA: return STATUS_MORE_ENTRIES;
+20 -2
View File
@@ -908,10 +908,28 @@ LRESULT CALLBACK PhpGraphWndProc(
{
PPH_GRAPH_CREATEPARAMS params = createStruct->lpCreateParams;
if (RTL_CONTAINS_FIELD(params, params->Size, Options))
{
if (params->Options.DefaultCursor || params->Options.FadeOutBackColor || params->Options.FadeOutWidth)
{
memcpy(&context->Options, &params->Options, sizeof(PH_GRAPH_OPTIONS));
}
}
if (RTL_CONTAINS_FIELD(params, params->Size, Callback))
{
context->Callback = params->Callback;
context->Context = params->Context;
if (params->Callback)
{
context->Callback = params->Callback;
}
}
if (RTL_CONTAINS_FIELD(params, params->Size, Context))
{
if (params->Context)
{
context->Context = params->Context;
}
}
}
+114 -16
View File
@@ -13,6 +13,7 @@
#include <ph.h>
#include <apiimport.h>
#include <guisup.h>
#include <guisupview.h>
#include <mapimg.h>
#include <mapldr.h>
#include <settings.h>
@@ -68,6 +69,7 @@ static _SetWindowTheme SetWindowTheme_I = NULL;
static _IsThemeActive IsThemeActive_I = NULL;
static _IsThemePartDefined IsThemePartDefined_I = NULL;
static _GetThemeClass GetThemeClass_I = NULL;
static _GetThemeColor GetThemeColor_I = NULL;
static _GetThemeInt GetThemeInt_I = NULL;
static _GetThemePartSize GetThemePartSize_I = NULL;
static _DrawThemeBackground DrawThemeBackground_I = NULL;
@@ -110,6 +112,7 @@ VOID PhGuiSupportInitialization(
SetWindowTheme_I = PhGetDllBaseProcedureAddress(baseAddress, "SetWindowTheme", 0);
IsThemeActive_I = PhGetDllBaseProcedureAddress(baseAddress, "IsThemeActive", 0);
IsThemePartDefined_I = PhGetDllBaseProcedureAddress(baseAddress, "IsThemePartDefined", 0);
GetThemeColor_I = PhGetDllBaseProcedureAddress(baseAddress, "GetThemeColor", 0);
GetThemeInt_I = PhGetDllBaseProcedureAddress(baseAddress, "GetThemeInt", 0);
GetThemePartSize_I = PhGetDllBaseProcedureAddress(baseAddress, "GetThemePartSize", 0);
DrawThemeBackground_I = PhGetDllBaseProcedureAddress(baseAddress, "DrawThemeBackground", 0);
@@ -273,6 +276,21 @@ BOOLEAN PhGetThemeClass(
return SUCCEEDED(GetThemeClass_I(ThemeHandle, Class, ClassLength));
}
_Success_(return)
BOOLEAN PhGetThemeColor(
_In_ HTHEME ThemeHandle,
_In_ INT PartId,
_In_ INT StateId,
_In_ INT PropId,
_Out_ COLORREF* Color
)
{
if (!GetThemeColor_I)
return FALSE;
return SUCCEEDED(GetThemeColor_I(ThemeHandle, PartId, StateId, PropId, Color));
}
_Success_(return)
BOOLEAN PhGetThemeInt(
_In_ HTHEME ThemeHandle,
@@ -386,6 +404,44 @@ BOOLEAN PhGetWindowRect(
return TRUE;
}
BOOLEAN PhIsHungAppWindow(
_In_ HWND WindowHandle,
_In_ HDESK DesktopHandle
)
{
return !!IsHungAppWindow(WindowHandle);
}
BOOLEAN PhCheckWindowThreadDesktop(
_In_ HWND WindowHandle,
_In_ HANDLE ThreadId
)
{
typedef INT32 (WINAPI* CheckWindowThreadDesktop)(
_In_ HWND WindowHandle,
_In_ ULONG ThreadId
);
static PH_INITONCE initOnce = PH_INITONCE_INIT;
static CheckWindowThreadDesktop CheckWindowThreadDesktop_I = NULL;
if (PhBeginInitOnce(&initOnce))
{
PVOID baseAddress;
if (baseAddress = PhLoadLibrary(L"user32.dll"))
{
CheckWindowThreadDesktop_I = PhGetDllBaseProcedureAddress(baseAddress, "CheckWindowThreadDesktop", 0);
}
PhEndInitOnce(&initOnce);
}
if (!CheckWindowThreadDesktop_I)
return FALSE;
return CheckWindowThreadDesktop_I(WindowHandle, HandleToUlong(ThreadId));
}
LONG PhGetDpi(
_In_ LONG Number,
_In_ LONG DpiValue
@@ -1219,6 +1275,22 @@ VOID PhSetImageListBitmap(
}
}
PVOID PhGetListViewInterface(
_In_ HWND ListViewHandle
)
{
IListView* ListViewPtr = NULL;
DefWindowProc(
ListViewHandle,
LVM_QUERYINTERFACE,
(WPARAM)&IID_IListView,
(LPARAM)&ListViewPtr
);
return ListViewPtr;
}
static BOOLEAN SharedIconCacheHashtableEqualFunction(
_In_ PVOID Entry1,
_In_ PVOID Entry2
@@ -1659,22 +1731,24 @@ HWND PhCreateDialog(
return dialogHandle;
}
HWND PhCreateWindow(
_In_ ULONG ExStyle,
_In_opt_ PCWSTR ClassName,
HWND PhCreateWindowEx(
_In_ PCWSTR ClassName,
_In_opt_ PCWSTR WindowName,
_In_ ULONG Style,
_In_ INT X,
_In_ INT Y,
_In_ INT Width,
_In_ INT Height,
_In_ ULONG ExStyle,
_In_ LONG X,
_In_ LONG Y,
_In_ LONG Width,
_In_ LONG Height,
_In_opt_ HWND ParentWindow,
_In_opt_ HMENU MenuHandle,
_In_opt_ PVOID InstanceHandle,
_In_opt_ PVOID Parameter
)
{
return CreateWindowEx(
HWND windowHandle;
windowHandle = CreateWindowEx(
ExStyle,
ClassName,
WindowName,
@@ -1688,6 +1762,29 @@ HWND PhCreateWindow(
InstanceHandle,
Parameter
);
return windowHandle;
}
HWND PhCreateMessageWindow(
VOID
)
{
HWND windowHandle;
windowHandle = CreateWindowEx(
0,
L"Message",
NULL,
0,
0, 0, 0, 0,
HWND_MESSAGE,
NULL,
NULL,
NULL
);
return windowHandle;
}
INT_PTR PhDialogBox(
@@ -1781,12 +1878,12 @@ BOOLEAN PhModalPropertySheet(
while (result = GetMessage(&message, NULL, 0, 0))
{
if (result == -1)
if (result == INT_ERROR)
break;
if (message.message == WM_KEYDOWN /*|| message.message == WM_KEYUP*/) // forward key messages (dmex)
{
SendMessage(hwnd, message.message, message.wParam, message.lParam);
DefWindowProc(hwnd, message.message, message.wParam, message.lParam);
}
if (!PropSheet_IsDialogMessage(hwnd, &message))
@@ -3907,8 +4004,8 @@ CleanupExit:
HBITMAP PhLoadImageFromAddress(
_In_ PVOID Buffer,
_In_ ULONG BufferLength,
_In_ UINT Width,
_In_ UINT Height
_In_ LONG Width,
_In_ LONG Height
)
{
BOOLEAN success = FALSE;
@@ -4039,8 +4136,8 @@ HBITMAP PhLoadImageFromResource(
_In_ PVOID DllBase,
_In_ PCWSTR Name,
_In_ PCWSTR Type,
_In_ UINT Width,
_In_ UINT Height
_In_ LONG Width,
_In_ LONG Height
)
{
ULONG resourceLength = 0;
@@ -4055,8 +4152,8 @@ HBITMAP PhLoadImageFromResource(
// Load image and auto-detect the format (dmex)
HBITMAP PhLoadImageFromFile(
_In_ PWSTR FileName,
_In_ UINT Width,
_In_ UINT Height
_In_ LONG Width,
_In_ LONG Height
)
{
BOOLEAN success = FALSE;
@@ -4367,6 +4464,7 @@ BOOLEAN PhpInitializeMRUList(VOID)
return FALSE;
}
_Success_(return)
BOOLEAN PhRecentListCreate(
_Out_ PHANDLE RecentHandle
)
+24 -24
View File
@@ -43,8 +43,8 @@ static _GetBufferedPaintBits GetBufferedPaintBits_I = NULL;
static HBITMAP PhpCreateBitmap32(
_In_ HDC hdc,
_In_ ULONG Width,
_In_ ULONG Height,
_In_ LONG Width,
_In_ LONG Height,
_Out_ PVOID *Bits
)
{
@@ -52,19 +52,20 @@ static HBITMAP PhpCreateBitmap32(
memset(&bitmapInfo, 0, sizeof(BITMAPINFO));
bitmapInfo.bmiHeader.biSize = sizeof(BITMAPINFOHEADER);
bitmapInfo.bmiHeader.biPlanes = 1;
bitmapInfo.bmiHeader.biCompression = BI_RGB;
bitmapInfo.bmiHeader.biWidth = Width;
bitmapInfo.bmiHeader.biHeight = Height;
bitmapInfo.bmiHeader.biPlanes = 1;
bitmapInfo.bmiHeader.biBitCount = 32;
bitmapInfo.bmiHeader.biCompression = BI_RGB;
bitmapInfo.bmiHeader.biSizeImage = Width * Height;
return CreateDIBSection(hdc, &bitmapInfo, DIB_RGB_COLORS, Bits, NULL, 0);
}
static BOOLEAN PhpHasAlpha(
_In_ PULONG Argb,
_In_ ULONG Width,
_In_ ULONG Height,
_In_ LONG Width,
_In_ LONG Height,
_In_ ULONG RowWidth
)
{
@@ -92,8 +93,8 @@ static VOID PhpConvertToPArgb32(
_In_ HDC hdc,
_Inout_ PULONG Argb,
_In_ HBITMAP Bitmap,
_In_ ULONG Width,
_In_ ULONG Height,
_In_ LONG Width,
_In_ LONG Height,
_In_ ULONG RowWidth
)
{
@@ -102,11 +103,12 @@ static VOID PhpConvertToPArgb32(
memset(&bitmapInfo, 0, sizeof(BITMAPINFO));
bitmapInfo.bmiHeader.biSize = sizeof(BITMAPINFOHEADER);
bitmapInfo.bmiHeader.biPlanes = 1;
bitmapInfo.bmiHeader.biCompression = BI_RGB;
bitmapInfo.bmiHeader.biWidth = Width;
bitmapInfo.bmiHeader.biHeight = Height;
bitmapInfo.bmiHeader.biPlanes = 1;
bitmapInfo.bmiHeader.biBitCount = 32;
bitmapInfo.bmiHeader.biCompression = BI_RGB;
bitmapInfo.bmiHeader.biSizeImage = Width * Height;
bits = PhAllocate(Width * sizeof(RGBQUAD) * Height);
@@ -145,8 +147,8 @@ static VOID PhpConvertToPArgb32IfNeeded(
_In_ HPAINTBUFFER PaintBuffer,
_In_ HDC hdc,
_In_ HICON Icon,
_In_ ULONG Width,
_In_ ULONG Height
_In_ LONG Width,
_In_ LONG Height
)
{
RGBQUAD *quad;
@@ -176,8 +178,8 @@ static VOID PhpConvertToPArgb32IfNeeded(
HBITMAP PhIconToBitmap(
_In_ HICON Icon,
_In_ ULONG Width,
_In_ ULONG Height
_In_ LONG Width,
_In_ LONG Height
)
{
HBITMAP bitmap;
@@ -189,7 +191,7 @@ HBITMAP PhIconToBitmap(
BLENDFUNCTION blendFunction = { AC_SRC_OVER, 0, 255, AC_SRC_ALPHA };
BP_PAINTPARAMS paintParams = { sizeof(paintParams) };
HDC bufferHdc;
HPAINTBUFFER paintBuffer;
HPAINTBUFFER bufferedPaint;
iconRectangle.left = 0;
iconRectangle.top = 0;
@@ -226,22 +228,20 @@ HBITMAP PhIconToBitmap(
return bitmap;
}
screenHdc = GetDC(NULL);
hdc = CreateCompatibleDC(screenHdc);
bitmap = PhpCreateBitmap32(screenHdc, Width, Height, &bits);
ReleaseDC(NULL, screenHdc);
hdc = CreateCompatibleDC(NULL);
bitmap = PhpCreateBitmap32(hdc, Width, Height, &bits);
oldBitmap = SelectBitmap(hdc, bitmap);
paintParams.dwFlags = BPPF_ERASE;
paintParams.pBlendFunction = &blendFunction;
if (paintBuffer = BeginBufferedPaint_I(hdc, &iconRectangle, BPBF_DIB, &paintParams, &bufferHdc))
if (bufferedPaint = BeginBufferedPaint_I(hdc, &iconRectangle, BPBF_DIB, &paintParams, &bufferHdc))
{
DrawIconEx(bufferHdc, 0, 0, Icon, Width, Height, 0, NULL, DI_NORMAL);
// If the icon did not have an alpha channel, we need to convert the buffer to PARGB.
PhpConvertToPArgb32IfNeeded(paintBuffer, hdc, Icon, Width, Height);
PhpConvertToPArgb32IfNeeded(bufferedPaint, hdc, Icon, Width, Height);
// This will write the buffer contents to the destination bitmap.
EndBufferedPaint_I(paintBuffer, TRUE);
EndBufferedPaint_I(bufferedPaint, TRUE);
}
else
{
@@ -259,8 +259,8 @@ HBITMAP PhIconToBitmap(
// based on BufferedPaintSetAlpha/BufferedPaintMakeOpaque (dmex)
VOID PhBitmapSetAlpha(
_In_ PVOID Bits,
_In_ ULONG Width,
_In_ ULONG Height
_In_ LONG Width,
_In_ LONG Height
)
{
ULONG count = Width * Height;
+1
View File
@@ -182,6 +182,7 @@ typedef struct _PH_GRAPH_CREATEPARAMS
{
ULONG Size;
ULONG Flags;
PH_GRAPH_OPTIONS Options;
PPH_GRAPH_MESSAGE_CALLBACK Callback;
PVOID Context;
// Add new fields here.
+22 -10
View File
@@ -134,6 +134,18 @@ PhGetThemeClass(
_In_ ULONG ClassLength
);
_Success_(return)
PHLIBAPI
BOOLEAN
NTAPI
PhGetThemeColor(
_In_ HTHEME ThemeHandle,
_In_ INT PartId,
_In_ INT StateId,
_In_ INT PropId,
_Out_ COLORREF* Color
);
_Success_(return)
PHLIBAPI
BOOLEAN
@@ -1155,8 +1167,8 @@ HBITMAP
NTAPI
PhIconToBitmap(
_In_ HICON Icon,
_In_ ULONG Width,
_In_ ULONG Height
_In_ LONG Width,
_In_ LONG Height
);
PHLIBAPI
@@ -1164,8 +1176,8 @@ VOID
NTAPI
PhBitmapSetAlpha(
_In_ PVOID Bits,
_In_ ULONG Width,
_In_ ULONG Height
_In_ LONG Width,
_In_ LONG Height
);
// extlv
@@ -1771,8 +1783,8 @@ PhLoadImageFormatFromResource(
_In_ PCWSTR Name,
_In_ PCWSTR Type,
_In_ PH_IMAGE_FORMAT_TYPE Format,
_In_ UINT Width,
_In_ UINT Height
_In_ LONG Width,
_In_ LONG Height
);
PHLIBAPI
@@ -1782,8 +1794,8 @@ PhLoadImageFromResource(
_In_ PVOID DllBase,
_In_ PCWSTR Name,
_In_ PCWSTR Type,
_In_ UINT Width,
_In_ UINT Height
_In_ LONG Width,
_In_ LONG Height
);
PHLIBAPI
@@ -1791,8 +1803,8 @@ HBITMAP
NTAPI
PhLoadImageFromFile(
_In_ PWSTR FileName,
_In_ UINT Width,
_In_ UINT Height
_In_ LONG Width,
_In_ LONG Height
);
// Acrylic support
+8
View File
@@ -83,6 +83,14 @@ typedef HRESULT (WINAPI* _GetThemeClass)(
_In_ ULONG BufferLength
);
typedef HRESULT (WINAPI* _GetThemeColor)(
_In_ HTHEME hTheme,
_In_ int iPartId,
_In_ int iStateId,
_In_ int iPropId,
_Out_ COLORREF* pColor
);
typedef HRESULT (WINAPI *_GetThemeInt)(
_In_ HTHEME hTheme,
_In_ INT iPartId,
+588
View File
@@ -0,0 +1,588 @@
/*
* Copyright (c) 2022 Winsider Seminars & Solutions, Inc. All rights reserved.
*
* This file is part of System Informer.
*
* Authors:
*
* wj32 2010-2016
* dmex 2016-2023
*
*/
#ifndef _PH_GUISUPPVIEW_H
#define _PH_GUISUPPVIEW_H
// Listview2 (Undocumented)
#ifndef LVM_QUERYINTERFACE
#define LVM_QUERYINTERFACE (LVM_FIRST + 189) // IListView, IListView2, IOleWindow, IVisualProperties, IPropertyControlSite, IListViewFooter
#endif
DEFINE_GUID(IID_IListView, 0xE5B16AF2, 0x3990, 0x4681, 0xA6, 0x09, 0x1F, 0x06, 0x0C, 0xD1, 0x42, 0x69);
DEFINE_GUID(IID_IDrawPropertyControl, 0xE6DFF6FD, 0xBCD5, 0x4162, 0x9C, 0x65, 0xA3, 0xB1, 0x8C, 0x61, 0x6F, 0xDB);
DEFINE_GUID(IID_IDrawPropertyControlWin10, 0x1572DD51, 0x443C, 0x44B0, 0xAC, 0xE4, 0x38, 0xA0, 0x05, 0xFC, 0x69, 0x7E);
// {F0034DA8-8A22-4151-8F16-2EBA76565BCC}
DEFINE_GUID(IID_IListViewFooter, 0xF0034DA8, 0x8A22, 0x4151, 0x8F, 0x16, 0x2E, 0xBA, 0x76, 0x56, 0x5B, 0xCC);
// {88EB9442-913B-4AB4-A741-DD99DCB7558B}
DEFINE_GUID(IID_IListViewFooterCallback, 0x88EB9442, 0x913B, 0x4AB4, 0xA7, 0x41, 0xDD, 0x99, 0xDC, 0xB7, 0x55, 0x8B);
// {44C09D56-8D3B-419D-A462-7B956B105B47}
DEFINE_GUID(IID_IOwnerDataCallback, 0x44C09D56, 0x8D3B, 0x419D, 0xA4, 0x62, 0x7B, 0x95, 0x6B, 0x10, 0x5B, 0x47);
// {5E82A4DD-9561-476A-8634-1BEBACBA4A38}
DEFINE_GUID(IID_IPropertyControl, 0x5E82A4DD, 0x9561, 0x476A, 0x86, 0x34, 0x1B, 0xEB, 0xAC, 0xBA, 0x4A, 0x38);
// {6E71A510-732A-4557-9596-A827E36DAF8F}
DEFINE_GUID(IID_IPropertyControlBase, 0x6E71A510, 0x732A, 0x4557, 0x95, 0x96, 0xA8, 0x27, 0xE3, 0x6D, 0xAF, 0x8F);
// {7AF7F355-1066-4E17-B1F2-19FE2F099CD2}
DEFINE_GUID(IID_IPropertyValue, 0x7AF7F355, 0x1066, 0x4E17, 0xB1, 0xF2, 0x19, 0xFE, 0x2F, 0x09, 0x9C, 0xD2);
// {11A66240-5489-42C2-AEBF-286FC831524C}
DEFINE_GUID(IID_ISubItemCallback, 0x11A66240, 0x5489, 0x42C2, 0xAE, 0xBF, 0x28, 0x6F, 0xC8, 0x31, 0x52, 0x4C);
DEFINE_GUID(CLSID_CAsyncSubItemControlsView, 0xa1dccc29, 0x7c70, 0x4821, 0x97, 0xae, 0x67, 0xf0, 0x41, 0x5, 0xec, 0x91);
DEFINE_GUID(CLSID_CFooterAreaView, 0xebe684bf, 0x3301, 0x4a6d, 0x83, 0xce, 0xe4, 0xd6, 0x85, 0x1b, 0xe8, 0x81);
DEFINE_GUID(CLSID_CGroupedVirtualModeView, 0xa08a0f2d, 0x647, 0x4443, 0x94, 0x50, 0xc4, 0x60, 0xf4, 0x79, 0x10, 0x46);
DEFINE_GUID(CLSID_CGroupSubsetView, 0x64a11699, 0x104a, 0x482a, 0x9d, 0x85, 0xcc, 0xfe, 0xa2, 0xee, 0x3c, 0x94);
DEFINE_GUID(CLSID_CSubItemControlsView, 0x13e88673, 0xd30c, 0x46ba, 0x8f, 0x2e, 0x97, 0xc5, 0xcd, 0x2, 0x4e, 0x73);
// {1E8F0D70-7399-41BF-8598-7949A2DEC898}
DEFINE_GUID(CLSID_CBooleanControl, 0x1E8F0D70, 0x7399, 0x41BF, 0x85, 0x98, 0x79, 0x49, 0xA2, 0xDE, 0xC8, 0x98);
// {e2183960-9d58-4e9c-878a-4acc06ca564a}
DEFINE_GUID(CLSID_CCustomDrawMultiValuePropertyControl, 0xE2183960, 0x9D58, 0x4E9C, 0x87, 0x8A, 0x4A, 0xCC, 0x06, 0xCA, 0x56, 0x4A);
// {AB517586-73CF-489c-8D8C-5AE0EAD0613A}
DEFINE_GUID(CLSID_CCustomDrawPercentFullControl, 0xAB517586, 0x73CF, 0x489c, 0x8D, 0x8C, 0x5A, 0xE0, 0xEA, 0xD0, 0x61, 0x3A);
// {0d81ea0d-13bf-44b2-af1c-fcdf6be7927c}
DEFINE_GUID(CLSID_CCustomDrawProgressControl, 0x0d81ea0d, 0x13bf, 0x44B2, 0xAF, 0x1C, 0xFC, 0xDF, 0x6B, 0xE7, 0x92, 0x7C);
// {15756be1-a4ad-449c-b576-df3df0e068d3}
DEFINE_GUID(CLSID_CHyperlinkControl, 0x15756BE1, 0xA4AD, 0x449C, 0xB5, 0x76, 0xDF, 0x3D, 0xF0, 0xE0, 0x68, 0xD3);
// {53a01e9d-61cc-4cb0-83b1-31bc8df63156}
DEFINE_GUID(CLSID_CIconListControl, 0x53A01E9D, 0x61CC, 0x4CB0, 0x83, 0xB1, 0x31, 0xBC, 0x8D, 0xF6, 0x31, 0x56);
// {6A205B57-2567-4a2c-B881-F787FAB579A3}
DEFINE_GUID(CLSID_CInPlaceCalendarControl, 0x6A205B57, 0x2567, 0x4A2C, 0xB8, 0x81, 0xF7, 0x87, 0xFA, 0xB5, 0x79, 0xA3);
// {0EEA25CC-4362-4a12-850B-86EE61B0D3EB}
DEFINE_GUID(CLSID_CInPlaceDropListComboControl, 0x0EEA25CC, 0x4362, 0x4A12, 0x85, 0x0B, 0x86, 0xEE, 0x61, 0xB0, 0xD3, 0xEB);
// {A9CF0EAE-901A-4739-A481-E35B73E47F6D}
DEFINE_GUID(CLSID_CInPlaceEditBoxControl, 0xA9CF0EAE, 0x901A, 0x4739, 0xA4, 0x81, 0xE3, 0x5B, 0x73, 0xE4, 0x7F, 0x6D);
// {8EE97210-FD1F-4b19-91DA-67914005F020}
DEFINE_GUID(CLSID_CInPlaceMLEditBoxControl, 0x8EE97210, 0xFD1F, 0x4B19, 0x91, 0xDA, 0x67, 0x91, 0x40, 0x05, 0xF0, 0x20);
// {8e85d0ce-deaf-4ea1-9410-fd1a2105ceb5}
DEFINE_GUID(CLSID_CInPlaceMultiValuePropertyControl, 0x8E85D0CE, 0xDEAF, 0x4EA1, 0x94, 0x10, 0xFD, 0x1A, 0x21, 0x05, 0xCE, 0xB5);
// {85e94d25-0712-47ed-8cde-b0971177c6a1}
DEFINE_GUID(CLSID_CRatingControl, 0x85e94d25, 0x0712, 0x47ed, 0x8C, 0xDE, 0xB0, 0x97, 0x11, 0x77, 0xC6, 0xA1);
// {527c9a9b-b9a2-44b0-84f9-f0dc11c2bcfb}
DEFINE_GUID(CLSID_CStaticPropertyControl, 0x527C9A9B, 0xB9A2, 0x44B0, 0x84, 0xF9, 0xF0, 0xDC, 0x11, 0xC2, 0xBC, 0xFB);
#undef INTERFACE
#define INTERFACE IOwnerDataCallback
DECLARE_INTERFACE_(IOwnerDataCallback, IUnknown)
{
STDMETHOD(QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
STDMETHOD_(ULONG, AddRef)(THIS) PURE;
STDMETHOD_(ULONG, Release)(THIS) PURE;
// IOwnerDataCallback
STDMETHOD(OnDataAvailable)(THIS_ LPARAM lParam, ULONG dwItemCount) PURE;
STDMETHOD(OnDataUnavailable)(THIS_ LPARAM lParam) PURE;
STDMETHOD(OnDataChanged)(THIS_ LPARAM lParam, ULONG dwItemCount) PURE;
STDMETHOD(OnDataReset)(THIS_ LPARAM lParam) PURE;
};
#undef INTERFACE
#define INTERFACE ISubItemCallback
DECLARE_INTERFACE_(ISubItemCallback, IUnknown)
{
STDMETHOD(QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
STDMETHOD_(ULONG, AddRef)(THIS) PURE;
STDMETHOD_(ULONG, Release)(THIS) PURE;
// ISubItemCallback
STDMETHOD(GetSubItemTitle)(THIS_ INT subItemIndex, PWSTR pBuffer, INT bufferSize) PURE;
STDMETHOD(GetSubItemControl)(THIS_ INT itemIndex, INT subItemIndex, REFIID requiredInterface, PPVOID ppObject) PURE;
STDMETHOD(BeginSubItemEdit)(THIS_ INT itemIndex, INT subItemIndex, INT mode, REFIID requiredInterface, PPVOID ppObject) PURE;
STDMETHOD(EndSubItemEdit)(THIS_ INT itemIndex, INT subItemIndex, int mode, struct IPropertyControl* pPropertyControl) PURE;
STDMETHOD(BeginGroupEdit)(THIS_ INT groupIndex, REFIID INT, PPVOID ppObject) PURE;
STDMETHOD(EndGroupEdit)(THIS_ INT groupIndex, INT mode, struct IPropertyControl* pPropertyControl) PURE;
STDMETHOD(OnInvokeVerb)(THIS_ INT itemIndex, LPCWSTR pVerb) PURE;
};
#undef INTERFACE
#define INTERFACE IDrawPropertyControl
DECLARE_INTERFACE_(IDrawPropertyControl, IUnknown)
{
STDMETHOD(QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
STDMETHOD_(ULONG, AddRef)(THIS) PURE;
STDMETHOD_(ULONG, Release)(THIS) PURE;
// IPropertyControlBase
STDMETHOD(Initialize)(IUnknown*, ULONG) PURE; // 2/calendar, 3/textbox
STDMETHOD(GetSize)(enum PROPCTL_RECT_TYPE, HDC, SIZE const*, SIZE*) PURE;
STDMETHOD(SetWindowTheme)(PCWSTR, PCWSTR) PURE;
STDMETHOD(SetFont)(HFONT) PURE;
STDMETHOD(SetTextColor)(ULONG) PURE;
STDMETHOD(GetFlags)(INT*) PURE;
STDMETHOD(SetFlags)(INT, INT) PURE;
STDMETHOD(AdjustWindowRectPCB)(HWND, RECT*, RECT const*, INT) PURE;
STDMETHOD(SetValue)(IUnknown*) PURE;
STDMETHOD(InvokeDefaultAction)(VOID) PURE;
STDMETHOD(Destroy)(VOID) PURE;
STDMETHOD(SetFormatFlags)(INT) PURE;
STDMETHOD(GetFormatFlags)(INT*) PURE;
// IDrawPropertyControl
STDMETHOD(GetDrawFlags)(PINT Flags) PURE;
STDMETHOD(WindowlessDraw)(HDC hDC, RECT pDrawingRectangle, int a) PURE;
STDMETHOD(HasVisibleContent)(VOID) PURE;
STDMETHOD(GetDisplayText)(LPWSTR * Text) PURE;
STDMETHOD(GetTooltipInfo)(HDC, SIZE const*, PINT) PURE;
};
#undef INTERFACE
#define INTERFACE IListView
DECLARE_INTERFACE_(IListView, IUnknown) // real name is IListView2
{
BEGIN_INTERFACE
STDMETHOD(QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
STDMETHOD_(ULONG, AddRef)(THIS) PURE;
STDMETHOD_(ULONG, Release)(THIS) PURE;
// IOleWindow
STDMETHOD(GetWindow)(THIS_ __RPC__in IOleWindow* window, __RPC__deref_out_opt HWND* WindowHandle) PURE;
STDMETHOD(ContextSensitiveHelp)(THIS_ __RPC__in IOleWindow* window, _In_ BOOL fEnterMode) PURE;
// IListView
STDMETHOD(GetImageList)(THIS_ int imageList, HIMAGELIST* pHImageList) PURE;
STDMETHOD(SetImageList)(THIS_ int imageList, HIMAGELIST hNewImageList, HIMAGELIST* pHOldImageList) PURE;
STDMETHOD(GetBackgroundColor)(THIS_ COLORREF* pColor) PURE;
STDMETHOD(SetBackgroundColor)(THIS_ COLORREF color) PURE;
STDMETHOD(GetTextColor)(THIS_ COLORREF* pColor) PURE;
STDMETHOD(SetTextColor)(THIS_ COLORREF color) PURE;
STDMETHOD(GetTextBackgroundColor)(THIS_ COLORREF* pColor) PURE;
STDMETHOD(SetTextBackgroundColor)(THIS_ COLORREF color) PURE;
STDMETHOD(GetHotLightColor)(THIS_ COLORREF* pColor) PURE;
STDMETHOD(SetHotLightColor)(THIS_ COLORREF color) PURE;
STDMETHOD(GetItemCount)(THIS_ PINT pItemCount) PURE;
STDMETHOD(SetItemCount)(THIS_ int itemCount, ULONG flags) PURE;
STDMETHOD(GetItem)(THIS_ LVITEMW* pItem) PURE;
STDMETHOD(SetItem)(THIS_ LVITEMW* const pItem) PURE;
STDMETHOD(GetItemState)(THIS_ int itemIndex, int subItemIndex, ULONG mask, ULONG* pState) PURE;
STDMETHOD(SetItemState)(THIS_ int itemIndex, int subItemIndex, ULONG mask, ULONG state) PURE;
STDMETHOD(GetItemText)(THIS_ int itemIndex, int subItemIndex, LPWSTR pBuffer, int bufferSize) PURE;
STDMETHOD(SetItemText)(THIS_ int itemIndex, int subItemIndex, LPCWSTR pText) PURE;
STDMETHOD(GetBackgroundImage)(THIS_ LVBKIMAGEW* pBkImage) PURE;
STDMETHOD(SetBackgroundImage)(THIS_ LVBKIMAGEW* const pBkImage) PURE;
STDMETHOD(GetFocusedColumn)(THIS_ PINT pColumnIndex) PURE;
STDMETHOD(SetSelectionFlags)(THIS_ ULONG mask, ULONG flags) PURE; // HRESULT SetSelectionFlags (SELECTION_FLAGS, SELECTION_FLAGS);
STDMETHOD(GetSelectedColumn)(THIS_ PULONG pColumnIndex) PURE;
STDMETHOD(SetSelectedColumn)(THIS_ ULONG columnIndex) PURE;
STDMETHOD(GetView)(THIS_ ULONG* pView) PURE;
STDMETHOD(SetView)(THIS_ ULONG view) PURE;
STDMETHOD(InsertItem)(THIS_ LVITEMW* const pItem, PULONG pItemIndex) PURE;
STDMETHOD(DeleteItem)(THIS_ ULONG itemIndex) PURE;
STDMETHOD(DeleteAllItems)(THIS) PURE;
STDMETHOD(UpdateItem)(THIS_ ULONG itemIndex) PURE;
STDMETHOD(GetItemRect)(THIS_ LVITEMINDEX itemIndex, int rectangleType, LPRECT pRectangle) PURE;
STDMETHOD(GetSubItemRect)(THIS_ LVITEMINDEX itemIndex, int subItemIndex, int rectangleType, LPRECT pRectangle) PURE;
STDMETHOD(HitTestSubItem)(THIS_ LVHITTESTINFO* pHitTestData) PURE;
STDMETHOD(GetIncrSearchString)(THIS_ PWSTR pBuffer, int bufferSize, PINT pCopiedChars) PURE;
STDMETHOD(GetItemSpacing)(THIS_ BOOL smallIconView, PINT pHorizontalSpacing, PINT pVerticalSpacing) PURE;
STDMETHOD(SetIconSpacing)(THIS_ int horizontalSpacing, int verticalSpacing, PINT pHorizontalSpacing, PINT pVerticalSpacing) PURE;
STDMETHOD(GetNextItem)(THIS_ LVITEMINDEX itemIndex, ULONG flags, LVITEMINDEX* pNextItemIndex) PURE;
STDMETHOD(FindItem)(THIS_ LVITEMINDEX startItemIndex, LVFINDINFOW const* pFindInfo, LVITEMINDEX* pFoundItemIndex) PURE;
STDMETHOD(GetSelectionMark)(THIS_ LVITEMINDEX* pSelectionMark) PURE;
STDMETHOD(SetSelectionMark)(THIS_ LVITEMINDEX newSelectionMark, LVITEMINDEX* pOldSelectionMark) PURE;
STDMETHOD(GetItemPosition)(THIS_ LVITEMINDEX itemIndex, POINT* pPosition) PURE;
STDMETHOD(SetItemPosition)(THIS_ ULONG itemIndex, POINT const* pPosition) PURE;
STDMETHOD(ScrollView)(THIS_ ULONG horizontalScrollDistance, ULONG verticalScrollDistance) PURE;
STDMETHOD(EnsureItemVisible)(THIS_ LVITEMINDEX itemIndex, BOOL partialOk) PURE;
STDMETHOD(EnsureSubItemVisible)(THIS_ LVITEMINDEX itemIndex, ULONG subItemIndex) PURE;
STDMETHOD(EditSubItem)(THIS_ LVITEMINDEX itemIndex, ULONG subItemIndex) PURE;
STDMETHOD(RedrawItems)(THIS_ ULONG firstItemIndex, ULONG lastItemIndex) PURE;
STDMETHOD(ArrangeItems)(THIS_ ULONG mode) PURE;
STDMETHOD(RecomputeItems)(THIS_ int unknown) PURE;
STDMETHOD(GetEditControl)(THIS_ HWND* EditWindowHandle) PURE;
STDMETHOD(EditLabel)(THIS_ LVITEMINDEX itemIndex, LPCWSTR initialEditText, HWND* EditWindowHandle) PURE;
STDMETHOD(EditGroupLabel)(THIS_ ULONG groupIndex) PURE;
STDMETHOD(CancelEditLabel)(THIS) PURE;
STDMETHOD(GetEditItem)(THIS_ LVITEMINDEX* itemIndex, PINT subItemIndex) PURE;
STDMETHOD(HitTest)(THIS_ LVHITTESTINFO* pHitTestData) PURE;
STDMETHOD(GetStringWidth)(THIS_ PCWSTR pString, PINT pWidth) PURE;
STDMETHOD(GetColumn)(THIS_ ULONG columnIndex, LVCOLUMNW* pColumn) PURE;
STDMETHOD(SetColumn)(THIS_ ULONG columnIndex, LVCOLUMNW* const pColumn) PURE;
STDMETHOD(GetColumnOrderArray)(THIS_ ULONG numberOfColumns, PINT pColumns) PURE;
STDMETHOD(SetColumnOrderArray)(THIS_ ULONG numberOfColumns, int const* pColumns) PURE;
STDMETHOD(GetHeaderControl)(THIS_ HWND* HeaderWindowHandle) PURE;
STDMETHOD(InsertColumn)(THIS_ ULONG insertAt, LVCOLUMNW* const pColumn, PINT pColumnIndex) PURE;
STDMETHOD(DeleteColumn)(THIS_ ULONG columnIndex) PURE;
STDMETHOD(CreateDragImage)(THIS_ ULONG itemIndex, POINT const* pUpperLeft, HIMAGELIST* pHImageList) PURE;
STDMETHOD(GetViewRect)(THIS_ RECT* pRectangle) PURE;
STDMETHOD(GetClientRect)(THIS_ BOOL unknown, RECT* pClientRectangle) PURE;
STDMETHOD(GetColumnWidth)(THIS_ ULONG columnIndex, PINT pWidth) PURE;
STDMETHOD(SetColumnWidth)(THIS_ ULONG columnIndex, ULONG width) PURE;
STDMETHOD(GetCallbackMask)(THIS_ ULONG* pMask) PURE;
STDMETHOD(SetCallbackMask)(THIS_ ULONG mask) PURE;
STDMETHOD(GetTopIndex)(THIS_ PULONG pTopIndex) PURE;
STDMETHOD(GetCountPerPage)(THIS_ PULONG pCountPerPage) PURE;
STDMETHOD(GetOrigin)(THIS_ POINT* pOrigin) PURE;
STDMETHOD(GetSelectedCount)(THIS_ PULONG pSelectedCount) PURE;
STDMETHOD(SortItems)(THIS_ BOOL unknown, LPARAM lParam, PFNLVCOMPARE pComparisonFunction) PURE;
STDMETHOD(GetExtendedStyle)(THIS_ ULONG* pStyle) PURE;
STDMETHOD(SetExtendedStyle)(THIS_ ULONG mask, ULONG style, ULONG* pOldStyle) PURE;
STDMETHOD(GetHoverTime)(THIS_ PULONG pTime) PURE;
STDMETHOD(SetHoverTime)(THIS_ UINT time, PULONG pOldSetting) PURE;
STDMETHOD(GetToolTip)(THIS_ HWND* ToolTipWindowHandle) PURE;
STDMETHOD(SetToolTip)(THIS_ HWND ToolTipWindowHandle, HWND* OldToolTipWindowHandle) PURE;
STDMETHOD(GetHotItem)(THIS_ LVITEMINDEX* pHotItem) PURE;
STDMETHOD(SetHotItem)(THIS_ LVITEMINDEX newHotItem, LVITEMINDEX* pOldHotItem) PURE;
STDMETHOD(GetHotCursor)(THIS_ HCURSOR* pHCursor) PURE;
STDMETHOD(SetHotCursor)(THIS_ HCURSOR hCursor, HCURSOR* pHOldCursor) PURE;
STDMETHOD(ApproximateViewRect)(THIS_ int itemCount, PINT pWidth, PINT pHeight) PURE;
STDMETHOD(SetRangeObject)(THIS_ int unknown, LPVOID pObject) PURE;
STDMETHOD(GetWorkAreas)(THIS_ int numberOfWorkAreas, RECT* pWorkAreas) PURE;
STDMETHOD(SetWorkAreas)(THIS_ int numberOfWorkAreas, RECT const* pWorkAreas) PURE;
STDMETHOD(GetWorkAreaCount)(THIS_ PINT pNumberOfWorkAreas) PURE;
STDMETHOD(ResetEmptyText)(THIS) PURE;
STDMETHOD(EnableGroupView)(THIS_ BOOL Eable) PURE;
STDMETHOD(IsGroupViewEnabled)(THIS_ PBOOL IsEnabled) PURE;
STDMETHOD(SortGroups)(THIS_ PFNLVGROUPCOMPARE pComparisonFunction, PVOID lParam) PURE;
STDMETHOD(GetGroupInfo)(THIS_ ULONG unknown1, ULONG groupID, LVGROUP* pGroup) PURE;
STDMETHOD(SetGroupInfo)(THIS_ ULONG unknown, ULONG groupID, LVGROUP* const pGroup) PURE;
STDMETHOD(GetGroupRect)(THIS_ BOOL unknown, ULONG groupID, ULONG rectangleType, RECT* pRectangle) PURE;
STDMETHOD(GetGroupState)(THIS_ ULONG groupID, ULONG mask, ULONG* pState) PURE;
STDMETHOD(HasGroup)(THIS_ INT groupID, BOOL* pHasGroup) PURE;
STDMETHOD(InsertGroup)(THIS_ INT insertAt, LVGROUP* const pGroup, PINT pGroupID) PURE;
STDMETHOD(RemoveGroup)(THIS_ INT groupID) PURE;
STDMETHOD(InsertGroupSorted)(THIS_ LVINSERTGROUPSORTED const* pGroup, PINT pGroupID) PURE;
STDMETHOD(GetGroupMetrics)(THIS_ LVGROUPMETRICS* pMetrics) PURE;
STDMETHOD(SetGroupMetrics)(THIS_ LVGROUPMETRICS* const pMetrics) PURE;
STDMETHOD(RemoveAllGroups)(THIS) PURE;
STDMETHOD(GetFocusedGroup)(THIS_ PINT pGroupID) PURE;
STDMETHOD(GetGroupCount)(THIS_ PINT pCount) PURE;
STDMETHOD(SetOwnerDataCallback)(THIS_ IOwnerDataCallback* pCallback) PURE;
STDMETHOD(GetTileViewInfo)(THIS_ LVTILEVIEWINFO* pInfo) PURE;
STDMETHOD(SetTileViewInfo)(THIS_ LVTILEVIEWINFO* const pInfo) PURE;
STDMETHOD(GetTileInfo)(THIS_ LVTILEINFO* pTileInfo) PURE;
STDMETHOD(SetTileInfo)(THIS_ LVTILEINFO* const pTileInfo) PURE;
STDMETHOD(GetInsertMark)(THIS_ LVINSERTMARK* pInsertMarkDetails) PURE;
STDMETHOD(SetInsertMark)(THIS_ LVINSERTMARK const* pInsertMarkDetails) PURE;
STDMETHOD(GetInsertMarkRect)(THIS_ LPRECT pInsertMarkRectangle) PURE;
STDMETHOD(GetInsertMarkColor)(THIS_ COLORREF* pColor) PURE;
STDMETHOD(SetInsertMarkColor)(THIS_ COLORREF color, COLORREF* pOldColor) PURE;
STDMETHOD(HitTestInsertMark)(THIS_ POINT const* pPoint, LVINSERTMARK* pInsertMarkDetails) PURE;
STDMETHOD(SetInfoTip)(THIS_ LVSETINFOTIP* const pInfoTip) PURE;
STDMETHOD(GetOutlineColor)(THIS_ COLORREF* pColor) PURE;
STDMETHOD(SetOutlineColor)(THIS_ COLORREF color, COLORREF* pOldColor) PURE;
STDMETHOD(GetFrozenItem)(THIS_ PINT pItemIndex) PURE;
STDMETHOD(SetFrozenItem)(THIS_ int unknown1, int unknown2) PURE;
STDMETHOD(GetFrozenSlot)(THIS_ RECT* pUnknown) PURE;
STDMETHOD(SetFrozenSlot)(THIS_ int unknown1, POINT const* pUnknown2) PURE;
STDMETHOD(GetViewMargin)(THIS_ RECT* pMargin) PURE;
STDMETHOD(SetViewMargin)(THIS_ RECT const* pMargin) PURE;
STDMETHOD(SetKeyboardSelected)(THIS_ LVITEMINDEX itemIndex) PURE;
STDMETHOD(MapIndexToId)(THIS_ int itemIndex, PINT pItemID) PURE;
STDMETHOD(MapIdToIndex)(THIS_ int itemID, PINT pItemIndex) PURE;
STDMETHOD(IsItemVisible)(THIS_ LVITEMINDEX itemIndex, BOOL* pVisible) PURE;
STDMETHOD(EnableAlphaShadow)(THIS_ BOOL enable) PURE;
STDMETHOD(GetGroupSubsetCount)(THIS_ PINT pNumberOfRowsDisplayed) PURE;
STDMETHOD(SetGroupSubsetCount)(THIS_ int numberOfRowsToDisplay) PURE;
STDMETHOD(GetVisibleSlotCount)(THIS_ PINT pCount) PURE;
STDMETHOD(GetColumnMargin)(THIS_ RECT* pMargin) PURE;
STDMETHOD(SetSubItemCallback)(THIS_ LPVOID pCallback) PURE;
STDMETHOD(GetVisibleItemRange)(THIS_ LVITEMINDEX* pFirstItem, LVITEMINDEX* pLastItem) PURE;
STDMETHOD(SetTypeAheadFlags)(THIS_ UINT mask, UINT flags) PURE; // HRESULT SetTypeAheadFlags (TYPEAHEAD_FLAGS, TYPEAHEAD_FLAGS);
// Windows 10
STDMETHOD(SetWorkAreasWithDpi)(THIS_ int, struct tagLVWORKAREAWITHDPI const*) PURE;
STDMETHOD(GetWorkAreasWithDpi)(THIS_ int, struct tagLVWORKAREAWITHDPI*) PURE;
STDMETHOD(SetWorkAreaImageList)(THIS_ int, int, HIMAGELIST, HIMAGELIST*) PURE;
STDMETHOD(GetWorkAreaImageList)(THIS_ int, int, HIMAGELIST*) PURE;
STDMETHOD(EnableIconBullying)(THIS_ INT Mode) PURE;
STDMETHOD(EnableQuirks)(THIS_ ULONG Flags) PURE;
END_INTERFACE
};
#define IListViewQueryInterface(This,riid,ppvObject) \
((This)->lpVtbl->QueryInterface(This,riid,ppvObject))
#define IListView_AddRef(This) \
((This)->lpVtbl->AddRef(This))
#define IListView_Release(This) \
((This)->lpVtbl->Release(This))
#define IListView_GetWindow(This, WindowHandle) \
((This)->lpVtbl->AddRef(This))
#define IListView_ContextSensitiveHelp(This, fEnterMode) \
((This)->lpVtbl->ContextSensitiveHelp(This, fEnterMode))
#define IListView_GetImageList(This, imageList, pHImageList) \
((This)->lpVtbl->GetImageList(This, imageList, pHImageList))
#define IListView_SetImageList(This, imageList, hNewImageList, pHOldImageList) \
((This)->lpVtbl->SetImageList(This, imageList, hNewImageList, pHOldImageList))
#define IListView_GetBackgroundColor(This, pColor) \
((This)->lpVtbl->GetBackgroundColor(This, pColor))
#define IListView_SetBackgroundColor(This, color) \
((This)->lpVtbl->SetBackgroundColor(This, color))
#define IListView_GetTextColor(This, pColor) \
((This)->lpVtbl->GetTextColor(This, pColor))
#define IListView_SetTextColor(This, color) \
((This)->lpVtbl->SetTextColor(This, color))
#define IListView_GetTextBackgroundColor(This, pColor) \
((This)->lpVtbl->GetTextBackgroundColor(This, pColor))
#define IListView_SetTextBackgroundColor(This, color) \
((This)->lpVtbl->SetTextBackgroundColor(This, color))
#define IListView_GetHotLightColor(This, pColor) \
((This)->lpVtbl->GetHotLightColor(This, pColor))
#define IListView_SetHotLightColor(This, color) \
((This)->lpVtbl->SetHotLightColor(This, color))
#define IListView_GetItemCount(This, pItemCount) \
((This)->lpVtbl->GetItemCount(This, pItemCount))
#define IListView_SetItemCount(This, itemCount, flags) \
((This)->lpVtbl->SetItemCount(This, itemCount, flags))
#define IListView_GetItem(This, pItem) \
((This)->lpVtbl->GetItem(This, pItem))
#define IListView_SetItem(This, pItem) \
((This)->lpVtbl->SetItem(This, pItem))
#define IListView_GetItemState(This, itemIndex, subItemIndex, mask, pState) \
((This)->lpVtbl->GetItemState(This, itemIndex, subItemIndex, mask, pState))
#define IListView_SetItemState(This, itemIndex, subItemIndex, mask, state) \
((This)->lpVtbl->SetItemState(This, itemIndex, subItemIndex, mask, state))
#define IListView_GetItemText(This, itemIndex, subItemIndex, pBuffer, bufferSize) \
((This)->lpVtbl->GetItemText(This, itemIndex, subItemIndex, pBuffer, bufferSize))
#define IListView_SetItemText(This, itemIndex, subItemIndex, pText) \
((This)->lpVtbl->SetItemText(This, itemIndex, subItemIndex, pText))
#define IListView_GetBackgroundImage(This, pBkImage) \
((This)->lpVtbl->GetBackgroundImage(This, pBkImage))
#define IListView_SetBackgroundImage(This, pBkImage) \
((This)->lpVtbl->SetBackgroundImage(This, pBkImage))
#define IListView_GetFocusedColumn(This, pColumnIndex) \
((This)->lpVtbl->GetFocusedColumn(This, pColumnIndex))
#define IListView_SetSelectionFlags(This, mask, flags) \
((This)->lpVtbl->SetSelectionFlags(This, mask, flags))
#define IListView_GetSelectedColumn(This, pColumnIndex) \
((This)->lpVtbl->GetSelectedColumn(This, pColumnIndex))
#define IListView_SetSelectedColumn(This, columnIndex) \
((This)->lpVtbl->SetSelectedColumn(This, columnIndex))
#define IListView_GetView(This, pView) \
((This)->lpVtbl->GetView(This, pView))
#define IListView_SetView(This, view) \
((This)->lpVtbl->SetView(This, view))
#define IListView_InsertItem(This, pItem, pItemIndex) \
((This)->lpVtbl->InsertItem(This, pItem, pItemIndex))
#define IListView_DeleteItem(This, itemIndex) \
((This)->lpVtbl->DeleteItem(This, itemIndex))
#define IListView_DeleteAllItems(This) \
((This)->lpVtbl->DeleteAllItems(This))
#define IListView_UpdateItem(This, itemIndex) \
((This)->lpVtbl->UpdateItem(This, itemIndex))
#define IListView_GetItemRect(This, itemIndex, rectangleType, pRectangle) \
((This)->lpVtbl->GetItemRect(This, itemIndex, rectangleType, pRectangle))
#define IListView_GetSubItemRect(This, itemIndex, subItemIndex, rectangleType, pRectangle) \
((This)->lpVtbl->GetSubItemRect(This, itemIndex, subItemIndex, rectangleType, pRectangle))
#define IListView_HitTestSubItem(This, pHitTestData) \
((This)->lpVtbl->HitTestSubItem(This, pHitTestData))
#define IListView_GetIncrSearchString(This, pBuffer, bufferSize, pCopiedChars) \
((This)->lpVtbl->GetIncrSearchString(This, pBuffer, bufferSize, pCopiedChars))
#define IListView_GetItemSpacing(This, smallIconView, pHorizontalSpacing, pVerticalSpacing) \
((This)->lpVtbl->GetItemSpacing(This, smallIconView, pHorizontalSpacing, pVerticalSpacing))
#define IListView_SetIconSpacing(This, horizontalSpacing, verticalSpacing, pHorizontalSpacing, pVerticalSpacing) \
((This)->lpVtbl->SetIconSpacing(This, horizontalSpacing, verticalSpacing, pHorizontalSpacing, pVerticalSpacing))
#define IListView_GetNextItem(This, itemIndex, flags, pNextItemIndex) \
((This)->lpVtbl->GetNextItem(This, itemIndex, flags, pNextItemIndex))
#define IListView_FindItem(This, startItemIndex, pFindInfo, pFoundItemIndex) \
((This)->lpVtbl->FindItem(This, startItemIndex, pFindInfo, pFoundItemIndex))
#define IListView_GetSelectionMark(This, pSelectionMark) \
((This)->lpVtbl->GetSelectionMark(This, pSelectionMark))
#define IListView_SetSelectionMark(This, newSelectionMark, pOldSelectionMark) \
((This)->lpVtbl->SetSelectionMark(This, newSelectionMark, pOldSelectionMark))
#define IListView_GetItemPosition(This, itemIndex, pPosition) \
((This)->lpVtbl->GetItemPosition(This, itemIndex, pPosition))
#define IListView_SetItemPosition(This, itemIndex, pPosition) \
((This)->lpVtbl->SetItemPosition(This, itemIndex, pPosition))
#define IListView_ScrollView(This, horizontalScrollDistance, verticalScrollDistance) \
((This)->lpVtbl->ScrollView(This, horizontalScrollDistance, verticalScrollDistance))
#define IListView_EnsureItemVisible(This, itemIndex, partialOk) \
((This)->lpVtbl->EnsureItemVisible(This, itemIndex, partialOk))
#define IListView_EnsureSubItemVisible(This, itemIndex, subItemIndex) \
((This)->lpVtbl->EnsureSubItemVisible(This, itemIndex, subItemIndex))
#define IListView_EditSubItem(This, itemIndex, subItemIndex) \
((This)->lpVtbl->EditSubItem(This, itemIndex, subItemIndex))
#define IListView_RedrawItems(This, firstItemIndex, lastItemIndex) \
((This)->lpVtbl->RedrawItems(This, firstItemIndex, lastItemIndex))
#define IListView_ArrangeItems(This, mode) \
((This)->lpVtbl->ArrangeItems(This, mode))
#define IListView_RecomputeItems(This, unknown) \
((This)->lpVtbl->RecomputeItems(This, unknown))
#define IListView_GetEditControl(This, EditWindowHandle) \
((This)->lpVtbl->GetEditControl(This, EditWindowHandle))
#define IListView_EditLabel(This, itemIndex, initialEditText, EditWindowHandle) \
((This)->lpVtbl->EditLabel(This, itemIndex, initialEditText, EditWindowHandle))
#define IListView_EditGroupLabel(This, groupIndex) \
((This)->lpVtbl->EditGroupLabel(This, groupIndex))
#define IListView_CancelEditLabel(This) \
((This)->lpVtbl->CancelEditLabel(This))
#define IListView_GetEditItem(This, itemIndex, subItemIndex) \
((This)->lpVtbl->GetEditItem(This, itemIndex, subItemIndex))
#define IListView_HitTest(This, pHitTestData) \
((This)->lpVtbl->HitTest(This, pHitTestData))
#define IListView_GetStringWidth(This, pString, pWidth) \
((This)->lpVtbl->GetStringWidth(This, pString, pWidth))
#define IListView_GetColumn(This, columnIndex, pColumn) \
((This)->lpVtbl->GetColumn(This, columnIndex, pColumn))
#define IListView_SetColumn(This, columnIndex, pColumn) \
((This)->lpVtbl->SetColumn(This, columnIndex, pColumn))
#define IListView_GetColumnOrderArray(This, numberOfColumns, pColumns) \
((This)->lpVtbl->GetColumnOrderArray(This, numberOfColumns, pColumns))
#define IListView_SetColumnOrderArray(This, numberOfColumns, pColumns) \
((This)->lpVtbl->SetColumnOrderArray(This, numberOfColumns, pColumns))
#define IListView_GetHeaderControl(This, HeaderWindowHandle) \
((This)->lpVtbl->GetHeaderControl(This, HeaderWindowHandle))
#define IListView_InsertColumn(This, insertAt, pColumn, pColumnIndex) \
((This)->lpVtbl->InsertColumn(This, insertAt, pColumn, pColumnIndex))
#define IListView_DeleteColumn(This, columnIndex) \
((This)->lpVtbl->DeleteColumn(This, columnIndex))
#define IListView_CreateDragImage(This, itemIndex, pUpperLeft, pHImageList) \
((This)->lpVtbl->CreateDragImage(This, itemIndex, pUpperLeft, pHImageList))
#define IListView_GetViewRect(This, pRectangle) \
((This)->lpVtbl->GetViewRect(This, pRectangle))
#define IListView_GetClientRect(This, unknown, pClientRectangle) \
((This)->lpVtbl->GetClientRect(This, unknown, pClientRectangle))
#define IListView_GetColumnWidth(This, columnIndex, pWidth) \
((This)->lpVtbl->GetColumnWidth(This, columnIndex, pWidth))
#define IListView_SetColumnWidth(This, columnIndex, width) \
((This)->lpVtbl->SetColumnWidth(This, columnIndex, width))
#define IListView_GetCallbackMask(This, pMask) \
((This)->lpVtbl->GetCallbackMask(This, pMask))
#define IListView_SetCallbackMask(This, mask) \
((This)->lpVtbl->SetCallbackMask(This, mask))
#define IListView_GetTopIndex(This, pTopIndex) \
((This)->lpVtbl->GetTopIndex(This, pTopIndex))
#define IListView_GetCountPerPage(This, pCountPerPage) \
((This)->lpVtbl->GetCountPerPage(This, pCountPerPage))
#define IListView_GetOrigin(This, pOrigin) \
((This)->lpVtbl->GetOrigin(This, pOrigin))
#define IListView_GetSelectedCount(This, pSelectedCount) \
((This)->lpVtbl->GetSelectedCount(This, pSelectedCount))
#define IListView_SortItems(This, unknown, lParam, pComparisonFunction) \
((This)->lpVtbl->SortItems(This, unknown, lParam, pComparisonFunction))
#define IListView_GetExtendedStyle(This, pStyle) \
((This)->lpVtbl->GetExtendedStyle(This, pStyle))
#define IListView_SetExtendedStyle(This, mask, style, pOldStyle) \
((This)->lpVtbl->SetExtendedStyle(This, mask, style, pOldStyle))
#define IListView_GetHoverTime(This, pTime) \
((This)->lpVtbl->GetHoverTime(This, pTime))
#define IListView_SetHoverTime(This, time, pOldSetting) \
((This)->lpVtbl->SetHoverTime(This, time, pOldSetting))
#define IListView_GetToolTip(This, ToolTipWindowHandle) \
((This)->lpVtbl->GetToolTip(This, ToolTipWindowHandle))
#define IListView_SetToolTip(This, ToolTipWindowHandle, OldToolTipWindowHandle) \
((This)->lpVtbl->SetToolTip(This, ToolTipWindowHandle, OldToolTipWindowHandle))
#define IListView_GetHotItem(This, pHotItem) \
((This)->lpVtbl->GetHotItem(This, pHotItem))
#define IListView_SetHotItem(This, newHotItem, pOldHotItem) \
((This)->lpVtbl->SetHotItem(This, newHotItem, pOldHotItem))
#define IListView_GetHotCursor(This, pHCursor) \
((This)->lpVtbl->GetHotCursor(This, pHCursor))
#define IListView_SetHotCursor(This, hCursor, pHOldCursor) \
((This)->lpVtbl->SetHotCursor(This, hCursor, pHOldCursor))
#define IListView_ApproximateViewRect(This, itemCount, pWidth, pHeight) \
((This)->lpVtbl->ApproximateViewRect(This, itemCount, pWidth, pHeight))
#define IListView_SetRangeObject(This, unknown, pObject) \
((This)->lpVtbl->SetRangeObject(This, unknown, pObject))
#define IListView_GetWorkAreas(This, numberOfWorkAreas, pWorkAreas) \
((This)->lpVtbl->GetWorkAreas(This, numberOfWorkAreas, pWorkAreas))
#define IListView_SetWorkAreas(This, numberOfWorkAreas, pWorkAreas) \
((This)->lpVtbl->SetWorkAreas(This, numberOfWorkAreas, pWorkAreas))
#define IListView_GetWorkAreaCount(This, pNumberOfWorkAreas) \
((This)->lpVtbl->GetWorkAreaCount(This, pNumberOfWorkAreas))
#define IListView_ResetEmptyText(This) \
((This)->lpVtbl->ResetEmptyText(This))
#define IListView_EnableGroupView(This, enable) \
((This)->lpVtbl->EnableGroupView(This, enable))
#define IListView_IsGroupViewEnabled(This, pIsEnabled) \
((This)->lpVtbl->IsGroupViewEnabled(This, pIsEnabled))
#define IListView_SortGroups(This, pComparisonFunction, lParam) \
((This)->lpVtbl->SortGroups(This, pComparisonFunction, lParam))
#define IListView_GetGroupInfo(This, unknown1, unknown2, pGroup) \
((This)->lpVtbl->GetGroupInfo(This, unknown1, unknown2, pGroup))
#define IListView_SetGroupInfo(This, unknown, groupID, pGroup) \
((This)->lpVtbl->SetGroupInfo(This, unknown, groupID, pGroup))
#define IListView_GetGroupRect(This, unknown, groupID, rectangleType, pRectangle) \
((This)->lpVtbl->GetGroupRect(This, unknown, groupID, rectangleType, pRectangle))
#define IListView_GetGroupState(This, groupID, mask, pState) \
((This)->lpVtbl->GetGroupState(This, groupID, mask, pState))
#define IListView_HasGroup(This, groupID, pHasGroup) \
((This)->lpVtbl->HasGroup(This, groupID, pHasGroup))
#define IListView_InsertGroup(This, insertAt, pGroup, pGroupID) \
((This)->lpVtbl->InsertGroup(This, insertAt, pGroup, pGroupID))
#define IListView_RemoveGroup(This, groupID) \
((This)->lpVtbl->RemoveGroup(This, groupID))
#define IListView_InsertGroupSorted(This, pGroup, pGroupID) \
((This)->lpVtbl->InsertGroupSorted(This, pGroup, pGroupID))
#define IListView_GetGroupMetrics(This, pMetrics) \
((This)->lpVtbl->GetGroupMetrics(This, pMetrics))
#define IListView_SetGroupMetrics(This, pMetrics) \
((This)->lpVtbl->SetGroupMetrics(This, pMetrics))
#define IListView_RemoveAllGroups(This) \
((This)->lpVtbl->RemoveAllGroups(This))
#define IListView_GetFocusedGroup(This, pGroupID) \
((This)->lpVtbl->GetFocusedGroup(This, pGroupID))
#define IListView_GetGroupCount(This, pCount) \
((This)->lpVtbl->GetGroupCount(This, pCount))
#define IListView_SetOwnerDataCallback(This, pCallback) \
((This)->lpVtbl->SetOwnerDataCallback(This, pCallback))
#define IListView_GetTileViewInfo(This, pInfo) \
((This)->lpVtbl->GetTileViewInfo(This, pInfo))
#define IListView_SetTileViewInfo(This, pInfo) \
((This)->lpVtbl->SetTileViewInfo(This, pInfo))
#define IListView_GetTileInfo(This, pTileInfo) \
((This)->lpVtbl->GetTileInfo(This, pTileInfo))
#define IListView_SetTileInfo(This, pTileInfo) \
((This)->lpVtbl->SetTileInfo(This, pTileInfo))
#define IListView_GetInsertMark(This, pInsertMarkDetails) \
((This)->lpVtbl->GetInsertMark(This, pInsertMarkDetails))
#define IListView_SetInsertMark(This, pInsertMarkDetails) \
((This)->lpVtbl->SetInsertMark(This, pInsertMarkDetails))
#define IListView_GetInsertMarkRect(This, pInsertMarkRectangle) \
((This)->lpVtbl->GetInsertMarkRect(This, pInsertMarkRectangle))
#define IListView_GetInsertMarkColor(This, pColor) \
((This)->lpVtbl->GetInsertMarkColor(This, pColor))
#define IListView_SetInsertMarkColor(This, color, pOldColor) \
((This)->lpVtbl->SetInsertMarkColor(This, color, pOldColor))
#define IListView_HitTestInsertMark(This, pPoint, pInsertMarkDetails) \
((This)->lpVtbl->HitTestInsertMark(This, pPoint, pInsertMarkDetails))
#define IListView_SetInfoTip(This, pInfoTip) \
((This)->lpVtbl->SetInfoTip(This, pInfoTip))
#define IListView_GetOutlineColor(This, pColor) \
((This)->lpVtbl->GetOutlineColor(This, pColor))
#define IListView_SetOutlineColor(This, color, pOldColor) \
((This)->lpVtbl->SetOutlineColor(This, color, pOldColor))
#define IListView_GetFrozenItem(This, pItemIndex) \
((This)->lpVtbl->GetFrozenItem(This, pItemIndex))
#define IListView_SetFrozenItem(This, unknown1, unknown2) \
((This)->lpVtbl->SetFrozenItem(This, unknown1, unknown2))
#define IListView_GetFrozenSlot(This, pUnknown) \
((This)->lpVtbl->GetFrozenSlot(This, pUnknown))
#define IListView_SetFrozenSlot(This, unknown1, pUnknown2) \
((This)->lpVtbl->SetFrozenSlot(This, unknown1, pUnknown2))
#define IListView_GetViewMargin(This, pMargin) \
((This)->lpVtbl->GetViewMargin(This, pMargin))
#define IListView_SetViewMargin(This, pMargin) \
((This)->lpVtbl->SetViewMargin(This, pMargin))
#define IListView_SetKeyboardSelected(This, itemIndex) \
((This)->lpVtbl->SetKeyboardSelected(This, itemIndex))
#define IListView_MapIndexToId(This, itemIndex, pItemID) \
((This)->lpVtbl->MapIndexToId(This, itemIndex, pItemID))
#define IListView_MapIdToIndex(This, itemID, pItemIndex) \
((This)->lpVtbl->MapIdToIndex(This, itemID, pItemIndex))
#define IListView_IsItemVisible(This, itemIndex, pVisible) \
((This)->lpVtbl->IsItemVisible(This, itemIndex, pVisible))
#define IListView_EnableAlphaShadow(This, enable) \
((This)->lpVtbl->EnableAlphaShadow(This, enable))
#define IListView_GetGroupSubsetCount(This, pNumberOfRowsDisplayed) \
((This)->lpVtbl->GetGroupSubsetCount(This, pNumberOfRowsDisplayed))
#define IListView_SetGroupSubsetCount(This, numberOfRowsToDisplay) \
((This)->lpVtbl->SetGroupSubsetCount(This, numberOfRowsToDisplay))
#define IListView_GetVisibleSlotCount(This, pCount) \
((This)->lpVtbl->GetVisibleSlotCount(This, pCount))
#define IListView_GetColumnMargin(This, pMargin) \
((This)->lpVtbl->GetColumnMargin(This, pMargin))
#define IListView_SetSubItemCallback(This, pCallback) \
((This)->lpVtbl->SetSubItemCallback(This, pCallback))
#define IListView_GetVisibleItemRange(This, pFirstItem, pLastItem) \
((This)->lpVtbl->GetVisibleItemRange(This, pFirstItem, pLastItem))
#define IListView_SetTypeAheadFlags(This, mask, flags) \
((This)->lpVtbl->SetTypeAheadFlags(This, mask, flags))
#endif