Added patch to implement support for PSPCB_ADDREF/PSPCB_RELEASE callback notifications.

This commit is contained in:
Sebastian Lackner 2017-02-10 22:35:16 +01:00
parent 230c30c8e3
commit d834b49a37
3 changed files with 64 additions and 1 deletions

View File

@ -0,0 +1,60 @@
From da747c61c2cee3712c061fa75b462228ffdee12d Mon Sep 17 00:00:00 2001
From: Dmitry Timoshkov <dmitry@baikal.ru>
Date: Fri, 10 Feb 2017 00:34:37 +0800
Subject: comctl32: Add support for PSPCB_ADDREF/PSPCB_RELEASE callback
notifications. (v2)
---
dlls/comctl32/propsheet.c | 9 +++++++++
include/prsht.h | 1 +
2 files changed, 10 insertions(+)
diff --git a/dlls/comctl32/propsheet.c b/dlls/comctl32/propsheet.c
index 654b06fbcec..78afaa924ef 100644
--- a/dlls/comctl32/propsheet.c
+++ b/dlls/comctl32/propsheet.c
@@ -2991,6 +2991,9 @@ HPROPSHEETPAGE WINAPI CreatePropertySheetPageA(
else
ppsp->pszHeaderSubTitle = NULL;
+ if ((ppsp->dwFlags & PSH_USECALLBACK) && ppsp->pfnCallback)
+ ppsp->pfnCallback(0, PSPCB_ADDREF, ppsp);
+
return (HPROPSHEETPAGE)ppsp;
}
@@ -3047,6 +3050,9 @@ HPROPSHEETPAGE WINAPI CreatePropertySheetPageW(LPCPROPSHEETPAGEW lpPropSheetPage
else
ppsp->pszHeaderSubTitle = NULL;
+ if ((ppsp->dwFlags & PSH_USECALLBACK) && ppsp->pfnCallback)
+ ppsp->pfnCallback(0, PSPCB_ADDREF, ppsp);
+
return (HPROPSHEETPAGE)ppsp;
}
@@ -3068,6 +3074,9 @@ BOOL WINAPI DestroyPropertySheetPage(HPROPSHEETPAGE hPropPage)
if (!psp)
return FALSE;
+ if ((psp->dwFlags & PSH_USECALLBACK) && psp->pfnCallback)
+ psp->pfnCallback(0, PSPCB_RELEASE, psp);
+
if (!(psp->dwFlags & PSP_DLGINDIRECT) && !IS_INTRESOURCE( psp->u.pszTemplate ))
Free ((LPVOID)psp->u.pszTemplate);
diff --git a/include/prsht.h b/include/prsht.h
index 21fc266447c..75ccc7c2917 100644
--- a/include/prsht.h
+++ b/include/prsht.h
@@ -293,6 +293,7 @@ DECL_PRSHT_TYPE_AW(LPCPROPSHEETPAGE, LATEST)
#define PSP_USEFUSIONCONTEXT 0x00004000
#define PSP_COMMANDLINKS 0x00040000
+#define PSPCB_ADDREF 0
#define PSPCB_RELEASE 1
#define PSPCB_CREATE 2
--
2.11.0

View File

@ -1 +1,2 @@
Fixes: [25625] Add implementation for comctl32.PROPSHEET_InsertPage.
Fixes: Add support for PSPCB_ADDREF/PSPCB_RELEASE callback notifications

View File

@ -2987,12 +2987,14 @@ fi
# | * [#25625] Add implementation for comctl32.PROPSHEET_InsertPage.
# |
# | Modified files:
# | * dlls/comctl32/propsheet.c, dlls/comctl32/tests/propsheet.c
# | * dlls/comctl32/propsheet.c, dlls/comctl32/tests/propsheet.c, include/prsht.h
# |
if test "$enable_comctl32_PROPSHEET_InsertPage" -eq 1; then
patch_apply comctl32-PROPSHEET_InsertPage/0002-comctl32-Implement-PROPSHEET_InsertPage-based-on-PRO.patch
patch_apply comctl32-PROPSHEET_InsertPage/0003-comctl32-Add-support-for-PSPCB_ADDREF-PSPCB_RELEASE-.patch
(
printf '%s\n' '+ { "Peter Hater", "comctl32: Implement PROPSHEET_InsertPage based on PROPSHEET_AddPage.", 1 },';
printf '%s\n' '+ { "Dmitry Timoshkov", "comctl32: Add support for PSPCB_ADDREF/PSPCB_RELEASE callback notifications.", 2 },';
) >> "$patchlist"
fi