F1 shows docs
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@1068 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
3cd3086bcf
commit
ed7f3ba094
4 changed files with 18 additions and 8 deletions
|
@ -110,6 +110,11 @@ BOOL CALLBACK DialogProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam) {
|
||||||
PostQuitMessage(0);
|
PostQuitMessage(0);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
case WM_HELP:
|
||||||
|
{
|
||||||
|
ShowDocs();
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
case WM_CLOSE:
|
case WM_CLOSE:
|
||||||
{
|
{
|
||||||
if (!g_hThread) {
|
if (!g_hThread) {
|
||||||
|
@ -227,13 +232,7 @@ BOOL CALLBACK DialogProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam) {
|
||||||
}
|
}
|
||||||
case IDM_DOCS:
|
case IDM_DOCS:
|
||||||
{
|
{
|
||||||
char pathf[MAX_PATH],*path;
|
ShowDocs();
|
||||||
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);
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
case IDM_LOADSCRIPT:
|
case IDM_LOADSCRIPT:
|
||||||
|
|
|
@ -93,7 +93,7 @@ BEGIN
|
||||||
POPUP "&Help"
|
POPUP "&Help"
|
||||||
BEGIN
|
BEGIN
|
||||||
MENUITEM "NSIS Home", IDM_NSISHOME
|
MENUITEM "NSIS Home", IDM_NSISHOME
|
||||||
MENUITEM "Documentation", IDM_DOCS
|
MENUITEM "Documentation\tF1", IDM_DOCS
|
||||||
MENUITEM SEPARATOR
|
MENUITEM SEPARATOR
|
||||||
MENUITEM "About &NSIS", IDM_ABOUTNSIS
|
MENUITEM "About &NSIS", IDM_ABOUTNSIS
|
||||||
MENUITEM "&About MakeNSISW", IDM_ABOUT
|
MENUITEM "&About MakeNSISW", IDM_ABOUT
|
||||||
|
|
|
@ -304,4 +304,14 @@ LRESULT CALLBACK TipHookProc(int nCode, WPARAM wParam, LPARAM lParam) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return CallNextHookEx(g_hook, nCode, wParam, lParam);
|
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);
|
||||||
}
|
}
|
|
@ -37,5 +37,6 @@ int InitBranding();
|
||||||
void InitTooltips(HWND h);
|
void InitTooltips(HWND h);
|
||||||
void DestroyTooltips();
|
void DestroyTooltips();
|
||||||
void AddTip(HWND hWnd,LPSTR lpszToolTip);
|
void AddTip(HWND hWnd,LPSTR lpszToolTip);
|
||||||
|
void ShowDocs();
|
||||||
|
|
||||||
#endif
|
#endif
|
Loading…
Add table
Add a link
Reference in a new issue