I made a notepad app where one can open, modify and save files. It works perfectly. But when I open a .txt file from the File Explorer window, there opens just my app with empty wxTextCtrl.
I find this very natural: Of course Windows 10 cannot know that this app opens and saves txt files. So it just opens my app and no file. But my question is: How can I tell the File Explorer, that when the txt file is opened, run the OnOpen() method, for example?
Opening text files from the File Explorer in my app isn't working Topic is solved
Re: Opening text files from the File Explorer in my app isn't working
If a file is opened with application (e.g. by dropping it on the exe), you will receive its path as command line argument, accessible through wxAppConsole::argc/argv
https://docs.wxwidgets.org/trunk/classw ... 31a5e8bfc5
https://docs.wxwidgets.org/trunk/classw ... 31a5e8bfc5
Use the source, Luke!
Re: Opening text files from the File Explorer in my app isn't working
Thank you! If the number of arguments is not equal to 1, I open the file of the second argument. If it is equal to 1, I just start the app normally.