Author: dquintana
Date: Mon Jun 23 22:08:33 2014
New Revision: 63638

URL: http://svn.reactos.org/svn/reactos?rev=63638&view=rev
Log:
[EXPLORER-NEW]
* Implement a rudimentary "Help and Support" start menu item by launching the 
default browser with http://reactos.org/ as the URL.

Modified:
    branches/shell-experiments/base/shell/explorer-new/traywnd.c

Modified: branches/shell-experiments/base/shell/explorer-new/traywnd.c
URL: 
http://svn.reactos.org/svn/reactos/branches/shell-experiments/base/shell/explorer-new/traywnd.c?rev=63638&r1=63637&r2=63638&view=diff
==============================================================================
--- branches/shell-experiments/base/shell/explorer-new/traywnd.c        
[iso-8859-1] (original)
+++ branches/shell-experiments/base/shell/explorer-new/traywnd.c        
[iso-8859-1] Mon Jun 23 22:08:33 2014
@@ -2640,8 +2640,33 @@
                             break;
 
                         case IDM_SEARCH:
+                            break;
+
                         case IDM_HELPANDSUPPORT:
+                        {
+                            /* TODO: Implement properly */
+
+                            LPCWSTR strSite = L"http://www.reactos.org/";;
+
+                            /* TODO: Make localizable */
+                            LPCWSTR strCaption = L"Sorry";
+                            LPCWSTR strMessage = L"ReactOS could not browse to 
'%s' (error %d). Please make sure there is a web browser installed.";
+                            WCHAR tmpMessage[512];
+
+                            /* TODO: Read from the registry */
+                            LPCWSTR strVerb = NULL; /* default */
+                            LPCWSTR strPath = strSite;
+                            LPCWSTR strParams = NULL;
+
+                            /* The return value is defined as HINSTANCE for 
backwards compatibility only, the cast is needed */
+                            int result = (int) ShellExecuteW(hwnd, strVerb, 
strPath, strParams, NULL, SW_SHOWNORMAL);
+                            if (result <= 32)
+                            {
+                                StringCchPrintfW(tmpMessage, 512, strMessage, 
strSite, result);
+                                MessageBoxExW(hwnd, tmpMessage, strCaption, 
MB_OK, 0);
+                            }
                             break;
+                        }
 
                         case IDM_RUN:
                         {


Reply via email to