Click here to Skip to main content
15,921,840 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralModeless dialog problem Pin
krugger20-May-04 21:26
krugger20-May-04 21:26 
GeneralRe: Modeless dialog problem Pin
Ernesto D.20-May-04 22:36
Ernesto D.20-May-04 22:36 
GeneralHTML help in Visual C++ project Pin
krugger20-May-04 20:51
krugger20-May-04 20:51 
GeneralRe: HTML help in Visual C++ project Pin
Dennis Gourjii21-May-04 3:11
Dennis Gourjii21-May-04 3:11 
GeneralRe: HTML help in Visual C++ project Pin
*Dreamz21-May-04 3:55
*Dreamz21-May-04 3:55 
GeneralHelp!automatically read the file Pin
jfk_lili20-May-04 19:56
jfk_lili20-May-04 19:56 
GeneralRe: Help!automatically read the file Pin
mirex20-May-04 21:23
mirex20-May-04 21:23 
GeneralRe: Help!automatically read the file Pin
Steve S21-May-04 0:29
Steve S21-May-04 0:29 
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
GeneralMenu Controls Pin
Eversman20-May-04 18:39
Eversman20-May-04 18:39 
GeneralRe: Menu Controls Pin
*Dreamz20-May-04 19:03
*Dreamz20-May-04 19:03 
Generalcompiler setting in command line. Pin
Anthony_Yio20-May-04 18:07
Anthony_Yio20-May-04 18:07 
GeneralRe: compiler setting in command line. Pin
bikram singh20-May-04 19:42
bikram singh20-May-04 19:42 
GeneralMFC MDI APP CRASHES Pin
MFC_R_O_O_K_I_E20-May-04 15:53
MFC_R_O_O_K_I_E20-May-04 15:53 
Generalinvoke doc/view from a dialog Pin
-alok-20-May-04 15:46
suss-alok-20-May-04 15:46 
GeneralRe: invoke doc/view from a dialog Pin
Johan Rosengren21-May-04 5:58
Johan Rosengren21-May-04 5:58 
QuestionCan I post a message to a dll from a dll? Pin
freehawk20-May-04 15:13
freehawk20-May-04 15:13 
AnswerRe: Can I post a message to a dll from a dll? Pin
bryce20-May-04 15:19
bryce20-May-04 15:19 
GeneralRe: Can I post a message to a dll from a dll? Pin
freehawk20-May-04 15:41
freehawk20-May-04 15:41 
GeneralRe: Can I post a message to a dll from a dll? Pin
bryce20-May-04 16:14
bryce20-May-04 16:14 
GeneralRe: Can I post a message to a dll from a dll? Pin
freehawk20-May-04 16:48
freehawk20-May-04 16:48 
GeneralRe: Can I post a message to a dll from a dll? Pin
Jason Henderson20-May-04 17:28
Jason Henderson20-May-04 17:28 
GeneralRe: Can I post a message to a dll from a dll? Pin
bikram singh20-May-04 19:29
bikram singh20-May-04 19:29 
GeneralRe: Can I post a message to a dll from a dll? Pin
freehawk13-Jul-04 0:36
freehawk13-Jul-04 0:36 
AnswerRe: Can I post a message to a dll from a dll? Pin
David Crow21-May-04 3:11
David Crow21-May-04 3:11 
Generalusing HttpSend Request instead of InternetOpenUrl Pin
danLenehan20-May-04 13:47
danLenehan20-May-04 13:47 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.