Advertisement

Loading NotePad

Started by September 30, 2000 08:03 AM
3 comments, last by Bleakcabal 24 years, 3 months ago
My App is running in DirectDraw windowed mode, is there anyway that I can say to it, fire up notepad with this file in it ?
WHO DO THEYTHINK THEY'REFOOLING : YOU ?
Look into the system() command:

int system( const char *command );

the command string will look something like

"notepad.exe c:\myfiles\openthisfile.txt"

as if it was typed from the command prompt.


Bye

Matt



Check out my project at:www.btinternet.com/~Matthew.Bennett
Advertisement
Thank you for your quick reply!
WHO DO THEYTHINK THEY'REFOOLING : YOU ?
Another method would be to
alt-tab out of your application and just fire up notepad.

However to do this you would need to restore your dd surfaces, I''m saying this because of the fact that if you wanted to view what is in notepad, you would corrupt your dd surfaces with gdi images.

I kinda like the system / ShellExecute functions though.

Regards,
Nekosion
Regards,Nekosion
There''s also WinExec():
    char l_pszTemp[256];//strcpy(l_pszTemp, "NotePad ");strcat(l_pszTemp, "MyText.txt"); // Insert string for file hereWinExec(l_pszTemp, 1);    


-Markus-
Professional C++ and .NET developer trying to break into indie game development.
Follow my progress: http://blog.nuclex-games.com/ or Twitter - Topics: Ogre3D, Blender, game architecture tips & code snippets.

This topic is closed to new replies.

Advertisement