Skip to main content
gamedev.net
🔒 Locked

Loading NotePad

Started by Bleakcabal Sep 30, 2000 at 8:03 AM 3 replies 200+ views
Original Post
Bleakcabal
Bleakcabal
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 ?
3dModelMan
3dModelMan
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
Bleakcabal
Bleakcabal
Thank you for your quick reply!
WHO DO THEYTHINK THEY'REFOOLING : YOU ?
Nekosion
Nekosion
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
Cygon
Cygon
There''s also WinExec():
    
char l_pszTemp[256];
//

strcpy(l_pszTemp, "NotePad ");
strcat(l_pszTemp, "MyText.txt"); // Insert string for file here

WinExec(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.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.