win32: improved Edit action of Lua console. it tries to open a script by other ways if there is no association with "edit" action.

This commit is contained in:
gocha 2009-10-19 04:34:48 +00:00
parent 0ed6811c8c
commit 15c980ff10
1 changed files with 3 additions and 1 deletions

View File

@ -141,7 +141,9 @@ INT_PTR CALLBACK DlgLuaScriptDialog(HWND hDlg, UINT msg, WPARAM wParam, LPARAM l
SendDlgItemMessage(hDlg,IDC_EDIT_LUAPATH,WM_GETTEXT,(WPARAM)512,(LPARAM)Str_Tmp);
// tell the OS to open the file with its associated editor,
// without blocking on it or leaving a command window open.
ShellExecute(NULL, "edit", Str_Tmp, NULL, NULL, SW_SHOWNORMAL);
if((int)ShellExecute(NULL, "edit", Str_Tmp, NULL, NULL, SW_SHOWNORMAL) == SE_ERR_NOASSOC)
if((int)ShellExecute(NULL, "open", Str_Tmp, NULL, NULL, SW_SHOWNORMAL) == SE_ERR_NOASSOC)
ShellExecute(NULL, NULL, "notepad", Str_Tmp, NULL, SW_SHOWNORMAL);
} break;
case IDC_BUTTON_LUABROWSE: