Solved

Context sensitive help in CFormView

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
bobThere java chalenge 45 91
substring method in java 1 98
Hibernate methods 2 68
Thin secure Windows 10 5 76
Introduction: Displaying information on the statusbar.   Continuing from the third article about sudoku.   Open the project in visual studio. Status bar – let’s display the timestamp there.  We need to get the timestamp from the document s…
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
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.
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.

863 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now