Solved

Context sensitive help in CFormView

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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Adapt this command to show who installed 29 108
MaxSpan challenge 9 96
Dell Alienware Graphics Amplifier Driver for non-Alienware systems 18 251
JQuery serialize and unserialize 8 78
In this article, I'll describe -- and show pictures of -- some of the significant additions that have been made available to programmers in the MFC Feature Pack for Visual C++ 2008.  These same feature are in the MFC libraries that come with Visual …
Introduction: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
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.
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

776 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