@@ -646,6 +646,122 @@ void DebugInfoDlg::refreshDebugInfo()
646646}
647647
648648
649+ const wchar_t COMMAND_ARG_HELP[] = L" Usage:\r\n \
650+ \r\n \
651+ notepad++ [--help] [-multiInst] [-noPlugin] [-lLanguage] [-udl=\" My UDL Name\" ] [-LlangCode] [-nLineNumber]\r\n \
652+ [-cColumnNumber] [-pPosition] [-xLeftPos] [-yTopPos] [-monitor] [-nosession] [-notabbar] [-systemtray]\r\n \
653+ [-loadingTime] [-ro] [-fullReadOnly] [-fullReadOnlySavingForbidden] [-alwaysOnTop] [-openSession] [-r]\r\n \
654+ [-qn=\" Easter egg name\" | -qt=\" a text to display.\" | -qf=\" D:\\ my quote.txt\" ] [-qSpeed1|2|3] [-quickPrint]\r\n \
655+ [-settingsDir=\" d:\\ your settings dir\\\" ] [-openFoldersAsWorkspace] [-titleAdd=\" additional title bar text\" ]\r\n \
656+ [filePath]\r\n \
657+ \r\n \
658+ --help: This help message\r\n \
659+ -multiInst: Launch another Notepad++ instance\r\n \
660+ -noPlugin: Launch Notepad++ without loading any plugin\r\n \
661+ -l: Open file or Ghost type with syntax highlighting of choice\r\n \
662+ -udl=\" My UDL Name\" : Open file by applying User Defined Language\r\n \
663+ -L: Apply indicated localization, langCode is browser language code\r\n \
664+ -n: Scroll to indicated line on filePath\r\n \
665+ -c: Scroll to indicated column on filePath\r\n \
666+ -p: Scroll to indicated position on filePath\r\n \
667+ -x: Move Notepad++ to indicated left side position on the screen\r\n \
668+ -y: Move Notepad++ to indicated top position on the screen\r\n \
669+ -monitor: Open file with file monitoring enabled\r\n \
670+ -nosession: Launch Notepad++ without previous session\r\n \
671+ -notabbar: Launch Notepad++ without tab bar\r\n \
672+ -ro: Make the filePath read-only\r\n \
673+ -fullReadOnly: Open all files read-only by default, toggling the R/O off and saving is allowed\r\n \
674+ -fullReadOnlySavingForbidden: Open all files read-only by default, toggling the R/O off and saving is disabled\r\n \
675+ -systemtray: Launch Notepad++ directly in system tray\r\n \
676+ -loadingTime: Display Notepad++ loading time\r\n \
677+ -alwaysOnTop: Make Notepad++ always on top\r\n \
678+ -openSession: Open a session. filePath must be a session file\r\n \
679+ -r: Open files recursively. This argument will be ignored if filePath contains no wildcard character\r\n \
680+ -qn=\" Easter egg name\" : Ghost type easter egg via its name\r\n \
681+ -qt=\" text to display.\" : Ghost type the given text\r\n \
682+ -qf=\" D:\\ my quote.txt\" : Ghost type a file content via the file path\r\n \
683+ -qSpeed: Ghost typing speed. Value from 1 to 3 for slow, fast and fastest\r\n \
684+ -quickPrint: Print the file given as argument then quit Notepad++\r\n \
685+ -settingsDir=\" d:\\ your settings dir\\\" : Override the default settings dir\r\n \
686+ -openFoldersAsWorkspace: open filePath of folder(s) as workspace\r\n \
687+ -titleAdd=\" string\" : add string to Notepad++ title bar\r\n \
688+ filePath: file or folder name to open (absolute or relative path name)\r\n \
689+ " ;
690+
691+ void CmdLineArgsDlg::doDialog ()
692+ {
693+ if (!isCreated ())
694+ create (IDD_COMMANDLINEARGSBOX);
695+
696+ ::SetDlgItemText (_hSelf, IDC_COMMANDLINEARGS_EDIT, COMMAND_ARG_HELP);
697+
698+ moveForDpiChange ();
699+ goToCenter (SWP_SHOWWINDOW | SWP_NOSIZE);
700+ }
701+
702+ intptr_t CALLBACK CmdLineArgsDlg::run_dlgProc (UINT message, WPARAM wParam, LPARAM lParam)
703+ {
704+ switch (message)
705+ {
706+ case WM_INITDIALOG:
707+ {
708+ NppDarkMode::autoSubclassAndThemeChildControls (_hSelf);
709+ return TRUE ;
710+ }
711+
712+ case WM_CTLCOLORDLG:
713+ case WM_CTLCOLORSTATIC:
714+ {
715+ return NppDarkMode::onCtlColorDlg (reinterpret_cast <HDC>(wParam));
716+ }
717+
718+ case WM_PRINTCLIENT:
719+ {
720+ if (NppDarkMode::isEnabled ())
721+ {
722+ return TRUE ;
723+ }
724+ break ;
725+ }
726+
727+ case NPPM_INTERNAL_REFRESHDARKMODE:
728+ {
729+ NppDarkMode::autoThemeChildControls (_hSelf);
730+ return TRUE ;
731+ }
732+
733+ case WM_DPICHANGED:
734+ {
735+ _dpiManager.setDpiWP (wParam);
736+ setPositionDpi (lParam);
737+ getWindowRect (_rc);
738+
739+ return TRUE ;
740+ }
741+
742+ case WM_COMMAND:
743+ {
744+ switch (wParam)
745+ {
746+ case IDCANCEL:
747+ case IDOK:
748+ display (false );
749+ return TRUE ;
750+
751+ default :
752+ break ;
753+ }
754+ break ;
755+ }
756+
757+ case WM_DESTROY:
758+ {
759+ return TRUE ;
760+ }
761+ }
762+ return FALSE ;
763+ }
764+
649765void DoSaveOrNotBox::doDialog (bool isRTL)
650766{
651767
0 commit comments