0

I have an MFC app (10 year old app), which has context sensitive help for each dialog. I want to add help on a specific combobox, as well as a little question mark button next to this control. Users can either select the combobox and hit F1, or they can click on the button next to the combobox, and it will jump to a help page that is specifically about this combobox, rather than general help for the whole dialog.

  • In the dialog resource properties, I have set "Context Help" to True.
  • In the combobox properties, I've set "Help ID" to True.
  • In myapp.hpp, I have added "HIDC_MYCOMBOBOX = mycombobox_help.htm" to the [ALIAS] section, and included the resource.hm file in the [MAP] section.
  • Again in app.hpp file, the dialog uses "HIDD_MYDIALOG = mydialog_help.htm"

Yet selecting the combobox and pressing F1 still brings up mydialog_help.htm, instead of mycombobox.htm.

  1. What am I missing to use a separate help page for the control?
  2. Is it possible to redirect the control to an anchor in the main page? Something, along the lines of... HIDC_MYCOMBOBOX = mydialog_help.htm#mycombobox
  3. I have added a "?" button to run the following code, but this also doesn't give the context for the control, and just opens the mydialog_help.htm.

    HELPINFO    lhelpinfo;
    
    lhelpinfo.cbSize = sizeof(lhelpinfo);
    lhelpinfo.iContextType = HELPINFO_WINDOW;
    lhelpinfo.iCtrlId = IDC_BALANCING_METHOD;
    lhelpinfo.hItemHandle = GetDlgItem(IDC_BALANCING_METHOD)->m_hWnd;
    lhelpinfo.dwContextId = HIDC_BALANCING_METHOD;
    lhelpinfo.MousePos = POINT();
    
    CDialog::OnHelpInfo(&lhelpinfo);
    
rrirower
  • 4,338
  • 4
  • 27
  • 45
user1961169
  • 783
  • 6
  • 17
  • Providing context help for a specific control is not typical behavior. Would reformatting the existing context help to better explain each control resolve your issue? – rrirower Oct 29 '14 at 12:54
  • I guess the most important part from the user point of view is the "?" button next to the combobox, to let the user know that there is help information specifically for this combobox. I have implemented this button to call HtmlHelp() directly. It would be good if there was some way to jump to an anchor on the mydialog_help.htm page, rather than having to write a separate help page to describe the combobox options. – user1961169 Oct 29 '14 at 22:47
  • Rather than using a "?" button, you should consider changing the mouse cursor to indicate that help is available when the user mouses over the control. – rrirower Oct 29 '14 at 23:53
  • @rrirower - Changing the cursor is totally non-standard UI behaviour, and will just confuse users. It also doesn't tell them how to get help. Even if they do know about F1 (I'm sure many of my users don't), my original question still hasn't been answered, so I can't do anything specific for that control, so the changing cursor means nothing! At least a button is a standard UI element, and any users will know to click on it for help. Now if only the button could jump to an anchor instead of a whole new page... So, we come back to all my original questions... – user1961169 Oct 30 '14 at 03:46

0 Answers0