FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Context sensitive help
Posts: 3031
Joined: Fri Oct 07, 2005 01:45 PM

Context sensitive help

Posted: Tue Jul 28, 2026 06:50 PM

I am using FiveWin for Harbour with a Help & Manual 9-generated CHM file.

At startup I use SetHelpFile() to identify the CHM file, and each window is assigned a context topic using:

oWnd:nHelpID := nTopicID

The correct topic opens when F1 is pressed, so the context mapping is working. However, it opens in a small popup in the upper-right corner and only part of the topic is visible.

I tried changing the Main Help Window size and position in Help & Manual 9 and rebuilt the CHM, but those settings do not affect this popup.

Is there an undocumented FiveWin setting or alternate function that makes F1 open the context topic in the normal full CHM viewer instead of the small popup?

Ideally, I would like the help topic to open in a normal resizable window at a larger default size. I have used this for years, and it seems only in more recent times did it regress to the smaller popup.

Your input would be appreciated. I did check the new documentation, but it isn't included.

Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
Posts: 44508
Joined: Thu Oct 06, 2005 05:47 PM

Re: Context sensitive help

Posted: Wed Jul 29, 2026 03:39 AM

Dear Tim,

Thanks for the clear report. We investigated how F1 + CHM context help works in FWH.

What was going on

There is no separate “open full CHM window” switch. F1 behaviour depends on where the help id is set and its type:

F1 / CHM behaviour in FWH

SituationWhat FWH does
Control with numeric nHelpIdHelpPopup() → small popup (not H&M main window size)
Control with character topic nameHelpTopic() → full CHM viewer
Window/dialog nHelpId, or control with empty id (after fix)HelpTopic() on parent → full CHM viewer
Explicit HelpTopic( nId ) / HelpTopic( "topic" )Always full CHM viewer

So Help & Manual “Main Help Window” size does not affect the F1 popup path — that is by design of HelpPopup() / HH_DISPLAY_TEXT_POPUP.

Also: HelpSetPos() only applies to classic .hlp (WinHelp), not CHM.

What we fixed in FWH

  1. TControl:__HelpTopic() (source/classes/control.prg)
    When the focused control had an empty nHelpId, F1 did nothing (the comment said help would go to the parent, but it was never forwarded).
    Now it calls ::oWnd:HelpTopic() so oWnd:nHelpId / oDlg:nHelpId is used and the full CHM opens.

  2. Sample samples/test/testchmhlp.prg (+ popups.txt) to compare:
    • numeric control id → popup (needs SetHelpPopup("popups.txt") for text popups)
    • character topic → full CHM
    • empty control id → bubbles to dialog → full CHM

What you should do in your app

To get the full resizable CHM viewer on F1 (recommended for your case):

// Prefer explicit full help:
HelpTopic( nTopicID )

// Or assign a topic name (must match a real .htm inside the CHM):
oGet:nHelpId := "MyTopic" // not only a numeric map id on the control

// Window-level is fine for full help:
oWnd:nHelpId := nTopicID // or "MyTopic"
// and leave control nHelpId empty so it uses the window (with the new FWH build)

If you keep numeric ids on controls, F1 will stay on the popup path unless you change that. For popups you also need:

SetHelpPopup( "popups.txt" ) // or your popup source

otherwise you get “No Help popup file available”.

CHM topic names must match real HTML files inside the CHM (e.g. Orders.htm / "Orders"). A wrong name opens the CHM shell with an IE “page not found” style error.

What you need from us / to verify

  1. Rebuild/relink against a FWH build that includes the control.prg empty-nHelpId bubble fix.
  2. Prefer HelpTopic( id ) or string nHelpId for full viewer.
  3. Confirm your H&M map ids / topic filenames.
  4. Optional: try samples\test\testchmhlp.exe pattern in your tree.

Please try with the new FWH build and let us know if full CHM on F1 matches what you need.

Best regards

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 3031
Joined: Fri Oct 07, 2005 01:45 PM

Re: Context sensitive help

Posted: Wed Jul 29, 2026 04:31 AM

I just downloaded the latest posted version. Has that been updated or is there a new set of .lib files available, or an updated control file that I can link in?

Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
Posts: 44508
Joined: Thu Oct 06, 2005 05:47 PM

Re: Context sensitive help

Posted: Wed Jul 29, 2026 09:55 AM

Dear Tim,

Email sent

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 3031
Joined: Fri Oct 07, 2005 01:45 PM

Re: Context sensitive help

Posted: Wed Jul 29, 2026 07:44 PM

Thank you for the information and the coding change.

It now works perfectly. I appreciate your work.

Tim

Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit

Continue the discussion