zoukankan      html  css  js  c++  java
  • 【旧文章搬运】VC插件中如何获取当前工程的工作目录

    原文发表于百度空间,2014-09-24
    ==========================================================================

    好难找的资料,记录下。。。。

    // Get active project
    CComPtr<IDispatch> pDisp;
    
    CComQIPtr<IGenericProject, &IID_IGenericProject> pPrj;
    m_pApplication->get_ActiveProject(&pDisp); // m_pApplication是IApplication接口
    if(pDisp == NULL)
    {
    MessageBox(NULL, "Please open project at first!", "Along Addin", MB_OK);
    return S_FALSE;
    }
    pPrj = pDisp;
    pPrj->QueryInterface(IID_IGenericProject, (void**) &m_pProject);
    
    // Get project path
        CComBSTR bstrPrjPath;
        CString strPrjPath;
        m_pProject->get_FullName(&bstrPrjPath);
  • 相关阅读:
    Swift
    Swift
    Swift
    Swift
    Swift
    Swift
    Swift
    将Ojective-C代码移植转换为Swift代码
    Swift
    房费制——报表(1)
  • 原文地址:https://www.cnblogs.com/achillis/p/10183766.html
Copyright © 2011-2022 走看看