mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 01:55:19 +00:00
[EXPLORER] Implement ABM_GET/SETSTATE and ABM_GETTASKBARPOS (#7525)
This commit is contained in:
parent
af4e39385c
commit
c569aee023
2 changed files with 25 additions and 11 deletions
|
@ -35,6 +35,8 @@
|
||||||
|
|
||||||
#include <wine/list.h>
|
#include <wine/list.h>
|
||||||
|
|
||||||
|
#define GetPrimaryTaskbar() FindWindowW(L"Shell_TrayWnd", NULL)
|
||||||
|
|
||||||
struct appbar_cmd
|
struct appbar_cmd
|
||||||
{
|
{
|
||||||
DWORD dwMsg;
|
DWORD dwMsg;
|
||||||
|
@ -198,22 +200,33 @@ static UINT_PTR handle_appbarmessage(DWORD msg, _AppBarData *abd)
|
||||||
}
|
}
|
||||||
return TRUE;
|
return TRUE;
|
||||||
case ABM_GETSTATE:
|
case ABM_GETSTATE:
|
||||||
FIXME("SHAppBarMessage(ABM_GETSTATE): stub\n");
|
TRACE("SHAppBarMessage(ABM_GETSTATE)\n");
|
||||||
return ABS_ALWAYSONTOP | ABS_AUTOHIDE;
|
return (g_TaskbarSettings.sr.AutoHide ? ABS_AUTOHIDE : 0) |
|
||||||
case ABM_GETTASKBARPOS:
|
(g_TaskbarSettings.sr.AlwaysOnTop ? ABS_ALWAYSONTOP : 0);
|
||||||
FIXME("SHAppBarMessage(ABM_GETTASKBARPOS, hwnd=%p): stub\n", hwnd);
|
case ABM_SETSTATE:
|
||||||
/* Report the taskbar is at the bottom of the screen. */
|
TRACE("SHAppBarMessage(ABM_SETSTATE lparam=%s)\n", wine_dbgstr_longlong(abd->lParam));
|
||||||
abd->rc.left = 0;
|
hwnd = GetPrimaryTaskbar();
|
||||||
abd->rc.right = GetSystemMetrics(SM_CXSCREEN);
|
if (hwnd)
|
||||||
abd->rc.bottom = GetSystemMetrics(SM_CYSCREEN);
|
{
|
||||||
abd->rc.top = abd->rc.bottom-1;
|
TaskbarSettings settings = g_TaskbarSettings;
|
||||||
abd->uEdge = ABE_BOTTOM;
|
settings.sr.AutoHide = (abd->lParam & ABS_AUTOHIDE) != 0;
|
||||||
|
settings.sr.AlwaysOnTop = (abd->lParam & ABS_ALWAYSONTOP) != 0;
|
||||||
|
SendMessageW(hwnd, TWM_SETTINGSCHANGED, 0, (LPARAM)&settings);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
}
|
||||||
|
return FALSE;
|
||||||
|
case ABM_GETTASKBARPOS:
|
||||||
|
TRACE("SHAppBarMessage(ABM_GETTASKBARPOS, hwnd=%p)\n", hwnd);
|
||||||
|
abd->uEdge = g_TaskbarSettings.sr.Position;
|
||||||
|
abd->hWnd = GetPrimaryTaskbar();
|
||||||
|
return abd->hWnd && GetWindowRect(abd->hWnd, &abd->rc);
|
||||||
case ABM_ACTIVATE:
|
case ABM_ACTIVATE:
|
||||||
return TRUE;
|
return TRUE;
|
||||||
case ABM_GETAUTOHIDEBAR:
|
case ABM_GETAUTOHIDEBAR:
|
||||||
FIXME("SHAppBarMessage(ABM_GETAUTOHIDEBAR, hwnd=%p, edge=%x): stub\n", hwnd, abd->uEdge);
|
FIXME("SHAppBarMessage(ABM_GETAUTOHIDEBAR, hwnd=%p, edge=%x): stub\n", hwnd, abd->uEdge);
|
||||||
return 0;
|
if (abd->uEdge == g_TaskbarSettings.sr.Position && g_TaskbarSettings.sr.AutoHide)
|
||||||
|
return (SIZE_T)GetPrimaryTaskbar();
|
||||||
|
return NULL;
|
||||||
case ABM_SETAUTOHIDEBAR:
|
case ABM_SETAUTOHIDEBAR:
|
||||||
FIXME("SHAppBarMessage(ABM_SETAUTOHIDEBAR, hwnd=%p, edge=%x, lparam=%s): stub\n",
|
FIXME("SHAppBarMessage(ABM_SETAUTOHIDEBAR, hwnd=%p, edge=%x, lparam=%s): stub\n",
|
||||||
hwnd, abd->uEdge, wine_dbgstr_longlong(abd->lParam));
|
hwnd, abd->uEdge, wine_dbgstr_longlong(abd->lParam));
|
||||||
|
|
|
@ -69,6 +69,7 @@ extern "C" {
|
||||||
#define ABM_GETAUTOHIDEBAR 7
|
#define ABM_GETAUTOHIDEBAR 7
|
||||||
#define ABM_SETAUTOHIDEBAR 8
|
#define ABM_SETAUTOHIDEBAR 8
|
||||||
#define ABM_WINDOWPOSCHANGED 9
|
#define ABM_WINDOWPOSCHANGED 9
|
||||||
|
#define ABM_SETSTATE 10
|
||||||
#define ABN_STATECHANGE 0
|
#define ABN_STATECHANGE 0
|
||||||
#define ABN_POSCHANGED 1
|
#define ABN_POSCHANGED 1
|
||||||
#define ABN_FULLSCREENAPP 2
|
#define ABN_FULLSCREENAPP 2
|
||||||
|
|
Loading…
Reference in a new issue