diff --git a/launcher/CmderLauncher.vcxproj b/launcher/CmderLauncher.vcxproj index 8231621..286876f 100644 --- a/launcher/CmderLauncher.vcxproj +++ b/launcher/CmderLauncher.vcxproj @@ -59,6 +59,7 @@ Windows true + src/app.manifest %(AdditionalManifestFiles) @@ -85,6 +86,7 @@ true true true + src/app.manifest %(AdditionalManifestFiles) @@ -94,7 +96,7 @@ - + RC diff --git a/launcher/src/CmderLauncher.cpp b/launcher/src/CmderLauncher.cpp index 9f0a275..d0c80ec 100644 --- a/launcher/src/CmderLauncher.cpp +++ b/launcher/src/CmderLauncher.cpp @@ -460,7 +460,12 @@ cmderOptions GetOption() cmderOptions.cmderStart = szArgList[i]; } else { - MessageBox(NULL, L"Unrecognized parameter.\n\nValid options:\n\n /c [CMDER User Root Path]\n\n /task [ConEmu Task Name]\n\n [/start [Start in Path] | [Start in Path]]\n\n /single\n\nor\n\n /register [USER | ALL]\n\nor\n\n /unregister [USER | ALL]\n", MB_TITLE, MB_OK); + wchar_t validOptions[512]; + HMODULE hMod = GetModuleHandle(NULL); + LoadString(hMod, IDS_SWITCHES, validOptions, 512); + + // display list of valid options on unrecognized parameter + MessageBox(NULL, validOptions, MB_TITLE, MB_OK); cmderOptions.error = true; } } diff --git a/launcher/src/resource.h b/launcher/src/resource.h index 709cf9d..551480e 100644 Binary files a/launcher/src/resource.h and b/launcher/src/resource.h differ diff --git a/launcher/src/Resource.rc b/launcher/src/resource.rc similarity index 99% rename from launcher/src/Resource.rc rename to launcher/src/resource.rc index 55e2772..28d3980 100644 --- a/launcher/src/Resource.rc +++ b/launcher/src/resource.rc @@ -9,6 +9,7 @@ #include "resource.h" #include "version.rc2" +#include "strings.rc2" #define APSTUDIO_READONLY_SYMBOLS ///////////////////////////////////////////////////////////////////////////// diff --git a/launcher/src/strings.rc2 b/launcher/src/strings.rc2 new file mode 100755 index 0000000..331b2d2 --- /dev/null +++ b/launcher/src/strings.rc2 @@ -0,0 +1,12 @@ + +///////////////////////////////////////////////////////////////////////////// +// Corresponding ids should be defined in `resource.h` file. + +STRINGTABLE +{ + IDS_TITLE L"Cmder Launcher" + + IDS_SWITCHES L"Unrecognized parameter.\n\nValid options:\n\n /c [CMDER User Root Path]\n\n /task [ConEmu Task Name]\n\n [/start [Start in Path] | [Start in Path]]\n\n /single\n\nor\n\n /register [USER | ALL]\n\nor\n\n /unregister [USER | ALL]\n" +} + +/////////////////////////////////////////////////////////////////////////////