Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Context sensitive help in CFormView

Posted on 1997-09-04
2
Medium Priority
?
376 Views
Last Modified: 2013-11-20
I want to have context sensitive help in a CFormView derived class. I have added the WS_EX_CONTEXTHELP style to the dialog template, and a ID_CONTEXT_HELP button in my toolbar. When I click on it the cursor changes to a question mark, as it should.
But when I click on a control in the formview, I only get a message that the help topic does not exist.
I have a WM_HELPINFO handler in the formview where I start WinHelp with the appropriate array with controls ids and help topics, but it never gets called.
Shold the handler be somewhere else, or am I doing something else wrong? Some pointers would be greatly appreciated.
0
Comment
Question by:rj2
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 1

Accepted Solution

by:
cnasarre earned 200 total points
ID: 1305731
I have added a context help in a CFormView with a message handler for WM_HELPHITTEST


BEGIN_MESSAGE_MAP(CHelpView, CFormView)
   ON_MESSAGE(WM_HELPHITTEST, OnHelpHitTest)
END_MESSAGE_MAP()


LRESULT CHelpView::OnHelpHitTest(WPARAM wParam, LPARAM lParam)
{
   TRACE("CHelpView::OnHelpHitTest(%u, %u)\n", wParam, lParam);

// return the index of the help topic to display
// --> here it is HIDD_ABOUTBOX from the HLP\xxx.hm file
   return(0x20064);
}

0
 
LVL 10

Author Comment

by:rj2
ID: 1305732
It worked. Thanks.
The help comes in a normal help window, but I want a popup window instead. I was able to do that by overriding CWinApp::WinHelp, but I guess it would be cleaner to implement it in the particular frame instead. Is there a clean way to do that?
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction: Dynamic window placements and drawing on a form, simple usage of windows registry as a storage place for information. Continuing from the first article about sudoku.  There we have designed the application and put a lot of user int…
Introduction: Finishing the grid – keyboard support for arrow keys to manoeuvre, entering the numbers.  The PreTranslateMessage function is to be used to intercept and respond to keyboard events. Continuing from the fourth article about sudoku. …
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
Suggested Courses

610 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question