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. Urgent help needed!! - WinExec

Urgent help needed!! - WinExec

Scheduled Pinned Locked Moved C / C++ / MFC
help
4 Posts 2 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.
  • L Offline
    L Offline
    Lucky the code machine
    wrote on last edited by
    #1

    hi, I use the WinExec command to run files fine but a cant get the following to work & I have no ideas why. Please help me with my final year BSc own Project. WinExec("copy "+m_Logo+" logo.*", SW_HIDE); note: m_Logo is a CString that contains: c:\test\test.jpg or such thanks again An Expert is somone who has previously made ALL the Mistakes, I dream of this day. - Lucky

    L 1 Reply Last reply
    0
    • L Lucky the code machine

      hi, I use the WinExec command to run files fine but a cant get the following to work & I have no ideas why. Please help me with my final year BSc own Project. WinExec("copy "+m_Logo+" logo.*", SW_HIDE); note: m_Logo is a CString that contains: c:\test\test.jpg or such thanks again An Expert is somone who has previously made ALL the Mistakes, I dream of this day. - Lucky

      L Offline
      L Offline
      Lucky the code machine
      wrote on last edited by
      #2

      ;P I will answer myself as knowone else has!! ;P WinExec unlike system only executes files (*.bat, *.exe, etc). copy is not a file it is part of the command.com file (win32) or cmd.exe file (winNT). The command i needed was: command.com /c eg: WinExec("command.com /c copy "+m_Logo+" logo.*", SW_HIDE); note: m_Logo is a CString that contains: c:\test\test.jpg or such Im gettin there!! :) An Expert is somone who has previously made ALL the Mistakes, I dream of this day. - Lucky

      N 1 Reply Last reply
      0
      • L Lucky the code machine

        ;P I will answer myself as knowone else has!! ;P WinExec unlike system only executes files (*.bat, *.exe, etc). copy is not a file it is part of the command.com file (win32) or cmd.exe file (winNT). The command i needed was: command.com /c eg: WinExec("command.com /c copy "+m_Logo+" logo.*", SW_HIDE); note: m_Logo is a CString that contains: c:\test\test.jpg or such Im gettin there!! :) An Expert is somone who has previously made ALL the Mistakes, I dream of this day. - Lucky

        N Offline
        N Offline
        Nish Nishant
        wrote on last edited by
        #3

        Er. Pardon me for asking. But what's wrong with using CopyFile? Nish


        The rumours that I am an AI bot are absolutely false. These rumours have been propogated by *them* to focus all the attention on to me, while *their* bots take over the planet. Thank y%%%% Divide by zero. Cannot proceed. Abort(y/y)?

        L 1 Reply Last reply
        0
        • N Nish Nishant

          Er. Pardon me for asking. But what's wrong with using CopyFile? Nish


          The rumours that I am an AI bot are absolutely false. These rumours have been propogated by *them* to focus all the attention on to me, while *their* bots take over the planet. Thank y%%%% Divide by zero. Cannot proceed. Abort(y/y)?

          L Offline
          L Offline
          Lucky the code machine
          wrote on last edited by
          #4

          Thanx, i will try that. that would be a lot more tidy. Do you know how to preview a jpg or gif in open dialog? I use GetOpenFileNamePreview for showing avi files but havent found a way for images. is there a way or do i need to create some kinda shell around the standard box? - im askin you cos u seem to always have correct & clear answers!! Thanx again An Expert is somone who has previously made ALL the Mistakes, I dream of this day. - Lucky

          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