hhctrl.ocx: Don't show unimplemented buttons.

Francois Gouget fgouget at free.fr
Wed Aug 31 09:53:54 CDT 2011


Clicking on them would not do anything whatsoever which would only confuse users.
Also clearly identify the 'officially' unsupported buttons.
---

As discussed on wine-dev:
http://www.winehq.org/pipermail/wine-devel/2011-August/091913.html

 dlls/hhctrl.ocx/help.c    |   23 ++++++++---------------
 dlls/hhctrl.ocx/hhctrl.rc |   14 --------------
 2 files changed, 8 insertions(+), 29 deletions(-)

diff --git a/dlls/hhctrl.ocx/help.c b/dlls/hhctrl.ocx/help.c
index e151ab2..d52939d 100644
--- a/dlls/hhctrl.ocx/help.c
+++ b/dlls/hhctrl.ocx/help.c
@@ -750,6 +750,14 @@ static void TB_OnClick(HWND hWnd, DWORD dwID)
         case IDTB_OPTIONS:
             DisplayPopupMenu(info);
             break;
+        case IDTB_NOTES:
+        case IDTB_CONTENTS:
+        case IDTB_INDEX:
+        case IDTB_SEARCH:
+        case IDTB_HISTORY:
+        case IDTB_FAVORITES:
+            /* These are officially unimplemented as of the Windows 7 SDK */
+            break;
         case IDTB_BROWSE_FWD:
         case IDTB_BROWSE_BACK:
         case IDTB_JUMP1:
@@ -826,21 +834,6 @@ static void TB_AddButtonsFromFlags(HHInfo *pHHInfo, TBBUTTON *pButtons, DWORD dw
 
     if (dwButtonFlags & HHWIN_BUTTON_PRINT)
         TB_AddButton(pButtons, (*pdwNumButtons)++, IDTB_PRINT, nStdBitmaps + STD_PRINT);
-
-    if (dwButtonFlags & HHWIN_BUTTON_JUMP1)
-        TB_AddButton(pButtons, (*pdwNumButtons)++, IDTB_JUMP1, nStdBitmaps + STD_PRINT);
-
-    if (dwButtonFlags & HHWIN_BUTTON_JUMP2)
-        TB_AddButton(pButtons,(*pdwNumButtons)++, IDTB_JUMP2, nStdBitmaps + STD_PRINT);
-
-    if (dwButtonFlags & HHWIN_BUTTON_ZOOM)
-        TB_AddButton(pButtons, (*pdwNumButtons)++, IDTB_ZOOM, nStdBitmaps + STD_PRINT);
-
-    if (dwButtonFlags & HHWIN_BUTTON_TOC_NEXT)
-        TB_AddButton(pButtons, (*pdwNumButtons)++, IDTB_TOC_NEXT, nStdBitmaps + STD_PRINT);
-
-    if (dwButtonFlags & HHWIN_BUTTON_TOC_PREV)
-        TB_AddButton(pButtons, (*pdwNumButtons)++, IDTB_TOC_PREV, nStdBitmaps + STD_PRINT);
 }
 
 static BOOL HH_AddToolbar(HHInfo *pHHInfo)
diff --git a/dlls/hhctrl.ocx/hhctrl.rc b/dlls/hhctrl.ocx/hhctrl.rc
index 0fc7da4..4ec8fe9 100644
--- a/dlls/hhctrl.ocx/hhctrl.rc
+++ b/dlls/hhctrl.ocx/hhctrl.rc
@@ -46,20 +46,6 @@ BEGIN
     IDTB_PRINT       "Print"
     IDTB_OPTIONS     "Options"
     IDTB_FORWARD     "Forward"
-    IDTB_NOTES       "IDTB_NOTES"
-    IDTB_BROWSE_FWD  "IDTB_BROWSE_FWD"
-    IDTB_BROWSE_BACK "IDT_BROWSE_BACK"
-    IDTB_CONTENTS    "IDTB_CONTENTS"
-    IDTB_INDEX       "IDTB_INDEX"
-    IDTB_SEARCH      "IDTB_SEARCH"
-    IDTB_HISTORY     "IDTB_HISTORY"
-    IDTB_FAVORITES   "IDTB_FAVORITES"
-    IDTB_JUMP1       "Jump1"
-    IDTB_JUMP2       "Jump2"
-    IDTB_CUSTOMIZE   "Customize"
-    IDTB_ZOOM        "Zoom"
-    IDTB_TOC_NEXT    "IDTB_TOC_NEXT"
-    IDTB_TOC_PREV    "IDTB_TOC_PREV"
 END
 
 MENU_POPUP MENU
-- 
1.7.5.4



More information about the wine-patches mailing list