mirror of
https://github.com/reactos/reactos.git
synced 2026-05-24 00:00:41 +08:00
[EXPLORER][SHELL32][SHELL32_APITEST][SDK] AppBar Part 2 (#7946)
Follow-up of #7778. JIRA issue: CORE-7237 - Rename APPBARDATA3264 structure as APPBARDATAINTEROP. - Fix structures for WoW64. - Use trace instead of DPRINT1. - Add CAppBarManager:: RecomputeAllWorkareas function. - Fix WM_DISPLAYCHANGE handling to re-compute the work areas.
This commit is contained in:
committed by
GitHub
parent
24c2e4433b
commit
7073bdfead
@@ -130,7 +130,7 @@ void CAppBarManager::OnAppBarQueryPos(_Inout_ PAPPBAR_COMMAND pData)
|
||||
return;
|
||||
}
|
||||
|
||||
PAPPBARDATA3264 pOutput = AppBar_LockOutput(pData);
|
||||
PAPPBARDATAINTEROP pOutput = AppBar_LockOutput(pData);
|
||||
if (!pOutput)
|
||||
{
|
||||
ERR("!pOutput: %d\n", pData->dwProcessId);
|
||||
@@ -187,7 +187,7 @@ void CAppBarManager::OnAppBarSetPos(_Inout_ PAPPBAR_COMMAND pData)
|
||||
|
||||
OnAppBarQueryPos(pData);
|
||||
|
||||
PAPPBARDATA3264 pOutput = AppBar_LockOutput(pData);
|
||||
PAPPBARDATAINTEROP pOutput = AppBar_LockOutput(pData);
|
||||
if (!pOutput)
|
||||
return;
|
||||
|
||||
@@ -425,6 +425,31 @@ CAppBarManager::RecomputeWorkArea(
|
||||
return WORKAREA_SAME_AS_MONITOR;
|
||||
}
|
||||
|
||||
BOOL CALLBACK
|
||||
CAppBarManager::MonitorEnumProc(
|
||||
_In_ HMONITOR hMonitor,
|
||||
_In_ HDC hDC,
|
||||
_In_ LPRECT prc,
|
||||
_Inout_ LPARAM lParam)
|
||||
{
|
||||
CAppBarManager *pThis = (CAppBarManager *)lParam;
|
||||
UNREFERENCED_PARAMETER(hDC);
|
||||
|
||||
RECT rcWorkArea;
|
||||
if (pThis->RecomputeWorkArea(prc, hMonitor, &rcWorkArea) != WORKAREA_IS_NOT_MONITOR)
|
||||
return TRUE;
|
||||
|
||||
HWND hwndDesktop = pThis->GetDesktopWnd();
|
||||
::SystemParametersInfoW(SPI_SETWORKAREA, 0, &rcWorkArea, hwndDesktop ? SPIF_SENDCHANGE : 0);
|
||||
pThis->RedrawDesktop(hwndDesktop, &rcWorkArea);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void CAppBarManager::RecomputeAllWorkareas()
|
||||
{
|
||||
::EnumDisplayMonitors(NULL, NULL, CAppBarManager::MonitorEnumProc, (LPARAM)this);
|
||||
}
|
||||
|
||||
PAPPBAR_COMMAND
|
||||
CAppBarManager::GetAppBarMessage(_Inout_ PCOPYDATASTRUCT pCopyData)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user