From 6c16f12de5268d7b46501622842e80d82902040f Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bi=C8=99oc=20George?= Date: Tue, 24 Apr 2018 19:58:46 +0200 Subject: [PATCH] [CALC][CLIPBRD][SOLITAIRE][SPIDER][NOTEPAD][REGEDIT][TASKMGR] Disable help menu/button --- base/applications/calc/winmain.c | 2 ++ base/applications/charmap/charmap.c | 2 ++ base/applications/clipbrd/clipbrd.c | 4 ++++ base/applications/games/solitaire/solitaire.cpp | 6 ++++++ base/applications/games/spider/spider.cpp | 3 +++ base/applications/notepad/main.c | 3 +++ base/applications/regedit/framewnd.c | 2 ++ base/applications/taskmgr/taskmgr.c | 2 ++ 8 files changed, 24 insertions(+) diff --git a/base/applications/calc/winmain.c b/base/applications/calc/winmain.c index 02c93a5959c..e9761319969 100644 --- a/base/applications/calc/winmain.c +++ b/base/applications/calc/winmain.c @@ -1269,6 +1269,8 @@ static INT_PTR CALLBACK DlgMainProc(HWND hWnd, UINT msg, WPARAM wp, LPARAM lp) return SubclassButtonProc(hWnd, wp, lp); case WM_INITDIALOG: + // For now, the Help dialog is disabled because of lacking of HTML Help support + EnableMenuItem(GetMenu(hWnd), IDM_HELP_HELP, MF_BYCOMMAND | MF_GRAYED); calc.hWnd=hWnd; #ifdef USE_KEYBOARD_HOOK diff --git a/base/applications/charmap/charmap.c b/base/applications/charmap/charmap.c index 85378ecc956..35cc8e6f9f3 100644 --- a/base/applications/charmap/charmap.c +++ b/base/applications/charmap/charmap.c @@ -490,6 +490,8 @@ PanelWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) { switch (msg) { case WM_CREATE: + // For now, the Help push button is disabled because of lacking of HTML Help support + EnableWindow(GetDlgItem(hWnd, IDC_CMHELP), FALSE); return PanelOnCreate(hWnd, wParam, lParam); case WM_CLOSE: diff --git a/base/applications/clipbrd/clipbrd.c b/base/applications/clipbrd/clipbrd.c index bef831cd8bc..f46daeb6e40 100644 --- a/base/applications/clipbrd/clipbrd.c +++ b/base/applications/clipbrd/clipbrd.c @@ -349,6 +349,10 @@ static LRESULT WINAPI MainWndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lP { Globals.hMenu = GetMenu(hWnd); Globals.hWndNext = SetClipboardViewer(hWnd); + + // For now, the Help dialog item is disabled because of lacking of HTML support + EnableMenuItem(Globals.hMenu, CMD_HELP, MF_BYCOMMAND | MF_GRAYED); + UpdateDisplayMenu(); SetDisplayFormat(0); break; diff --git a/base/applications/games/solitaire/solitaire.cpp b/base/applications/games/solitaire/solitaire.cpp index a5b9da40a7e..84895cb5701 100644 --- a/base/applications/games/solitaire/solitaire.cpp +++ b/base/applications/games/solitaire/solitaire.cpp @@ -277,6 +277,9 @@ INT_PTR CALLBACK OptionsDlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lPar switch (uMsg) { case WM_INITDIALOG: + // For now, the Help dialog item is disabled because of lacking of HTML Help support + EnableMenuItem(GetMenu(hDlg), IDM_HELP_CONTENTS, MF_BYCOMMAND | MF_GRAYED); + CheckRadioButton(hDlg, IDC_OPT_DRAWONE, IDC_OPT_DRAWTHREE, (dwOptions & OPTION_THREE_CARDS) ? IDC_OPT_DRAWTHREE : IDC_OPT_DRAWONE); @@ -603,6 +606,9 @@ LRESULT CALLBACK WndProc (HWND hwnd, UINT iMsg, WPARAM wParam, LPARAM lParam) int parts[] = { 150, -1 }; RECT rcStatus; + // For now, the Help dialog item is disabled because of lacking of HTML Help support + EnableMenuItem(GetMenu(hwnd), IDM_HELP_CONTENTS, MF_BYCOMMAND | MF_GRAYED); + hwndStatus = CreateStatusWindow(WS_CHILD | WS_VISIBLE | CCS_BOTTOM | SBARS_SIZEGRIP, _T("Ready"), hwnd, 0); //SendMessage(hwndStatus, SB_SIMPLE, (WPARAM)TRUE, 0); diff --git a/base/applications/games/spider/spider.cpp b/base/applications/games/spider/spider.cpp index 8b5ab8b9e2c..a301254bc27 100644 --- a/base/applications/games/spider/spider.cpp +++ b/base/applications/games/spider/spider.cpp @@ -310,6 +310,9 @@ LRESULT CALLBACK WndProc (HWND hwnd, UINT iMsg, WPARAM wParam, LPARAM lParam) { case WM_CREATE: { + // For now, the Help dialog is disabled because of lacking of HTML Help support + EnableMenuItem(GetMenu(hwnd), IDM_HELP_CONTENTS, MF_BYCOMMAND | MF_GRAYED); + SpiderWnd.Create(hwnd, 0, WS_CHILD | WS_VISIBLE, 0, 0, 100, 100); dwDifficulty = IDC_DIF_ONECOLOR; CreateSpider(); diff --git a/base/applications/notepad/main.c b/base/applications/notepad/main.c index 60d453ccb5f..1540b736357 100644 --- a/base/applications/notepad/main.c +++ b/base/applications/notepad/main.c @@ -353,6 +353,9 @@ NOTEPAD_WndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) case WM_CREATE: Globals.hMenu = GetMenu(hWnd); + + // For now, the "Help" dialog is disabled due to the lack of HTML Help support + EnableMenuItem(Globals.hMenu, CMD_HELP_CONTENTS, MF_BYCOMMAND | MF_GRAYED); break; case WM_COMMAND: diff --git a/base/applications/regedit/framewnd.c b/base/applications/regedit/framewnd.c index a16019ede25..7bddbf81587 100644 --- a/base/applications/regedit/framewnd.c +++ b/base/applications/regedit/framewnd.c @@ -1306,6 +1306,8 @@ LRESULT CALLBACK FrameWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lPa switch (message) { case WM_CREATE: + // For now, the Help dialog item is disabled because of lacking of HTML Help support + EnableMenuItem(GetMenu(hWnd), ID_HELP_HELPTOPICS, MF_BYCOMMAND | MF_GRAYED); CreateWindowExW(0, szChildClass, NULL, WS_CHILD | WS_VISIBLE, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, hWnd, (HMENU)0, hInst, 0); diff --git a/base/applications/taskmgr/taskmgr.c b/base/applications/taskmgr/taskmgr.c index edd50326eda..29afc59d4d9 100644 --- a/base/applications/taskmgr/taskmgr.c +++ b/base/applications/taskmgr/taskmgr.c @@ -210,6 +210,8 @@ TaskManagerWndProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) switch (message) { case WM_INITDIALOG: + // For now, the Help dialog menu item is disabled because of lacking of HTML Help support + EnableMenuItem(GetMenu(hDlg), ID_HELP_TOPICS, MF_BYCOMMAND | MF_GRAYED); hMainWnd = hDlg; return OnCreate(hDlg); -- 2.17.1