获取ocx运行路径的另一种方法

时间:2023-03-09 20:16:59
获取ocx运行路径的另一种方法

在InitInstance里边可以获取

1
2
3
4
5
6
7
8
9
10
11
12
    if (bInit)
    {
        // TODO: 在此添加您自己的模块初始化代码。
        g_szOcxPath = this->m_pszHelpFilePath;
        g_szOcxName = this->m_pszExeName;
        g_szOcxName += ".HLP";
        int nTmp = g_szOcxName.GetLength();
        nTmp = g_szOcxPath.GetLength() - nTmp;
        g_szOcxPath = g_szOcxPath.Left(nTmp);
    }