小弟现在已完成在 window 里在某文件按右键会出现的快捷选单中加入自己的 APP 名,并在按下之后会执行此 APP
  想请问再执行此APP时,该如何可以获取选中文件的档名呢?  (小弟是用 mfc 实做的)
 
thanks!

解决方案 »

  1.   

    shell扩展 左键菜单http://www.vckbase.com/document/viewdoc/?id=827
      

  2.   

    在CWinApp中
    CCommandLineInfo cmdInfo;
    ParseCommandLine(cmdInfo);
    //cmdInfo.m_strFileName 就是选中的文件名
      

  3.   

    恩,问题比较简单,无须shell扩展
    楼主什么工程,文档类的不需要你操心获取文件名了对话框的,如SoLike 言: 
    CxxxApp::InitInstance()
    {
       CCommandLineInfo cmdInfo;
    ParseCommandLine(cmdInfo);
    AfxMessageBox(cmdInfo.m_strFileName);  //文件全路径................
    }
      

  4.   

    嗯!感謝 SoLike , seu07201213 ,問題已解決,放分了!