WinHelp Contents File (.CNT) Question - Programmer

This is a discussion on WinHelp Contents File (.CNT) Question - Programmer ; Hello Everyone, Just wondered if it possible to make a contents category auto-open when you display the help file ie. show all of it's topics automatically (as opposed to being closed automatically - the default). I have a .CNT file ...

+ Reply to Thread
Results 1 to 4 of 4

Thread: WinHelp Contents File (.CNT) Question

  1. WinHelp Contents File (.CNT) Question

    Hello Everyone,

    Just wondered if it possible to make a contents category auto-open when you
    display the help file ie. show all of it's topics automatically (as opposed
    to being closed automatically - the default).

    I have a .CNT file like the following:

    :Base MyApp.hlp
    1 Menus
    2 File menu=menu_file
    2 View menu=menu_view
    2 Search menu=menu_search
    2 Setup menu=menu_setup
    2 Window menu=menu_window
    2 Help menu=menu_help
    1 Topics
    2 MyApp Setup Guide=setup_guide
    2 MyApp Usage Guide=usage_guide

    Any help would be much appreciated.

    Regards,
    Clive.




  2. Re: WinHelp Contents File (.CNT) Question

    On Thu, 23 Oct 2003 14:23:19 +0100, "Clive Minnican"
    wrote:

    >Hello Everyone,
    >
    >Just wondered if it possible to make a contents category auto-open when you
    >display the help file ie. show all of it's topics automatically (as opposed
    >to being closed automatically - the default).
    >
    >I have a .CNT file like the following:
    >
    >:Base MyApp.hlp
    >1 Menus
    >2 File menu=menu_file
    >2 View menu=menu_view
    >2 Search menu=menu_search
    >2 Setup menu=menu_setup
    >2 Window menu=menu_window
    >2 Help menu=menu_help
    >1 Topics
    >2 MyApp Setup Guide=setup_guide
    >2 MyApp Usage Guide=usage_guide
    >
    >Any help would be much appreciated.
    >
    >Regards,
    >Clive.
    >


    My approach to this was to simply put an "Expanded Contents"
    as the first topic in the .HLP file. It is a normal topic with
    all the same links and headers, indented the way an opened
    Contents would appear. In fact, I maintain this
    manually, then when I want to create the .CNT file I copy
    it to a text file and convert it with a little ad-hoc utility
    to strip out the leading spaces and convert them to the
    Contents level numbers. Crude but effective!



    Bob Masta
    dqatechATdaqartaDOTcom

    D A Q A R T A
    Data AcQuisition And Real-Time Analysis
    www.daqarta.com

  3. Re: WinHelp Contents File (.CNT) Question

    Hi Bob,

    Thanks for the advice. Please explain this with a real example (ie. an
    example .CNT file). Help files are a new subject for me and I only know the
    basics.

    Many thanks,
    Clive.

    "Bob Masta" wrote in message
    news:3f991c21.2029640@news.itd.umich.edu...
    > On Thu, 23 Oct 2003 14:23:19 +0100, "Clive Minnican"
    > wrote:
    >
    > >Hello Everyone,
    > >
    > >Just wondered if it possible to make a contents category auto-open when

    you
    > >display the help file ie. show all of it's topics automatically (as

    opposed
    > >to being closed automatically - the default).
    > >
    > >I have a .CNT file like the following:
    > >
    > >:Base MyApp.hlp
    > >1 Menus
    > >2 File menu=menu_file
    > >2 View menu=menu_view
    > >2 Search menu=menu_search
    > >2 Setup menu=menu_setup
    > >2 Window menu=menu_window
    > >2 Help menu=menu_help
    > >1 Topics
    > >2 MyApp Setup Guide=setup_guide
    > >2 MyApp Usage Guide=usage_guide
    > >
    > >Any help would be much appreciated.
    > >
    > >Regards,
    > >Clive.
    > >

    >
    > My approach to this was to simply put an "Expanded Contents"
    > as the first topic in the .HLP file. It is a normal topic with
    > all the same links and headers, indented the way an opened
    > Contents would appear. In fact, I maintain this
    > manually, then when I want to create the .CNT file I copy
    > it to a text file and convert it with a little ad-hoc utility
    > to strip out the leading spaces and convert them to the
    > Contents level numbers. Crude but effective!
    >
    >
    >
    > Bob Masta
    > dqatechATdaqartaDOTcom
    >
    > D A Q A R T A
    > Data AcQuisition And Real-Time Analysis
    > www.daqarta.com





  4. Re: WinHelp Contents File (.CNT) Question

    On Sat, 25 Oct 2003 11:22:19 +0100, "Clive Minnican"
    wrote:

    >Hi Bob,
    >
    >Thanks for the advice. Please explain this with a real example (ie. an
    >example .CNT file). Help files are a new subject for me and I only know the
    >basics.


    Using your file as an example:

    >> >:Base MyApp.hlp
    >> >1 Menus
    >> >2 File menu=menu_file
    >> >2 View menu=menu_view
    >> >2 Search menu=menu_search
    >> >2 Setup menu=menu_setup
    >> >2 Window menu=menu_window
    >> >2 Help menu=menu_help
    >> >1 Topics
    >> >2 MyApp Setup Guide=setup_guide
    >> >2 MyApp Usage Guide=usage_guide
    >> >


    :Base MyApp.hlp
    Menus
    File menu
    View menu
    Search menu
    Setup menu
    Window menu
    Help menu
    Topics
    MyApp Setup Guide
    MyApp Usage Guide

    The above would be the way the expanded contents
    looks to the user. You just create that like you would
    create any other Help topic, and you put in links for
    each of the entries. This will be the first topic of your
    Help system. The trick is to convert this to a .CNT
    file. But this topic contains all the information needed
    to do that, if you use a standard naming convention for
    the link IDs and the .CNT IDs. The utility reads the
    number of leading spaces and converts to the initial
    1, 2, 3 etc content level, and it reads the link ID and converts
    to the .CNT ID and pastes it in there.

    I would supply my utility, but it might be more trouble
    for you than it's worth. That's because I use my own
    simple text file format to write the entire Help system
    (derived from what I've used for my old DOS-based
    Help system), and then convert to .RTF with simple
    text-processing utilities before sending it to HCW.

    But I assume the same concept would work here,
    even if you are working with something that creates
    the RTFs directly. Try creating the expanded contents
    as above, then look at it with a text editor. I think you
    will see what you need to do. If you are creating it
    with Word and converting to RTF, you will see there
    is a _ton_ of pure crap injected into everything, as
    Word always does. That's why I avoid Word for this.
    (RTF has enough bloat as it is!) But you can probably
    figure out a way to grab the ID info and strip out
    everything else to build the CNT. file.

    Hope this helps!


    Bob Masta
    dqatechATdaqartaDOTcom

    D A Q A R T A
    Data AcQuisition And Real-Time Analysis
    www.daqarta.com

+ Reply to Thread