You will need to save the last filename used somewhere, like the registry, in HKCU\Software\jfk_lili\appname\LastFile, for example. Then on startup, you need a mechanism to detect that the program had no arguments, and then force it to load that file. If you were using MFC, for instance, you could override your InitInstance to examine the program's command line, where it uses CCommandLineInfo, and if the verb was FileNew, change it to FileOpen and fill in the m_strFileName member. You then call ProcessShellCommand, and it happens automatically. Steve S Developer for hire