borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2011 Andrea Tincaniborder

AndreaVB | Forum | News | Downloads | Register | Help | Member List | Statistics | Search | PM | Profile

Print This Topic
Previous Topic (Error message about common dialog control)Next Topic (please solevd it) New Topic New Poll Post Reply
AndreaVB Forum : VB General : hcw and unlocking pedigree chrm, or is it chm!?
Poster Message
mercedes
Level: Protégé


Registered: 11-02-2006
Posts: 6

icon hcw and unlocking pedigree chrm, or is it chm!?

hope this may be of interest to anyone like myself who knows how valuable help documentation is if you want the end-user to use and reuse your application.
help documentation is hard graft compared against coding, this absorbs time

i have mainly developed window's hcw help files but ventured recently into using html help documentation - weighing up the odds and benefits compared to hcw.
for starters html help provides benefits for gif animation and easier made hyperlinks and includes all dhtml with scripting, cascading style sheets, etc;-

however on the down side of things this does not render a context map for topics or help pages.
this originally played foul with the api side of things until i took the bull by the horns, so to speak, and investigated the html files in raw text.
bingo, i overcome this problem with the following code:-
    'html's api
    Global Const HH_DISPLAY_TOPIC = &H0
    Global Const HH_SET_WIN_TYPE = &H4
    Global Const HH_GET_WIN_TYPE = &H5
    Global Const HH_GET_WIN_HANDLE = &H6
    Global Const HH_DISPLAY_TEXT_POPUP = &HE
    Global Const HH_HELP_CONTEXT = &HF
    Global Const HH_TP_HELP_CONTEXTMENU = &H10
    Global Const HH_TP_HELP_WM_HELP = &H11
    Global Const HH_CLOSE_ALL = &H12
    Public Declare Function HtmlHelp Lib "hhctrl.ocx" Alias "HtmlHelpA" (ByVal hwndCaller As Long, _
        ByVal pszFile As String, _
        ByVal uCommand As Long, _
        ByVal dwData As Any) As Long

Private Sub mnuHelpContents_Click()
   On Error GoTo localErr
    Dim ret&

    'stays on top:
    'ret& = HtmlHelp(hWnd, App.Path & "\cvbdev.chm", HH_DISPLAY_TOPIC, "topic1.html")
    'not on top:
    ret& = HtmlHelp(0, App.Path & "\cvbdev.chm", HH_DISPLAY_TOPIC, "topic1.html")
    Exit Sub

localErr:
    MsgBox Err.Description, vbCritical, Err.Number
End Sub

Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
    On Error GoTo localErr
    Call HtmlHelp(Me.hWnd, "", HH_CLOSE_ALL, "")
    End
    Exit Sub

localErr:
    MsgBox Err.Description, vbCritical, Err.Number
End Sub

interestingly in the aforementioned dwData variable above was declared Long and demaned a context number, in hex but isn't available in the compiled html help file

however now declaring dwDate to Any, opened up the pandora's box, so to speak with hey bingo and...

____________________________
I have nothing to declare but my genius.

15-02-2006 at 01:08 AM
View Profile Send Email to User Show All Posts Visit Homepage | Quote Reply
mercedes
Level: Protégé


Registered: 11-02-2006
Posts: 6
icon Re: hcw and unlocking pedigree chrm, or is it chm!?

..and presto----->


____________________________
I have nothing to declare but my genius.

15-02-2006 at 01:10 AM
View Profile Send Email to User Show All Posts Visit Homepage | Quote Reply
AndreaVB Forum : VB General : hcw and unlocking pedigree chrm, or is it chm!?
Previous Topic (Error message about common dialog control)Next Topic (please solevd it) New Topic New Poll Post Reply
Surf To:


Not Logged In? Username: Password: Lost your password?
Partners: Download Actual Software | Free Software Download
borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2011 Andrea Tincaniborder