Author: gadamopoulos
Date: Sat Jun 17 07:28:35 2017
New Revision: 75071
URL:
http://svn.reactos.org/svn/reactos?rev=75071&view=rev
Log:
[BROWSEUI]
- CShellBrowser: Propagate WM_WININICHANGE to all immediate children.
- CInternetToolbar: Forward WM_WININICHANGE to the menu band to make aware that the flat
menus option changed.
Modified:
trunk/reactos/dll/win32/browseui/internettoolbar.cpp
trunk/reactos/dll/win32/browseui/internettoolbar.h
trunk/reactos/dll/win32/browseui/shellbrowser.cpp
Modified: trunk/reactos/dll/win32/browseui/internettoolbar.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/browseui/interne…
==============================================================================
--- trunk/reactos/dll/win32/browseui/internettoolbar.cpp [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/browseui/internettoolbar.cpp [iso-8859-1] Sat Jun 17 07:28:35
2017
@@ -1850,3 +1850,24 @@
return 0;
}
+LRESULT CInternetToolbar::OnWinIniChange(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL
&bHandled)
+{
+ HRESULT hr;
+ HWND hwndMenu;
+
+ hr = IUnknown_GetWindow(fMenuBar, &hwndMenu);
+ if (FAILED_UNEXPECTEDLY(hr))
+ return 0;
+
+ CComPtr<IWinEventHandler> menuWinEventHandler;
+ hr = fMenuBar->QueryInterface(IID_PPV_ARG(IWinEventHandler,
&menuWinEventHandler));
+ if (FAILED_UNEXPECTEDLY(hr))
+ return 0;
+
+ LRESULT lres;
+ hr = menuWinEventHandler->OnWinEvent(hwndMenu, uMsg, wParam, lParam, &lres);
+ if (FAILED_UNEXPECTEDLY(hr))
+ return 0;
+
+ return lres;
+}
Modified: trunk/reactos/dll/win32/browseui/internettoolbar.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/browseui/interne…
==============================================================================
--- trunk/reactos/dll/win32/browseui/internettoolbar.h [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/browseui/internettoolbar.h [iso-8859-1] Sat Jun 17 07:28:35
2017
@@ -195,6 +195,7 @@
LRESULT OnLDown(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled);
LRESULT OnLUp(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled);
LRESULT OnMouseMove(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled);
+ LRESULT OnWinIniChange(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled);
BEGIN_MSG_MAP(CInternetToolbar)
COMMAND_ID_HANDLER(IDM_GOTO_BACK, OnTravelBack)
@@ -215,6 +216,7 @@
MESSAGE_HANDLER(WM_LBUTTONDOWN, OnLDown)
MESSAGE_HANDLER(WM_LBUTTONUP, OnLUp)
MESSAGE_HANDLER(WM_MOUSEMOVE, OnMouseMove)
+ MESSAGE_HANDLER(WM_WININICHANGE, OnWinIniChange)
END_MSG_MAP()
DECLARE_REGISTRY_RESOURCEID(IDR_INTERNETTOOLBAR)
Modified: trunk/reactos/dll/win32/browseui/shellbrowser.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/browseui/shellbr…
==============================================================================
--- trunk/reactos/dll/win32/browseui/shellbrowser.cpp [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/browseui/shellbrowser.cpp [iso-8859-1] Sat Jun 17 07:28:35
2017
@@ -593,6 +593,7 @@
LRESULT OnInitMenuPopup(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL
&bHandled);
LRESULT OnSetFocus(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled);
LRESULT RelayMsgToShellView(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL
&bHandled);
+ LRESULT PropagateMessage(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL
&bHandled);
LRESULT OnClose(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL &bHandled);
LRESULT OnFolderOptions(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL
&bHandled);
LRESULT OnMapNetworkDrive(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL
&bHandled);
@@ -638,6 +639,7 @@
MESSAGE_HANDLER(WM_MEASUREITEM, RelayMsgToShellView)
MESSAGE_HANDLER(WM_DRAWITEM, RelayMsgToShellView)
MESSAGE_HANDLER(WM_MENUSELECT, RelayMsgToShellView)
+ MESSAGE_HANDLER(WM_WININICHANGE, PropagateMessage)
COMMAND_ID_HANDLER(IDM_FILE_CLOSE, OnClose)
COMMAND_ID_HANDLER(IDM_TOOLS_FOLDEROPTIONS, OnFolderOptions)
COMMAND_ID_HANDLER(IDM_TOOLS_MAPNETWORKDRIVE, OnMapNetworkDrive)
@@ -3508,6 +3510,12 @@
return 0;
}
+LRESULT CShellBrowser::PropagateMessage(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL
&bHandled)
+{
+ SHPropagateMessage(m_hWnd, uMsg, wParam, lParam, TRUE);
+ return 0;
+}
+
LRESULT CShellBrowser::OnClose(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL
&bHandled)
{
return SendMessage(WM_CLOSE);