From: Yaroslav Chvanov <yaroslav.chvanov@gmail.com> In IPropertyPageSite implementation of OleCreatePropertyFrame handle PROPPAGESTATUS_DIRTY notifications in OnStatusChange method by sending PSM_CHANGED to the dialog window. Tested with LAV Filters' LAV {Audio,Splitter,Video} configuration windows, changing any options now makes the 'Apply' button active. Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=42836 --- dlls/oleaut32/olepropframe.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/dlls/oleaut32/olepropframe.c b/dlls/oleaut32/olepropframe.c index cad1a2ad5c2..e522194bda8 100644 --- a/dlls/oleaut32/olepropframe.c +++ b/dlls/oleaut32/olepropframe.c @@ -34,8 +34,10 @@ WINE_DEFAULT_DEBUG_CHANNEL(ole); typedef struct { IPropertyPageSite IPropertyPageSite_iface; + IPropertyPage *page; LCID lcid; LONG ref; + HWND hwnd; } PropertyPageSite; static inline PropertyPageSite *impl_from_IPropertyPageSite(IPropertyPageSite *iface) @@ -50,13 +52,16 @@ static INT_PTR CALLBACK property_sheet_proc(HWND hwnd, UINT msg, WPARAM wparam, switch(msg) { case WM_INITDIALOG: { RECT rect; + IPropertyPageSite *iface = (IPropertyPageSite*)((LPPROPSHEETPAGEW)lparam)->lParam; + PropertyPageSite *this = impl_from_IPropertyPageSite(iface); - property_page = (IPropertyPage*)((LPPROPSHEETPAGEW)lparam)->lParam; + property_page = this->page; GetClientRect(hwnd, &rect); IPropertyPage_Activate(property_page, hwnd, &rect, TRUE); IPropertyPage_Show(property_page, SW_SHOW); + this->hwnd = hwnd; SetWindowLongPtrW(hwnd, DWLP_USER, (LONG_PTR)property_page); return FALSE; } @@ -109,7 +114,11 @@ static ULONG WINAPI PropertyPageSite_Release(IPropertyPageSite* iface) static HRESULT WINAPI PropertyPageSite_OnStatusChange( IPropertyPageSite *iface, DWORD dwFlags) { + PropertyPageSite *this = impl_from_IPropertyPageSite(iface); + TRACE("%p, %lx.\n", iface, dwFlags); + if (dwFlags & PROPPAGESTATUS_DIRTY) + SendMessageW(GetParent(this->hwnd), PSM_CHANGED, (WPARAM)this->hwnd, 0); return S_OK; } @@ -274,6 +283,7 @@ HRESULT WINAPI OleCreatePropertyFrameIndirect(LPOCPFIPARAMS lpParams) property_page_site->IPropertyPageSite_iface.lpVtbl = &PropertyPageSiteVtbl; property_page_site->ref = 1; property_page_site->lcid = lpParams->lcid; + property_page_site->page = property_page[i]; res = IPropertyPage_SetPageSite(property_page[i], &property_page_site->IPropertyPageSite_iface); @@ -294,7 +304,7 @@ HRESULT WINAPI OleCreatePropertyFrameIndirect(LPOCPFIPARAMS lpParams) dialogs[i].template.cy = MulDiv(page_info.size.cy, 8, font_height); property_sheet_page.pResource = &dialogs[i].template; - property_sheet_page.lParam = (LPARAM)property_page[i]; + property_sheet_page.lParam = (LPARAM)property_page_site; property_sheet_page.pszTitle = page_info.pszTitle; property_sheet.phpage[property_sheet.nPages++] = -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/10693