Opening Common File Dialogs

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jj555s
    New Member
    • Mar 2007
    • 36

    Opening Common File Dialogs

    Out of curiosity, is it possible to run code to run an application like notepad?
  • sicarie
    Recognized Expert Specialist
    • Nov 2006
    • 4677

    #2
    Originally posted by jj555s
    Out of curiosity, is it possible to run code to run an application like notepad?
    To execute an application? Like the 'system()' command?

    Comment

    • jj555s
      New Member
      • Mar 2007
      • 36

      #3
      How is system() used?
      Could you provide a link?

      Comment

      • sicarie
        Recognized Expert Specialist
        • Nov 2006
        • 4677

        #4
        Originally posted by jj555s
        How is system() used?
        Could you provide a link?
        I think Google would be your best bet. I like cplusplus.com, but I've never looked up the system command on it.

        Comment

        • jj555s
          New Member
          • Mar 2007
          • 36

          #5
          I can't find it

          Comment

          • jj555s
            New Member
            • Mar 2007
            • 36

            #6
            how do you get rid of the command prompt window when you run system("notepad .exe");?

            Comment

            • Ganon11
              Recognized Expert Specialist
              • Oct 2006
              • 3651

              #7
              The system() function is included in either the iostream header file or the std namespace (I suspect the namespace). You pass the function a CString, and the function does the work to execute the command prompt equivalent of your string.

              So basically, if I wanted to run MyProg.exe in the same folder as my C++/C program, I could use the statement:

              Code:
              system("MyProg.exe");
              This would be the equivalent of entering "MyProg.exe " into a DOS Command Prompt window.

              Comment

              • jj555s
                New Member
                • Mar 2007
                • 36

                #8
                How do you get rid of the command prompt screen?
                In addition I want to load a certain file with notepad, I'm not sure if I can add extensions when I code the line.

                Comment

                • Banfa
                  Recognized Expert Expert
                  • Feb 2006
                  • 9067

                  #9
                  In that case try using CreateProcess.

                  Comment

                  • sicarie
                    Recognized Expert Specialist
                    • Nov 2006
                    • 4677

                    #10
                    jj555 - You started a new thread with the same question - please do not thread hijack/double-post. I have split the threads, and merged your two.

                    Comment

                    Working...