如何調用HTML格式的協助檔案

來源:互聯網
上載者:User

問:我做了一個HTML格式的協助檔案,在PowerBuilder中該如何調用它呢?

答:用RUN()函數或用Windows中的API函數HtmlHelp(),這個函數駐留在HtmlHelp ActiveX控制項Hhctrl.ocx中。

①定義API:
    Function Long HtmlHelpA (long hwnd ,string lpHelpFile , long wCommand, string dwData) Library "hhctrl.ocx" 

②菜單協助選項指令碼:
    Parentwindow.triggerevent("ue_help")

③MDI表單中自訂事件("ue_help")指令碼:
    HtmlHelpA(handle(this),"chm_name>chm_win_name",0,"htm_name")

    例如:chm協助檔案的名字是help.chm,help.chm的主視窗名是main,要調出的相關頁面是my.htm,相應的指令碼是:
         HtmlHelpA(handle(this), "help.chm>main",0, "my.htm")
         或:HtmlHelpA(handle(this),"help.chm",0,0)  //省事

如果你的電腦安裝了HtmlHelp閱讀器Hh.exe,就可以直接運行HtmlHelp協助檔案。
   
run("hh help.chm")

[注]HtmlHelp()函數

說明: 調用HTML格式的協助檔案。
參數 類型及說明
hwnd 視窗的控制代碼,可用handle()函數取得。
lpHelpFile HTML協助檔案的路徑和名稱。
wCommand 執行的操作。
dwData wCommand參數所需要的值。

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.