Html help files
-
I hope all tree items on context window of html help are expanded when the help pops up. normally tree items of context window are collapsed. do you know how to do that? thx includeh10
-
I hope all tree items on context window of html help are expanded when the help pops up. normally tree items of context window are collapsed. do you know how to do that? thx includeh10
Check out this website. http://www.mvps.org/htmlhelpcenter/ I found the sample projects to be useful even though the tutorials are not that great. I was looking at htmlhelp recently and did not get much help from the newsgroups nor could I find much on the web. But the C++ example here was quite useful, so you can download it, compile it, and use the debugger to figure out what is going on. When you use the htmlhelp api to to tell your program to display a particular help file, within the htmlhelp window, it will expand the table of contents for you. I don't do anything specific to make it happen; it just does it. I implemented context help to allow me to press the '?' button on the upper right of my window and then when you select a dialogue item, it will call the html api function like so... That is one example; you might have switch statements or some pattern for interpreting the ID of the resource and then calling the appropriate version of ::HtmlHelp. Notice the '::'. I am using the global api function. There is an HtmlHelp function built into the mfc classes as well and I do not use those. I use the global function. Why? Cause it just works for me, I guess. Here is some example code. You see I am responding to the OnHelpInfo method in my dialog class. I setup the help path to my .htm file and then when I call ::HtmlHelp at the bottom, it will open the main html help window with the table of contents displayed and it will expand them to the file I am telling it to display specifically. Hope that gets your started. That's all I know; and the htmlhelp documentation, that I have found, really stinks. So I learned how to do things using the example code on the aforementioned website. I still have no idea how it really works. BOOL CDataReductionDlg::OnHelpInfo(HELPINFO* pHelpInfo) { CWinApp* theApp = AfxGetApp(); //Get the help file name CString sHelpFilePath = theApp->m_pszHelpFilePath; //sHelpFilePath += _T("::/hid_sc_size.htm"); switch(pHelpInfo->iCtrlId) { case IDC_START_DAY: case IDC_SPIN_START_DAY : case IDC_START_HOUR: case IDC_SPIN_START_HOUR: case IDC_START_MINUTE: case IDC_SPIN_START_MINUTE: case IDC_START_SECOND: case IDC_SPIN_START_SECOND: case IDC_START_MILLISEC: case IDC_SPIN_START_MILLISEC: case IDC_END_DAY: case IDC_SPIN_END_DAY: case IDC_END_HOUR: case IDC_SPIN_END_HOUR: case IDC_END_MINUTE: case IDC_SPIN_END_MINUTE: case IDC_END_SECOND: cas
-
Check out this website. http://www.mvps.org/htmlhelpcenter/ I found the sample projects to be useful even though the tutorials are not that great. I was looking at htmlhelp recently and did not get much help from the newsgroups nor could I find much on the web. But the C++ example here was quite useful, so you can download it, compile it, and use the debugger to figure out what is going on. When you use the htmlhelp api to to tell your program to display a particular help file, within the htmlhelp window, it will expand the table of contents for you. I don't do anything specific to make it happen; it just does it. I implemented context help to allow me to press the '?' button on the upper right of my window and then when you select a dialogue item, it will call the html api function like so... That is one example; you might have switch statements or some pattern for interpreting the ID of the resource and then calling the appropriate version of ::HtmlHelp. Notice the '::'. I am using the global api function. There is an HtmlHelp function built into the mfc classes as well and I do not use those. I use the global function. Why? Cause it just works for me, I guess. Here is some example code. You see I am responding to the OnHelpInfo method in my dialog class. I setup the help path to my .htm file and then when I call ::HtmlHelp at the bottom, it will open the main html help window with the table of contents displayed and it will expand them to the file I am telling it to display specifically. Hope that gets your started. That's all I know; and the htmlhelp documentation, that I have found, really stinks. So I learned how to do things using the example code on the aforementioned website. I still have no idea how it really works. BOOL CDataReductionDlg::OnHelpInfo(HELPINFO* pHelpInfo) { CWinApp* theApp = AfxGetApp(); //Get the help file name CString sHelpFilePath = theApp->m_pszHelpFilePath; //sHelpFilePath += _T("::/hid_sc_size.htm"); switch(pHelpInfo->iCtrlId) { case IDC_START_DAY: case IDC_SPIN_START_DAY : case IDC_START_HOUR: case IDC_SPIN_START_HOUR: case IDC_START_MINUTE: case IDC_SPIN_START_MINUTE: case IDC_START_SECOND: case IDC_SPIN_START_SECOND: case IDC_START_MILLISEC: case IDC_SPIN_START_MILLISEC: case IDC_END_DAY: case IDC_SPIN_END_DAY: case IDC_END_HOUR: case IDC_SPIN_END_HOUR: case IDC_END_MINUTE: case IDC_SPIN_END_MINUTE: case IDC_END_SECOND: cas
digwizfox, really thans for your long reply. i will try your comments soon. cheers. includeh10