44#include <commoncontrols.h>
53# define _ASSERT(x) DbgAssert(!!(x), __FILE__, __LINE__, #x)
83# define _ASSERT(x) (!!(x))
111 obj =
new CComObject<CMenuFocusManager>();
155 if (pMb) *pMb =
NULL;
156 if (pHmenu) *pHmenu =
NULL;
179 m_hMsgFilterHook(
NULL),
181 m_mouseTrackDisabled(
FALSE),
183 m_hwndUnderMouse(
NULL),
184 m_entryUnderMouse(
NULL),
185 m_selectedMenu(
NULL),
187 m_selectedItemFlags(0),
188 m_movedSinceDown(
FALSE),
189 m_windowAtDown(
NULL),
190 m_PreviousForeground(
NULL),
223 lastDisable = disableThis;
224 entry.mb->_DisableMouseTrack(disableThis);
229 lastDisable = bDisable;
230 entry.mb->_DisableMouseTrack(bDisable);
251 TRACE(
"Capture is now off\n");
298 CComPtr<IUnknown>
site;
299 CComPtr<IOleWindow> pw;
308 if (pw->GetWindow(&hParent) ==
S_OK && hParent ==
hWnd)
320 int iHitTestResult = -1;
341 TRACE(
"MouseMove\n");
349 isTracking =
entry->mb->_IsTracking();
355 TRACE(
"Hot item tracking detected a change (capture=%p / cCapture=%p)...\n",
m_captureHwnd, cCapture);
402 int iHitTestResult = -1;
404 TRACE(
"ProcessMouseDown %d %d %d\n",
msg->message,
msg->wParam,
msg->lParam);
410 TRACE(
"Foreign capture active.\n");
421 TRACE(
"Foreign window detected.\n");
429 TRACE(
"Menubar with popup active.\n");
439 if (iHitTestResult >= 0)
441 TRACE(
"MouseDown send %d\n", iHitTestResult);
442 entry->mb->_MenuBarMouseDown(
child, iHitTestResult, isLButton);
451 TRACE(
"MouseDown end\n");
459 int iHitTestResult = -1;
461 TRACE(
"ProcessMouseUp %d %d %d\n",
msg->message,
msg->wParam,
msg->lParam);
481 if (iHitTestResult >= 0)
483 TRACE(
"MouseUp send %d\n", iHitTestResult);
484 entry->mb->_MenuBarMouseUp(
child, iHitTestResult, isLButton);
499 MSG*
msg =
reinterpret_cast<MSG*
>(hookLParam);
501 switch (
msg->message)
520 TRACE(
"WM_INITMENUPOPUP %p %p\n",
msg->wParam,
msg->lParam);
526 TRACE(
"WM_MENUSELECT %p %p\n",
msg->wParam,
msg->lParam);
566 MSG*
msg =
reinterpret_cast<MSG*
>(hookLParam);
569 switch (
msg->message)
574 TRACE(
"Capture lost.\n");
674 WARN(
"GETMESSAGE hook already placed!\n");
679 WARN(
"MSGFILTER hook already placed!\n");
684 TRACE(
"Entering MSGFILTER hook...\n");
689 TRACE(
"Entering GETMESSAGE hook...\n");
699 TRACE(
"Removing MSGFILTER hook...\n");
705 TRACE(
"Removing GETMESSAGE hook...\n");
718 TRACE(
"UpdateFocus\n");
803 CComPtr<IServiceProvider> bandSite;
804 CComPtr<IOleWindow> deskBar;
812 CComPtr<IOleWindow> deskBarSite;
819 hr = deskBarSite->GetWindow(&hWndOwner);
831 hr = deskBar->GetWindow(&hWndSite);
864 TRACE(
"PushMenuBar %p\n", mb);
880 TRACE(
"PushTrackedPopup %p\n", mb);
906 TRACE(
"PushTrackedPopup %p\n", popup);
915 TRACE(
"PushTrackedPopup %p\n", popup);
930 TRACE(
"PopMenuBar %p\n", mb);
975 TRACE(
"PopMenuPopup %p\n", mb);
1022 TRACE(
"PopTrackedPopup %p\n", popup);
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
STDMETHOD() IsWindowOwner(HWND hWnd) override
HRESULT _GetTopLevelWindow(HWND *topLevel)
STDMETHOD() GetSite(REFIID riid, PVOID *ppvSite) override
HRESULT _MenuItemSelect(DWORD changeType)
HRESULT _SetParentBand(CMenuBand *parent)
HRESULT _ChangeHotItem(CMenuToolbarBase *tb, INT id, DWORD dwFlags)
HRESULT _SetChildBand(CMenuBand *child)
HRESULT _BeforeCancelPopup()
#define FAILED_UNEXPECTEDLY(hr)
LPVOID WINAPI TlsGetValue(IN DWORD Index)
DWORD WINAPI TlsAlloc(VOID)
BOOL WINAPI TlsSetValue(IN DWORD Index, IN LPVOID Value)
HRESULT WINAPI IUnknown_QueryService(IUnknown *, REFGUID, REFIID, LPVOID *)
HRESULT WINAPI IUnknown_GetSite(LPUNKNOWN lpUnknown, REFIID iid, PVOID *lppSite)
GLint GLint GLint GLint GLint x
GLuint GLuint GLsizei GLenum type
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
void WINAPI SHIM_OBJ_NAME() OutputDebugStringA(LPCSTR lpOutputString)
void __cdecl __debugbreak(void)
#define sprintf(buf, format,...)
static IActiveScriptSite * site
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
_CRT_RESTORE_GCC_WARNINGS _CRT_DISABLE_GCC_WARNINGS _Check_return_ _CRTIMP _CONST_RETURN char *__cdecl strrchr(_In_z_ const char *_Str, _In_ int _Ch)
TW_UINT32 TW_UINT16 TW_UINT16 MSG
DWORD WINAPI GetCurrentThreadId(void)
#define TLS_OUT_OF_INDEXES
HWND WINAPI SetCapture(_In_ HWND hWnd)
BOOL WINAPI ReleaseCapture(void)
HWND WINAPI GetForegroundWindow(void)
#define WM_CAPTURECHANGED
BOOL WINAPI SetForegroundWindow(_In_ HWND)
BOOL WINAPI GetCursorPos(_Out_ LPPOINT)
HWND WINAPI GetCapture(void)
BOOL WINAPI ClientToScreen(_In_ HWND, _Inout_ LPPOINT)
BOOL WINAPI PtInRect(_In_ LPCRECT, _In_ POINT)
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)
BOOL WINAPI UnhookWindowsHookEx(_In_ HHOOK)
LRESULT WINAPI CallNextHookEx(_In_opt_ HHOOK, _In_ int, _In_ WPARAM, _In_ LPARAM)
HWND WINAPI WindowFromPoint(_In_ POINT)
HWND WINAPI GetAncestor(_In_ HWND, _In_ UINT)
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
BOOL WINAPI ScreenToClient(_In_ HWND, _Inout_ LPPOINT)
#define IID_PPV_ARG(Itype, ppType)