想程序能接受文件名作为参数,实现双击文件图标打开文件。怎样做?

解决方案 »

  1.   

    想做到这种效果,你就要学学com编程了!
      

  2.   

    HINSTANCE ShellExecute(    HWND hwnd, // handle to parent window
        LPCTSTR lpOperation, // pointer to string that specifies operation to perform
        LPCTSTR lpFile, // pointer to filename or folder name string
        LPCTSTR lpParameters, // pointer to string that specifies executable-file parameters 
        LPCTSTR lpDirectory, // pointer to string that specifies default directory
        INT nShowCmd  // whether file is shown when opened
       );