BBC BASIC for Windows
« Help files »

Welcome Guest. Please Login or Register.
Apr 5th, 2018, 10:49pm



ATTENTION MEMBERS: Conforums will be closing it doors and discontinuing its service on April 15, 2018.
Ad-Free has been deactivated. Outstanding Ad-Free credits will be reimbursed to respective payment methods.

If you require a dump of the post on your message board, please come to the support board and request it.


Thank you Conforums members.

BBC BASIC for Windows Resources
Online BBC BASIC for Windows documentation
BBC BASIC for Windows Beginners' Tutorial
BBC BASIC Home Page
BBC BASIC on Rosetta Code
BBC BASIC discussion group
BBC BASIC for Windows Programmers' Reference

« Previous Topic | Next Topic »
Pages: 1  Notify Send Topic Print
 thread  Author  Topic: Help files  (Read 499 times)
Ken Down
Guest
xx Help files
« Thread started on: Mar 29th, 2010, 12:30pm »

I don't know if anyone can help me, please.

I have downloaded something called "HTML Help" from Microsoft and used it to create a help file ("Help.chm"). So far so good. Now how do I add that file to my program's menu so that when people click "Help" or press F1 they get the help file displayed?

When replying, assume that I am a total dummy, please. It saves time in the end!
User IP Logged

admin
Administrator
ImageImageImageImageImage


member is offline

Avatar




PM


Posts: 1145
xx Re: Help files
« Reply #1 on: Mar 29th, 2010, 5:41pm »

on Mar 29th, 2010, 12:30pm, Guest-Ken Down wrote:
how do I add that file to my program's menu so that when people click "Help" or press F1 they get the help file displayed?

In your initialisation put this code:

Code:
      SYS "LoadLibrary", "HHCTRL.OCX" TO hhctrl%
      SYS "GetProcAddress", hhctrl%, "HtmlHelpA" TO `HtmlHelp` 

In response to the menu selection, or F1 being pressed, execute this code:

Code:
        SYS `HtmlHelp`, 0, @dir$+"Help.chm", 0, 0 

Quote:
When replying, assume that I am a total dummy, please. It saves time in the end!

It may save time, but I'm not a fan of 'spo on feeding' because it doesn't encourage understanding. So often, I've provided a fully-complete ready-to-run solution to a question, only for the recipient to attempt to adapt it slightly and make a complete hash of it because of not properly understanding the code.

I always prefer to provide 'hints' that will allow the OP to find the answer to his question, but only after some research and a degree of understanding of why and how it works. That way he is far better placed to adapt it, and will hopefully acquire the skills to find the answers to problems without help.

Richard.
User IP Logged

Ken Down
Guest
xx Re: Help files
« Reply #2 on: Apr 5th, 2010, 9:37pm »

Many thanks for that. It works beautifully (and would make an excellent addition to the Wiki or even the help files that come with BB4W).

When asking to be treated as a total idiot, I did not by any means want to have you do all the work. I merely indicated that step-by-step instructions and explanations would be in order. As it turns out, the procedure is simpler than I expected and there is little to explain!

Thanks again.
User IP Logged

Pages: 1  Notify Send Topic Print
« Previous Topic | Next Topic »

| |

This forum powered for FREE by Conforums ©
Terms of Service | Privacy Policy | Conforums Support | Parental Controls