diff --git a/Contrib/Makensisw/makensisw.cpp b/Contrib/Makensisw/makensisw.cpp index 54f68fc5..f4c4c61d 100644 --- a/Contrib/Makensisw/makensisw.cpp +++ b/Contrib/Makensisw/makensisw.cpp @@ -110,6 +110,11 @@ BOOL CALLBACK DialogProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam) { PostQuitMessage(0); return TRUE; } + case WM_HELP: + { + ShowDocs(); + return TRUE; + } case WM_CLOSE: { if (!g_hThread) { @@ -227,13 +232,7 @@ BOOL CALLBACK DialogProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam) { } case IDM_DOCS: { - char pathf[MAX_PATH],*path; - GetModuleFileName(NULL,pathf,sizeof(pathf)); - path=my_strrchr(pathf,'\\'); - if(path!=NULL) *path=0; - lstrcat(pathf,LOCALDOCS); - if ((int)ShellExecute(g_hwnd,"open",pathf,NULL,NULL,SW_SHOWNORMAL)<=32) - ShellExecute(g_hwnd,"open",DOCPATH,NULL,NULL,SW_SHOWNORMAL); + ShowDocs(); return TRUE; } case IDM_LOADSCRIPT: diff --git a/Contrib/Makensisw/resource.rc b/Contrib/Makensisw/resource.rc index 36a4c877..2934d023 100644 --- a/Contrib/Makensisw/resource.rc +++ b/Contrib/Makensisw/resource.rc @@ -93,7 +93,7 @@ BEGIN POPUP "&Help" BEGIN MENUITEM "NSIS Home", IDM_NSISHOME - MENUITEM "Documentation", IDM_DOCS + MENUITEM "Documentation\tF1", IDM_DOCS MENUITEM SEPARATOR MENUITEM "About &NSIS", IDM_ABOUTNSIS MENUITEM "&About MakeNSISW", IDM_ABOUT diff --git a/Contrib/Makensisw/utils.cpp b/Contrib/Makensisw/utils.cpp index f02d3551..e3f1b6ca 100644 --- a/Contrib/Makensisw/utils.cpp +++ b/Contrib/Makensisw/utils.cpp @@ -304,4 +304,14 @@ LRESULT CALLBACK TipHookProc(int nCode, WPARAM wParam, LPARAM lParam) { break; } return CallNextHookEx(g_hook, nCode, wParam, lParam); +} + +void ShowDocs() { + char pathf[MAX_PATH],*path; + GetModuleFileName(NULL,pathf,sizeof(pathf)); + path=my_strrchr(pathf,'\\'); + if(path!=NULL) *path=0; + lstrcat(pathf,LOCALDOCS); + if ((int)ShellExecute(g_hwnd,"open",pathf,NULL,NULL,SW_SHOWNORMAL)<=32) + ShellExecute(g_hwnd,"open",DOCPATH,NULL,NULL,SW_SHOWNORMAL); } \ No newline at end of file diff --git a/Contrib/Makensisw/utils.h b/Contrib/Makensisw/utils.h index bbb2d765..538f4383 100644 --- a/Contrib/Makensisw/utils.h +++ b/Contrib/Makensisw/utils.h @@ -37,5 +37,6 @@ int InitBranding(); void InitTooltips(HWND h); void DestroyTooltips(); void AddTip(HWND hWnd,LPSTR lpszToolTip); +void ShowDocs(); #endif \ No newline at end of file