Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. opening notepad

opening notepad

Scheduled Pinned Locked Moved C / C++ / MFC
help
7 Posts 5 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    rajeev82
    wrote on last edited by
    #1

    Hi everybody, In my dialog based application ,i should open up an "Notepad" when the user clicks an button in the dialog.I'm using flushall(); system("notepad"); functions to open the notepad.Theproblem is when i open the notepad it opens up with the command prompt window and when i want to close the notepad the dialog doesnt gets repainted properly and it looks disfigured.It'll be really great if anyone can help me out in this. Thanks and regards, Rajeev

    N A H R 4 Replies Last reply
    0
    • R rajeev82

      Hi everybody, In my dialog based application ,i should open up an "Notepad" when the user clicks an button in the dialog.I'm using flushall(); system("notepad"); functions to open the notepad.Theproblem is when i open the notepad it opens up with the command prompt window and when i want to close the notepad the dialog doesnt gets repainted properly and it looks disfigured.It'll be really great if anyone can help me out in this. Thanks and regards, Rajeev

      N Offline
      N Offline
      Nibu babu thomas
      wrote on last edited by
      #2

      Use ShellExecute or CreateProcess. A demo[^]


      Nibu thomas Software Developer

      1 Reply Last reply
      0
      • R rajeev82

        Hi everybody, In my dialog based application ,i should open up an "Notepad" when the user clicks an button in the dialog.I'm using flushall(); system("notepad"); functions to open the notepad.Theproblem is when i open the notepad it opens up with the command prompt window and when i want to close the notepad the dialog doesnt gets repainted properly and it looks disfigured.It'll be really great if anyone can help me out in this. Thanks and regards, Rajeev

        A Offline
        A Offline
        Aqueel
        wrote on last edited by
        #3

        try to use ShellExecute(...) to open notepade. We Believe in Excellence www.aqueelmirza.cjb.net

        R 1 Reply Last reply
        0
        • R rajeev82

          Hi everybody, In my dialog based application ,i should open up an "Notepad" when the user clicks an button in the dialog.I'm using flushall(); system("notepad"); functions to open the notepad.Theproblem is when i open the notepad it opens up with the command prompt window and when i want to close the notepad the dialog doesnt gets repainted properly and it looks disfigured.It'll be really great if anyone can help me out in this. Thanks and regards, Rajeev

          H Offline
          H Offline
          Hamid Taebi
          wrote on last edited by
          #4

          SHELLEXECUTEINFO shell; memset(&shell, 0, sizeof(SHELLEXECUTEINFO)); shell.cbSize=sizeof(SHELLEXECUTEINFO); shell.lpVerb=_T("open"); shell.hwnd=m_hWnd; shell.nShow=1; shell.lpFile=_T("Notepad.exe"); ShellExecuteEx(&shell);

          1 Reply Last reply
          0
          • A Aqueel

            try to use ShellExecute(...) to open notepade. We Believe in Excellence www.aqueelmirza.cjb.net

            R Offline
            R Offline
            rajeev82
            wrote on last edited by
            #5

            ShellCreate(..),system(...) and CreateProcess are all opening the notepad ,but my actual problem is refreshing the screen(painiting it again) after the notepad is opened.How do i solve that

            H 1 Reply Last reply
            0
            • R rajeev82

              ShellCreate(..),system(...) and CreateProcess are all opening the notepad ,but my actual problem is refreshing the screen(painiting it again) after the notepad is opened.How do i solve that

              H Offline
              H Offline
              Hamid Taebi
              wrote on last edited by
              #6

              What You need to refresh screen?

              1 Reply Last reply
              0
              • R rajeev82

                Hi everybody, In my dialog based application ,i should open up an "Notepad" when the user clicks an button in the dialog.I'm using flushall(); system("notepad"); functions to open the notepad.Theproblem is when i open the notepad it opens up with the command prompt window and when i want to close the notepad the dialog doesnt gets repainted properly and it looks disfigured.It'll be really great if anyone can help me out in this. Thanks and regards, Rajeev

                R Offline
                R Offline
                Rudolf Jan
                wrote on last edited by
                #7

                Normally this should not be a problem. To me it seems that you block your application somehow to proceed. I think system() is a call that blocks progress of the program invoking it. So while Notepad is active repainting will be prevented. Maybe using ShellExecute() in stead of system() will solve your problem. Regards, Rudolf Heijink

                1 Reply Last reply
                0
                Reply
                • Reply as topic
                Log in to reply
                • Oldest to Newest
                • Newest to Oldest
                • Most Votes


                • Login

                • Don't have an account? Register

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • World
                • Users
                • Groups