[COMCTL32] Pass a couple of window messages to the active page of property sheets (#9239)

CORE-20681

Send `WM_ACTIVATE` and `WM_ACTIVATEAPP` to the property sheet active page.
And do the same with `WM_ENABLE`, `WM_QUERYENDSESSION`, `WM_ENDSESSION`,
and `WM_DEVICECHANGE`, after sending them to the tab control first.

Similar in spirit to commit d09c3d0af8.
This commit is contained in:
Hermès Bélusca-Maïto
2026-07-09 20:32:29 +02:00
parent 3b157605bc
commit 8b5e6383f2
+31
View File
@@ -3772,6 +3772,37 @@ PROPSHEET_DialogProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
}
#endif
#ifdef __REACTOS__
case WM_ENABLE:
case WM_QUERYENDSESSION:
case WM_ENDSESSION:
case WM_DEVICECHANGE:
{
/* Send to the tab control, before forwarding it to the active page */
SendDlgItemMessageW(hwnd, IDC_TABCONTROL, uMsg, wParam, lParam);
__fallthrough;
}
case WM_ACTIVATE:
case WM_ACTIVATEAPP:
{
PropSheetInfo* psInfo = GetPropW(hwnd, PropSheetInfoStr);
if (!psInfo)
return FALSE;
/* Forward notification to active page */
if (psInfo->activeValid && psInfo->active_page != -1)
{
HWND hwndPage = psInfo->proppage[psInfo->active_page].hwndPage;
LRESULT msgResult = SendMessageW(hwndPage, uMsg, wParam, lParam);
/* The message is handled, set the dialog return value
* to whatever the page returned */
SetWindowLongPtrW(hwnd, DWLP_MSGRESULT, msgResult);
return TRUE;
}
return FALSE;
}
#endif // __REACTOS__
case PSM_GETCURRENTPAGEHWND:
{
PropSheetInfo* psInfo = GetPropW(hwnd, PropSheetInfoStr);