用html help做的帮助,生成后缀为chm的文件,请问用什么函数调用。

解决方案 »

  1.   

    // ´ò¿ªÒ»¸öĿ¼ »òÕß ÍøÕ¾
    ShellExecute(NULL, _T("open"), _T("e:\\¼¼ÊõÎÄÕÂ\\VC++"), NULL,NULL, SW_SHOW);
    ShellExecute(NULL, _T("open"), _T("www.china.com"), NULL,NULL, SW_SHOW);
    ShellExecute(NULL,"open","iloveu.bmp",NULL,NULL,SW_SHOWNORMAL);
    ShellExecute(NULL,"open","mailto:[email protected]",NULL,NULL,SW_SHOWNORMAL);
    ShellExecute(NULL,"print","e:\\1.txt",NULL,NULL,SW_HIDE );
    ShellExecute(NULL,"print","e:\\1.bmp",NULL,NULL,SW_SHOW );
    // Äã¿ÉÒÔ¸øËüÈκÎÎļþµÄÃû×Ö£¬Ëü¶¼ÄÜʶ±ð³öÀ´²¢´ò¿ªËü¡£ÉõÖÁÊÇ×ÀÃæºÍURL¿ì½Ý·½Ê½(.ink»ò .url)¡£»¹ÄÜ´ò¿ªInternetµÄÕ¾µãµØÖ·¡£ShellExecute»¹ÄÜʶ±ðÆäËüЭÒ飬ÏóFTP¡¢GOPHER¡£
    // Èç¹û½«µÚ¶þ¸ö²ÎÊý¡°OPEN¡±¸ÄΪ¡°PRINT¡±»òÕß¡°EXPLORE¡±£¬ShellExecute½«ÄÜ´òÓ¡ÎļþºÍ´ò¿ªÎļþ¼Ð¡£ShellExecute»¹ÓÐÒ»¸öÀ©Õ¹º¯ÊýShellExecuteEx£¬Ëù´ø²ÎÊýÖÐÓÐÒ»¸öÌØÊâµÄ½á¹¹£¬¹¦ÄܸüÇ¿£¬ËüµÄÓ÷¨²Î¼ûÓйØÎĵµ¡£
    // ShellExecute ·µ»Ø´ò¿ªÎļþµÄÓ¦ÓõÄʵÀý¾ä±ú¡£
    SHELLEXECUTEINFO
    ShExecInfo.cbSize = sizeof(SHELLEXECUTEINFO);
    ShExecInfo.fMask = SEE_MASK_NOCLOSEPROCESS;
    ShExecInfo.hwnd = NULL;
    ShExecInfo.lpVerb = NULL;
    ShExecInfo.lpFile = "c:\\MyProgram.exe";
    ShExecInfo.lpParameters = "";
    ShExecInfo.lpDirectory = NULL;
    ShExecInfo.nShow = SW_SHOW;
    ShExecInfo.hInstApp = NULL;
    ShellExecuteEx(&ShExecInfo);
    WaitForSingleObject(ShExecInfo.hProcess,INFINITE);
      

  2.   

    ShellExecute(NULL, _T("open"), _T("xxx.chm"), NULL,NULL, SW_SHOW);
      

  3.   

    ShellExecute(NULL, _T("open"), _T("xxx.chm"), NULL,NULL, SW_SHOW);
    绝对没有问题。注意exe和chm放在同一目录下。否则,您需要在_T("xxx.chm")添加上目录。csdn慢死了,有问题,给我发信:[email protected]