Announcement

Collapse
No announcement yet.

ShellExecute + IrfanView's command line

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    ShellExecute + IrfanView's command line

    Hello!

    I need to open jpg image with IrfanView using ShellExecute (Iam writing presentation in C++).

    Usually to open file with editor i do so-
    ShellExecute(m_hWnd,0,pathToEditor,pathToFile,0,SW _SHOWMAXIMIZED);

    for example
    pathToEditor is "D:\\IrfanView\\IrfanView.exe"
    pathToFile is "C:\\1.jpg"

    With other applications it works, with Irfan it doesnt work.
    What should i try?
    Is there command line option to open file?

    #2
    Use the "open" verb as second parameter and check the result code.

    Comment


      #3
      Result is the same - IrfanView opens, but without the jpg file.

      Comment


        #4
        Try "\"C:\\1.jpg\"" and maybe SW_SHOWNORMAL.

        Comment


          #5
          tried what you say, it doesnt help.

          Comment


            #6
            This should work. What happens if you just drag this file to the irfanview icon?

            Comment


              #7
              Thank you, i found what was the problem - i have IrfanViewPortable and i was trying to run IrfanViewPortable.exe
              Than i tried i_view32.exe that is in App\IrfanView\ directory and it works.

              Comment

              Working...
              X