Page 1 of 1
HTML-Help
Posted: Mon Nov 19, 2007 1:21 pm
by byte-one
Mr. Linares,
in which way i can produce the required structure for the function HTMLHelpPopup() with the class Tstruct?
MfG Günther
Posted: Mon Nov 19, 2007 8:07 pm
by Antonio Linares
Günther,
There is no need to use a struct for HTMLHelpPopup(), afaik
HTMLHelpPopup() is already declared in source\winapi\help32.prg and this is an example of use:
HtmlHelpPopup( 0, "test.chm", 0, "introduction.htm" )
POPUP
Posted: Tue Nov 20, 2007 12:12 am
by byte-one
Mr. Linares, I will call not the HTML-Topic! I will call the topics in *.txt embedded in *.CHM. This is a code from c++. Can I do the structure from Fivewin?
Thanks for your help!
Günther
void CTechniques::ShowContextHelp(CWnd* pWnd, POINT pt, int iCtrlID)
{
HH_POPUP popup ;
POINT ptPoint ;
RECT rRect ;
// Set the popup's margins
rRect.top = -1 ;
rRect.left = -1 ;
rRect.bottom = -1 ;
rRect.right = -1 ;
GetCursorPos(&ptPoint);
memset(&popup, 0, sizeof(HH_POPUP));
popup.cbStruct = sizeof(HH_POPUP);
popup.hinst = 0;
popup.idString = iCtrlID;
popup.pszText = "";
popup.pt = pt;
popup.clrForeground = 0;
popup.clrBackground = RGB(255, 255, 208);
popup.rcMargins = rRect;
popup.pszFont = "Arial, 8, ascii, , , ";
HtmlHelp(pWnd->GetSafeHwnd(), "hh4mfc.chm::/popups.txt",
HH_DISPLAY_TEXT_POPUP, (DWORD)&popup);
}
Posted: Tue Nov 20, 2007 12:28 am
by Antonio Linares
Better implement the function in C code, from inside your PRG and use it this way: ShowContextHelp( oWnd:hWnd, "hh4mfc.chm::/popups.txt" )
Code: Select all
#pragma BEGINDUMP
#include <windows.h>
HB_FUNC( SHOWCONTEXTHELP )
{
HH_POPUP popup ;
POINT ptPoint ;
RECT rRect ;
// Set the popup's margins
rRect.top = -1 ;
rRect.left = -1 ;
rRect.bottom = -1 ;
rRect.right = -1 ;
GetCursorPos(&ptPoint);
memset(&popup, 0, sizeof(HH_POPUP));
popup.cbStruct = sizeof(HH_POPUP);
popup.hinst = 0;
popup.idString = iCtrlID;
popup.pszText = "";
popup.pt = pt;
popup.clrForeground = 0;
popup.clrBackground = RGB(255, 255, 208);
popup.rcMargins = rRect;
popup.pszFont = "Arial, 8, ascii, , , ";
HtmlHelp( ( HWND ) hb_parnl( 1 ), hb_parc( 2 ),
HH_DISPLAY_TEXT_POPUP, (DWORD) &popup );
}
#pragma EDNDDUMP
Posted: Tue Nov 20, 2007 7:52 am
by byte-one
Oh, thanks! Thats the way! I will send for all FIVE-Winners the function to use.
Please look also to my topic:
http://fivetechsoft.com/forums/viewtopi ... c735b52e0d
For professional help-system this HTML-Help is required!
Greetings from Austria.
Günther