Question
What's this Help
I am switching my appl in VC++ 2005 from winhelp to chm.
winhelp works fine with .hlp file. Now, with html, context
sensitive (F1) works fine, but What's this help doesn't work. In my
CMainFrame class, he is my code tha takes care of that.
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void CMainFrame::WinHelp(DWORD dwData, UINT nCmd)
{
DWORD myarray[]={
ID1, IDH_1, ...and so on};
};
if(!m_InContextHelpMode){
::HtmlHelp(m_hWnd,AfxGetApp()->m_pszHelpFilePath, HH_HELP_CONTEXT,dwData); // this works fine
}
else{
CPoint CurPos;
GetCursorPos(&CurPos);
CWnd *pWnd=WindowFromPoint(CurPos);
//Find the window under cursor
if(pWnd !=NULL){
CSHContextHelp(pWnd->GetParent()->m_hWnd,pWnd->m_hWnd,0); // works fine for win help, Don't for Html
//::HtmlHelp(pWnd->m_hWnd,".chm::/.TXT",HH_TP_HELP_WM_HELP,(DWORD) (LPVOID) array);
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
Q1) for the Ids I use in the array, they work fine, but how can I use the Html call without calling the array, as I thought Robo help does the mapping and spits out chm file which is the only thing I need I think. Besides, I can't map 4000 Ids in my application, how do I get to make the what's this help Ids to work without any manual mapping? What do I pass for that call, or what do I pass instead of the array ?
Q2) When I click on ? in dialogs, nothing happens, if I switch back to winhelp, it works fine using CSHContextHelp call above, I am hoping this comes alive if I get any of this to work. For the ? handling, I don't do any, I just return TRUE for BOOL ONHELPINFO function in the dialogs, and it works fine for winhelp but not for html..........
I appreciate your feedback and comments.
Thanks
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void CMainFrame::WinHelp(DWORD dwData, UINT nCmd)
{
DWORD myarray[]={
ID1, IDH_1, ...and so on};
};
if(!m_InContextHelpMode){
::HtmlHelp(m_hWnd,AfxGetApp()->m_pszHelpFilePath, HH_HELP_CONTEXT,dwData); // this works fine
}
else{
CPoint CurPos;
GetCursorPos(&CurPos);
CWnd *pWnd=WindowFromPoint(CurPos);
//Find the window under cursor
if(pWnd !=NULL){
CSHContextHelp(pWnd->GetParent()->m_hWnd,pWnd->m_hWnd,0); // works fine for win help, Don't for Html
//::HtmlHelp(pWnd->m_hWnd,".chm::/.TXT",HH_TP_HELP_WM_HELP,(DWORD) (LPVOID) array);
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
Q1) for the Ids I use in the array, they work fine, but how can I use the Html call without calling the array, as I thought Robo help does the mapping and spits out chm file which is the only thing I need I think. Besides, I can't map 4000 Ids in my application, how do I get to make the what's this help Ids to work without any manual mapping? What do I pass for that call, or what do I pass instead of the array ?
Q2) When I click on ? in dialogs, nothing happens, if I switch back to winhelp, it works fine using CSHContextHelp call above, I am hoping this comes alive if I get any of this to work. For the ? handling, I don't do any, I just return TRUE for BOOL ONHELPINFO function in the dialogs, and it works fine for winhelp but not for html..........
I appreciate your feedback and comments.
Thanks
