Index: reactos/base/shell/explorer/traywnd.cpp =================================================================== --- reactos/base/shell/explorer/traywnd.cpp (revision 72783) +++ reactos/base/shell/explorer/traywnd.cpp (working copy) @@ -57,6 +57,37 @@ static const WCHAR szTrayWndClass[] = L"Shell_TrayWnd"; +// +// AppBar interface +// + +#define MAX_APPBARS_PER_EDGE 4 +#define NUM_EDGES 4 +#define INVALID_EDGE NUM_EDGES + +/* for result of appbar message */ +typedef struct APPBARRESULT +{ + DWORD ResultFlags; + RECT rc; + HWND hwnd; + UINT state; +} APPBARRESULT; + +/* for APPBARRESULT::ResultFlags */ +static const DWORD ABRFLAGS_RETURN_TRUE = 0x1; +static const DWORD ABRFLAGS_RETURN_HWND = 0x2; +static const DWORD ABRFLAGS_RETURN_STATE = 0x4; +static const DWORD ABRFLAGS_SET_RC = 0x8; + +/* for sending appbar message */ +typedef struct APPBARMESSAGE +{ + DWORD Magic; /* must be 0xDEADFACE */ + APPBARDATA Data; /* appbar data */ + HANDLE hGlobal; /* GHND to APPBARRESULT */ +} APPBARMESSAGE; + /* * ITrayWindow */ @@ -412,7 +443,7 @@ DWORD m_DraggingPosition; HMONITOR m_DraggingMonitor; - RECT m_TrayRects[4]; + RECT m_TrayRects[NUM_EDGES]; SIZE m_TraySize; HWND m_TrayPropertiesOwner; @@ -2321,8 +2352,577 @@ return TRUE; } + ////////////////////////////////////////////////////////////////////////// + // appbar handling + // FIXME + + // appbar entry slot + struct APPBARSLOT + { + HWND hWnd; // the window handle of appbar + UINT uEdge; // desktop side (ABE_...) + UINT uCallbackMessage; // the callback message + RECT rc; // position and size + + // flags + union + { + UINT Flags; + struct + { + UINT IsPresent : 1; + UINT AlwaysOnTop : 1; + UINT IsTaskBar : 1; + UINT AutoHide : 1; + UINT PosPending : 1; + }; + }; + + BOOL IsValid() const + { + return this != NULL && IsPresent && ::IsWindow(hWnd); + } + + void Reset() + { + Flags = 0; + hWnd = NULL; + } + }; + + #define MAX_SLOTS ((NUM_EDGES + 1) * MAX_APPBARS_PER_EDGE + NUM_EDGES) + + union + { + APPBARSLOT m_AppBarSlots[MAX_SLOTS]; + struct + { + APPBARSLOT m_EdgeSlots[NUM_EDGES + 1][MAX_APPBARS_PER_EDGE]; + APPBARSLOT m_AutoHideSlots[NUM_EDGES]; + }; + }; + + void AppBar_SendCallback(APPBARSLOT *pSlot, WPARAM wParam, LPARAM lParam) + { + if (pSlot->uCallbackMessage == 0) + return; + + ::SendMessage(pSlot->hWnd, pSlot->uCallbackMessage, wParam, lParam); + } + + void AppBar_SendPosChanged(APPBARSLOT *pSlot) + { + AppBar_SendCallback(pSlot, ABN_POSCHANGED, 0); + } + + void AppBar_SendPosChangedToAll() + { + for (UINT uIndex = 0; uIndex < MAX_SLOTS; ++uIndex) + { + APPBARSLOT *pSlot = &m_AppBarSlots[uIndex]; + if (pSlot->IsValid()) + { + AppBar_SendPosChanged(pSlot); + } + } + } + + BOOL AppBar_AdjustRect(APPBARSLOT *pTargetSlot, LPRECT prc, LPCRECT prcQuery) + { + APPBARSLOT *pSlot; + AppBar_Sort(); + + RECT rcWork; + GetScreenRect(NULL, &rcWork); + + // TOP + for (UINT uBar = 0; uBar < MAX_APPBARS_PER_EDGE; ++uBar) + { + pSlot = &m_EdgeSlots[ABE_TOP][uBar]; + if (!pSlot->IsValid()) + break; + + if (pSlot->PosPending || pSlot->AutoHide) + continue; + + int cy = pSlot->rc.bottom - pSlot->rc.top; + pSlot->rc.left = rcWork.left; + pSlot->rc.right = rcWork.right; + pSlot->rc.top = rcWork.top; + pSlot->rc.bottom = rcWork.top + cy; + rcWork.top += cy; + if (pTargetSlot != pSlot && !pSlot->IsTaskBar) + { + AppBar_SendPosChanged(pSlot); + } + } + + // BOTTOM + for (UINT uBar = 0; uBar < MAX_APPBARS_PER_EDGE; ++uBar) + { + pSlot = &m_EdgeSlots[ABE_BOTTOM][uBar]; + if (!pSlot->IsValid()) + break; + + if (pSlot->PosPending || pSlot->AutoHide) + continue; + + int cy = pSlot->rc.bottom - pSlot->rc.top; + pSlot->rc.left = rcWork.left; + pSlot->rc.right = rcWork.right; + pSlot->rc.top = rcWork.bottom - cy; + pSlot->rc.bottom = rcWork.bottom; + rcWork.bottom -= cy; + if (pTargetSlot != pSlot && !pSlot->IsTaskBar) + { + AppBar_SendPosChanged(pSlot); + } + } + + // LEFT + for (UINT uBar = 0; uBar < MAX_APPBARS_PER_EDGE; ++uBar) + { + pSlot = &m_EdgeSlots[ABE_LEFT][uBar]; + if (!pSlot->IsValid()) + break; + + if (pSlot->PosPending || pSlot->AutoHide) + continue; + + int cx = pSlot->rc.right - pSlot->rc.left; + pSlot->rc.left = rcWork.left; + pSlot->rc.right = rcWork.left + cx; + pSlot->rc.top = rcWork.top; + pSlot->rc.bottom = rcWork.bottom; + rcWork.left += cx; + if (pTargetSlot != pSlot && !pSlot->IsTaskBar) + { + AppBar_SendPosChanged(pSlot); + } + } + + // RIGHT + for (UINT uBar = 0; uBar < MAX_APPBARS_PER_EDGE; ++uBar) + { + pSlot = &m_EdgeSlots[ABE_RIGHT][uBar]; + if (!pSlot->IsValid()) + break; + + if (pSlot->PosPending || pSlot->AutoHide) + continue; + + int cx = pSlot->rc.right - pSlot->rc.left; + pSlot->rc.left = rcWork.right - cx; + pSlot->rc.right = rcWork.right; + pSlot->rc.top = rcWork.top; + pSlot->rc.bottom = rcWork.bottom; + rcWork.right -= cx; + if (pTargetSlot != pSlot && !pSlot->IsTaskBar) + { + AppBar_SendPosChanged(pSlot); + } + } + + *prc = pSlot->rc; + + // FIXME: Fix the work area + + return TRUE; // success + } + + void AppBar_ClearAll() + { + ZeroMemory(&m_AppBarSlots, sizeof(m_AppBarSlots)); + } + + void AppBar_TreatTaskBarOnEdge(UINT uEdge) + { + for (UINT uSlot = 0; uSlot < MAX_APPBARS_PER_EDGE; ++uSlot) + { + APPBARSLOT *pSlot = &m_EdgeSlots[uEdge][uSlot]; + if (pSlot->IsValid() && pSlot->IsTaskBar) + { + APPBARSLOT SavedSlot = *pSlot; + const DWORD dwLeftCount = uSlot; + const DWORD dwLeftSize = dwLeftCount * sizeof(APPBARSLOT); + MoveMemory(&m_EdgeSlots[uEdge][1], &m_EdgeSlots[uEdge][0], + dwLeftSize); + m_EdgeSlots[uEdge][0] = SavedSlot; + break; + } + } + } + + // make the valid entries the top entries + void AppBar_SortOnEdge(UINT uEdge) + { + AppBar_TreatTaskBarOnEdge(uEdge); + + // sort + DWORD dwCount = 0; + APPBARSLOT Slots[MAX_APPBARS_PER_EDGE]; + for (UINT uSlot = 0; uSlot < MAX_APPBARS_PER_EDGE; ++uSlot) + { + APPBARSLOT *pSlot = &m_EdgeSlots[uEdge][uSlot]; + if (pSlot->IsValid()) + { + Slots[dwCount++] = *pSlot; + } + } + ZeroMemory(&m_EdgeSlots[uEdge], sizeof(Slots)); + const DWORD Size = dwCount * sizeof(APPBARSLOT); + CopyMemory(&m_EdgeSlots[uEdge], Slots, Size); + } + + void AppBar_Sort() + { + for (UINT uEdge = 0; uEdge <= NUM_EDGES; ++uEdge) + AppBar_SortOnEdge(uEdge); + } + + APPBARSLOT *AppBar_FindEntry(HWND hAppBarWnd) + { + APPBARSLOT *pSlot; + for (UINT uIndex = 0; uIndex < MAX_SLOTS; ++uIndex) + { + pSlot = &m_AppBarSlots[uIndex]; + if (pSlot->IsValid() && pSlot->hWnd == hAppBarWnd) + { + return pSlot; // success + } + } + return NULL; // failure + } + + BOOL AppBar_RemoveEntry(HWND hAppBarWnd) + { + APPBARSLOT *pSlot = AppBar_FindEntry(hAppBarWnd); + if (pSlot) + { + BOOL AutoHide = pSlot->AutoHide; + UINT uEdge = pSlot->uEdge; + pSlot->Reset(); + if (!AutoHide) + AppBar_SortOnEdge(uEdge); + return TRUE; // success + } + return FALSE; // failure + } + + APPBARSLOT *AppBar_AddNewEntry(HWND hAppBarWnd, UINT uCallback, + UINT uEdge = INVALID_EDGE) + { + APPBARSLOT *pSlot = AppBar_FindEntry(hAppBarWnd); + if (pSlot) + return FALSE; // already exists + + for (UINT uSlot = 0; uSlot < MAX_APPBARS_PER_EDGE; ++uSlot) + { + pSlot = &m_EdgeSlots[uEdge][uSlot]; + if (!pSlot->IsValid()) + { + pSlot->hWnd = hAppBarWnd; + pSlot->uEdge = uEdge; + pSlot->uCallbackMessage = uCallback; + pSlot->IsPresent = TRUE; + pSlot->IsTaskBar = FALSE; + pSlot->AlwaysOnTop = TRUE; + pSlot->AutoHide = FALSE; + pSlot->PosPending = TRUE; + ::GetWindowRect(hAppBarWnd, &pSlot->rc); + return pSlot; + } + } + return NULL; // no more entry + } + + BOOL OnAppBar_New(APPBARDATA *pData, APPBARRESULT *pResult) + { + pResult->ResultFlags = 0; + if (pData->uEdge >= NUM_EDGES) + return FALSE; // invalid edge + + APPBARSLOT *pSlot; + pSlot = AppBar_AddNewEntry(pData->hWnd, pData->uCallbackMessage); + return pSlot != NULL; + } + + BOOL OnAppBar_Remove(APPBARDATA *pData, APPBARRESULT *pResult) + { + pResult->ResultFlags = ABRFLAGS_RETURN_TRUE; + AppBar_RemoveEntry(pData->hWnd); + AppBar_SendPosChangedToAll(); + return TRUE; + } + + BOOL OnAppBar_Activate(APPBARDATA *pData, APPBARRESULT *pResult) + { + pResult->ResultFlags = ABRFLAGS_RETURN_TRUE; + + APPBARSLOT *pSlot = AppBar_FindEntry(pData->hWnd); + if (pSlot->IsValid()) + { + if (!pSlot->AutoHide) + ::BringWindowToTop(pData->hWnd); + } + + return TRUE; + } + + BOOL OnAppBar_GetAutoHideBar(APPBARDATA *pData, APPBARRESULT *pResult) + { + pResult->ResultFlags = ABRFLAGS_RETURN_HWND; + + UINT uEdge = pData->uEdge; + if (uEdge >= NUM_EDGES) + return FALSE; + + APPBARSLOT *pSlot = &m_AutoHideSlots[uEdge]; + if (pSlot->IsValid()) + { + pResult->hwnd = pSlot->hWnd; + return TRUE; // success + } + return FALSE; // failure + } + + BOOL OnAppBar_GetState(APPBARDATA *pData, APPBARRESULT *pResult) + { + pResult->ResultFlags = ABRFLAGS_RETURN_STATE; + + APPBARSLOT *pSlot = AppBar_FindEntry(pData->hWnd); + if (pSlot->IsValid()) + { + pResult->state = 0; + if (pSlot->AlwaysOnTop) + pResult->state |= ABS_ALWAYSONTOP; + if (pSlot->AutoHide) + pResult->state |= ABS_AUTOHIDE; + return TRUE; // success + } + return FALSE; // failure + } + + BOOL OnAppBar_GetTaskBarPos(APPBARDATA *pData, APPBARRESULT *pResult) + { + pResult->ResultFlags = ABRFLAGS_SET_RC; + return ::GetWindowRect(m_hWnd, &pResult->rc); + } + + BOOL OnAppBar_QueryPos(APPBARDATA *pData, APPBARRESULT *pResult) + { + pResult->ResultFlags = ABRFLAGS_RETURN_TRUE | ABRFLAGS_SET_RC; + pResult->rc = pData->rc; + + if (pData->uEdge >= NUM_EDGES) + return FALSE; // invalid edge + + APPBARSLOT *pSlot = AppBar_FindEntry(pData->hWnd); + if (pSlot == NULL) + return FALSE; // entry not found + + // adjust the rectangle + AppBar_AdjustRect(pSlot, &pResult->rc, &pData->rc); + pSlot->rc = pResult->rc; + + return TRUE; // success + } + + BOOL OnAppBar_SetAutoHideBar(APPBARDATA *pData, APPBARRESULT *pResult) + { + pResult->ResultFlags = 0; + + if (pData->uEdge >= NUM_EDGES) + return FALSE; // edge invalid + + APPBARSLOT *pSlot = &m_AutoHideSlots[pData->uEdge]; + if (pData->lParam) // register an autohide + { + pSlot = &m_AutoHideSlots[pData->uEdge]; + if (pSlot->IsValid()) + return FALSE; // already exists + + // register + pSlot->hWnd = pData->hWnd; + pSlot->uEdge = pData->uEdge; + pSlot->IsPresent = TRUE; + pSlot->IsTaskBar = FALSE; + pSlot->AlwaysOnTop = TRUE; + pSlot->AutoHide = TRUE; + pSlot->PosPending = TRUE; + + pSlot = AppBar_FindEntry(pData->hWnd); + pSlot->uEdge = pData->uEdge; + pSlot->AutoHide = TRUE; + pSlot->PosPending = TRUE; + + return TRUE; // added, success + } + else // unregister an autohide + { + if (pSlot->IsValid() && pSlot->AutoHide) + { + pSlot->Reset(); + return TRUE; // removed, success + } + } + return FALSE; // failure + } + + BOOL OnAppBar_SetPos(APPBARDATA *pData, APPBARRESULT *pResult) + { + pResult->ResultFlags = ABRFLAGS_SET_RC | ABRFLAGS_RETURN_TRUE; + + if (pData->uEdge > NUM_EDGES) + return FALSE; // invalid edge + + APPBARSLOT *pSlot = AppBar_FindEntry(pData->hWnd); + if (pSlot == NULL) + return FALSE; // entry not found + + if (pData->uEdge != pSlot->uEdge) + { + UINT uCallback = pSlot->uCallbackMessage; + + // remove from slot + UINT uEdge = pSlot->uEdge; + if (pSlot->AutoHide) + m_AutoHideSlots[uEdge].Reset(); + pSlot->Reset(); + AppBar_SortOnEdge(uEdge); + + // add new + pSlot = AppBar_AddNewEntry(pData->hWnd, uCallback, pData->uEdge); + if (pSlot == NULL) + return FALSE; // cannot add an entry + } + + ::GetWindowRect(pData->hWnd, &pSlot->rc); + ::BringWindowToTop(pData->hWnd); + + // the position is indeterminate. + pSlot->PosPending = TRUE; + + // adjust the rectangle + AppBar_SendPosChangedToAll(); + AppBar_AdjustRect(pSlot, &pResult->rc, &pData->rc); + pSlot->rc = pResult->rc; + + return TRUE; // success + } + + BOOL OnAppBar_WindowPosChanged(APPBARDATA *pData, APPBARRESULT *pResult) + { + pResult->ResultFlags = ABRFLAGS_RETURN_TRUE; + + APPBARSLOT *pSlot = AppBar_FindEntry(pData->hWnd); + if (pSlot == NULL) + return FALSE; // entry not found + + if (pSlot->AutoHide) + return TRUE; // ignore if autohide + + // the position was determinate. + pSlot->PosPending = FALSE; + + ::GetWindowRect(pData->hWnd, &pSlot->rc); + ::BringWindowToTop(pData->hWnd); + + return TRUE; // success + } + + // receive an appbar message + BOOL AppBar_ReceiveMessage(DWORD dwMessage, APPBARMESSAGE *msg) + { + // check magic number and size + if (msg->Magic != 0xDEADFACE) + return FALSE; + if (msg->Data.cbSize != sizeof(APPBARDATA)) + return FALSE; + + // lock the result data + APPBARRESULT *pResult = (APPBARRESULT *)GlobalLock(msg->hGlobal); + if (pResult == NULL) + return FALSE; + + // do the message process + BOOL ret; + APPBARDATA *pData = &msg->Data; + switch (dwMessage) + { + case ABM_NEW: + ret = OnAppBar_New(pData, pResult); + break; + case ABM_REMOVE: + ret = OnAppBar_Remove(pData, pResult); + break; + case ABM_ACTIVATE: + ret = OnAppBar_Activate(pData, pResult); + break; + case ABM_GETAUTOHIDEBAR: + ret = OnAppBar_GetAutoHideBar(pData, pResult); + break; + case ABM_GETSTATE: + ret = OnAppBar_GetState(pData, pResult); + break; + case ABM_GETTASKBARPOS: + ret = OnAppBar_GetTaskBarPos(pData, pResult); + break; + case ABM_QUERYPOS: + ret = OnAppBar_QueryPos(pData, pResult); + break; + case ABM_SETAUTOHIDEBAR: + ret = OnAppBar_SetAutoHideBar(pData, pResult); + break; + case ABM_SETPOS: + ret = OnAppBar_SetPos(pData, pResult); + break; + case ABM_WINDOWPOSCHANGED: + ret = OnAppBar_WindowPosChanged(pData, pResult); + break; + default: + break; + } + + // returns TRUE if it always returns TRUE + if (pResult->ResultFlags & ABRFLAGS_RETURN_TRUE) + ret = TRUE; + + // unlock the result data + GlobalUnlock(msg->hGlobal); + return ret; + } + + ////////////////////////////////////////////////////////////////////////// + LRESULT OnCopyData(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled) { + COPYDATASTRUCT *pcds; + APPBARMESSAGE *pMessage; + + // if an appbar message, then receive it + pcds = (COPYDATASTRUCT *)lParam; + if (pcds->cbData == sizeof(APPBARMESSAGE)) + { + switch (pcds->dwData) + { + case ABM_NEW: + case ABM_REMOVE: + case ABM_ACTIVATE: + case ABM_GETSTATE: + case ABM_GETTASKBARPOS: + case ABM_GETAUTOHIDEBAR: + case ABM_QUERYPOS: + case ABM_SETAUTOHIDEBAR: + case ABM_SETPOS: + case ABM_WINDOWPOSCHANGED: + pMessage = (APPBARMESSAGE *)pcds->lpData; + return AppBar_ReceiveMessage(pcds->dwData, pMessage); + default: + break; + } + } + if (m_TrayNotify) { TRACE("WM_COPYDATA notify message received. Handling...\n"); Index: reactos/dll/win32/shell32/wine/shell32_main.c =================================================================== --- reactos/dll/win32/shell32/wine/shell32_main.c (revision 72783) +++ reactos/dll/win32/shell32/wine/shell32_main.c (working copy) @@ -938,14 +938,101 @@ #define DROP_FIELD_TOP (-15) #define DROP_FIELD_HEIGHT 15 +/*************************************************************************/ +/* AppBar interface */ + +/* for result of appbar message */ +typedef struct APPBARRESULT +{ + DWORD ResultFlags; + RECT rc; + HWND hwnd; + UINT state; +} APPBARRESULT; + +/* for APPBARRESULT::ResultFlags */ +static const DWORD ABRFLAGS_RETURN_TRUE = 0x1; +static const DWORD ABRFLAGS_RETURN_HWND = 0x2; +static const DWORD ABRFLAGS_RETURN_STATE = 0x4; +static const DWORD ABRFLAGS_SET_RC = 0x8; + +/* for sending appbar message */ +typedef struct APPBARMESSAGE +{ + DWORD Magic; /* must be 0xDEADFACE */ + APPBARDATA Data; /* appbar data */ + HANDLE hGlobal; /* GHND to APPBARRESULT */ +} APPBARMESSAGE; + +/* get the tray window */ +static HWND FindTrayWnd(void) +{ + HWND hTrayWnd = FindWindowW(L"Shell_TrayWnd", NULL); + return hTrayWnd; +} + +/* send a message to tray window via WM_COPYDATA */ +static LRESULT +SendTrayWndMessage(HWND hWnd, DWORD msg, LPVOID lpData, DWORD cbData) +{ + HWND hTrayWnd; + COPYDATASTRUCT cds; + + hTrayWnd = FindTrayWnd(); + if (hTrayWnd == NULL) + return 0; + + cds.dwData = msg; + cds.cbData = cbData; + cds.lpData = lpData; + return SendMessage(hTrayWnd, WM_COPYDATA, (WPARAM)hWnd, (LPARAM)&cds); +} + +static LRESULT +IntSendAppBarMessage(DWORD dwMessage, APPBARDATA *data) +{ + LRESULT lResult; + APPBARMESSAGE abm; + APPBARRESULT *pResult; + + /* allocate the result data */ + abm.hGlobal = GlobalAlloc(GHND | GMEM_SHARE, sizeof(APPBARRESULT)); + if (abm.hGlobal == NULL) + return 0; /* failure */ + + /* send */ + abm.Magic = 0xDEADFACE; + abm.Data = *data; + lResult = SendTrayWndMessage(data->hWnd, dwMessage, &abm, sizeof(abm)); + + /* store the result */ + pResult = (APPBARRESULT *)GlobalLock(abm.hGlobal); + if (pResult) + { + if (pResult->ResultFlags & ABRFLAGS_RETURN_HWND) + lResult = (LRESULT)pResult->hwnd; + if (pResult->ResultFlags & ABRFLAGS_RETURN_STATE) + lResult = (LRESULT)pResult->state; + if (pResult->ResultFlags & ABRFLAGS_SET_RC) + data->rc = pResult->rc; + if (pResult->ResultFlags & ABRFLAGS_RETURN_TRUE) + lResult = TRUE; + GlobalUnlock(abm.hGlobal); + } + + /* free the result */ + GlobalFree(abm.hGlobal); + return lResult; +} + /************************************************************************* * SHAppBarMessage [SHELL32.@] */ UINT_PTR WINAPI SHAppBarMessage(DWORD msg, PAPPBARDATA data) { - int width=data->rc.right - data->rc.left; - int height=data->rc.bottom - data->rc.top; - RECT rec=data->rc; + int width = data->rc.right - data->rc.left; + int height = data->rc.bottom - data->rc.top; + RECT rec = data->rc; TRACE("msg=%d, data={cb=%d, hwnd=%p, callback=%x, edge=%d, rc=%s, lparam=%lx}\n", msg, data->cbSize, data->hWnd, data->uCallbackMessage, data->uEdge, @@ -953,51 +1040,27 @@ switch (msg) { + case ABM_NEW: + case ABM_REMOVE: + case ABM_ACTIVATE: + case ABM_GETAUTOHIDEBAR: case ABM_GETSTATE: - return ABS_ALWAYSONTOP | ABS_AUTOHIDE; - case ABM_GETTASKBARPOS: - GetWindowRect(data->hWnd, &rec); - data->rc=rec; - return TRUE; - - case ABM_ACTIVATE: - SetActiveWindow(data->hWnd); - return TRUE; - - case ABM_GETAUTOHIDEBAR: - return 0; /* pretend there is no autohide bar */ - - case ABM_NEW: - /* cbSize, hWnd, and uCallbackMessage are used. All other ignored */ - SetWindowPos(data->hWnd,HWND_TOP,0,0,0,0,SWP_SHOWWINDOW|SWP_NOMOVE|SWP_NOSIZE); - return TRUE; - case ABM_QUERYPOS: - GetWindowRect(data->hWnd, &(data->rc)); - return TRUE; - - case ABM_REMOVE: - FIXME("ABM_REMOVE broken\n"); - /* FIXME: this is wrong; should it be DestroyWindow instead? */ - /*CloseHandle(data->hWnd);*/ - return TRUE; - case ABM_SETAUTOHIDEBAR: - SetWindowPos(data->hWnd,HWND_TOP,rec.left+1000,rec.top, - width,height,SWP_SHOWWINDOW); - return TRUE; - case ABM_SETPOS: - data->uEdge=(ABE_RIGHT | ABE_LEFT); - SetWindowPos(data->hWnd,HWND_TOP,data->rc.left,data->rc.top, - width,height,SWP_SHOWWINDOW); - return TRUE; + case ABM_WINDOWPOSCHANGED: + if (data->cbSize == sizeof(APPBARDATA)) + { + return IntSendAppBarMessage(msg, data); + } + break; - case ABM_WINDOWPOSCHANGED: - return TRUE; + default: + break; } + width; height; rec; return FALSE; }