如何实现按下一个按钮时打开帮助文件(.chm)?

解决方案 »

  1.   

    ShellExecute(m_hWnd, "open", "xxx.chm", NULL, NULL, SW_SHOWNORMAL);
      

  2.   

    HFILE OpenFile(
      LPCSTR lpFileName,        // pointer to the filename
      LPOFSTRUCT lpReOpenBuff,  // pointer to the file information struct
      UINT uStyle               // specifies the action and attributes
    );
      

  3.   

    1. 现在你的project->setting->link->library modules中加入 htmlhelp.lib
    2.在你的cpp文件前加上  #include <htmlhelp.h>
    3.在你的按钮事件中加上
    ::HtmlHelp(NULL, ".\\***.chm", HH_DISPLAY_TOPIC, 0);