Solved

Context sensitive help in CFormView

Posted on 1997-09-04
2
363 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 100 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

Independent Software Vendors: 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: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
In this post we will learn different types of Android Layout and some basics of an Android App.
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.
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…

728 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