Click here to Skip to main content
15,911,327 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Capture screen, do u have another idea and make it faster? Pin
David Crow11-Aug-03 2:36
David Crow11-Aug-03 2:36 
GeneralRe: Capture screen, do u have another idea and make it faster? Pin
includeh1011-Aug-03 2:42
includeh1011-Aug-03 2:42 
AnswerRe: Capture screen, do u have another idea and make it faster? Pin
igor196011-Aug-03 19:03
igor196011-Aug-03 19:03 
GeneralChecked Menu Item Pin
Abhi@Work11-Aug-03 0:04
Abhi@Work11-Aug-03 0:04 
GeneralRe: Checked Menu Item Pin
Ravi Bhavnani11-Aug-03 3:55
professionalRavi Bhavnani11-Aug-03 3:55 
GeneralRe: Checked Menu Item Pin
Abhi@Work11-Aug-03 18:55
Abhi@Work11-Aug-03 18:55 
GeneralRe: Checked Menu Item Pin
Ravi Bhavnani12-Aug-03 2:36
professionalRavi Bhavnani12-Aug-03 2:36 
GeneralProblem on porting from VC 6 to VC 7 - context sensitive help [Shift F1 Help] - using Onhelphittest() Pin
pralhad10-Aug-03 23:48
pralhad10-Aug-03 23:48 
Mad | :mad: Problem on porting from VC 6 to VC 7 - context sensitive help [Shift F1 Help] - using Onhelphittest()

OnHelpHitTest() return dialog contol ID to MFC and MFC calls COurWinApp::HtmlHelp()
Which is processed. and appropriate help is displayed. In VC7 MFC isn't calling COurWinApp::HtmlHelp()
HtmlHelp() function is not called instead gives "Failed to launch help" message.


Code Snippet below
------------------------------

To implement Shift F1 help for COurDlgCtrl
#1. we added
LRESULT COurDlgCtrl::OnHelpHitTest(WPARAM wParam, LPARAM lParam)
{
return GetDlgCtrlID(); // Nonzero value
}

#2. Then we added this
void COurWinApp::HtmlHelp(DWORD dwData, UINT nCmd )
{
DWORD HelpID = -1;
WORD wCtrlId = LOWORD (dwData);
WORD DlgCtrlId = HIWORD (dwData);
HANDLE hHtmlHelp;
// Map the Dialog Control IDs to corresponding Help IDs

switch (nCmd)
{
case HELP_CONTEXT:
switch (wCtrlId)
{
case OurDlgCtrlID:
HelpID = IDH_TEMPDLG_DRAG;
break;
default:
HelpID = -1;
}
hHtmlHelp = ::HtmlHelp(NULL,
m_pszHelpFilePath,
HH_HELP_CONTEXT,
HelpID);
}

}

For VC 7 migration
#3. We added EnabeHtmlHelp() in constructor of COurWinApp.

This still doesn't seem to work.
HtmlHelp() function is not called instead get "Failed to launch help" message.

Thanks in advance
Pralhad

GeneralComputer Hangs as soon as any MFC file is executed... Pin
Deepak Samuel10-Aug-03 22:52
Deepak Samuel10-Aug-03 22:52 
GeneralRe: Computer Hangs as soon as any MFC file is executed... Pin
Nish Nishant10-Aug-03 23:19
sitebuilderNish Nishant10-Aug-03 23:19 
GeneralRe: Computer Hangs as soon as any MFC file is executed... Pin
David Crow11-Aug-03 2:40
David Crow11-Aug-03 2:40 
GeneralSharing rights Pin
Member 42425910-Aug-03 22:46
Member 42425910-Aug-03 22:46 
GeneralRe: Sharing rights Pin
David Crow11-Aug-03 2:43
David Crow11-Aug-03 2:43 
GeneralRe: Sharing rights Pin
Member 42425911-Aug-03 20:27
Member 42425911-Aug-03 20:27 
GeneralRe: Sharing rights Pin
David Crow12-Aug-03 2:33
David Crow12-Aug-03 2:33 
GeneralProject Templates - VC6 Pin
peterchen10-Aug-03 22:40
peterchen10-Aug-03 22:40 
GeneralRe: Project Templates - VC6 Pin
Andrew Walker10-Aug-03 23:39
Andrew Walker10-Aug-03 23:39 
GeneralTrouble in ATL Pin
novachen10-Aug-03 22:40
novachen10-Aug-03 22:40 
GeneralRe: Trouble in ATL Pin
Mike Dimmick11-Aug-03 2:53
Mike Dimmick11-Aug-03 2:53 
GeneralUrgent help needed! Pin
vcseeker10-Aug-03 22:32
vcseeker10-Aug-03 22:32 
GeneralRe: Urgent help needed! Pin
wb10-Aug-03 23:08
wb10-Aug-03 23:08 
GeneralRe: Urgent help needed! Pin
vcseeker11-Aug-03 2:27
vcseeker11-Aug-03 2:27 
QuestionFlowChart Ctrl ? Pin
ScorpioMidget10-Aug-03 22:17
ScorpioMidget10-Aug-03 22:17 
Questionread file wrong? Pin
Member 43880310-Aug-03 21:19
Member 43880310-Aug-03 21:19 
GeneralAlt Key Pin
s o v a n n10-Aug-03 20:45
s o v a n n10-Aug-03 20:45 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.