HTML-Help

Post Reply
User avatar
byte-one
Posts: 1048
Joined: Mon Oct 24, 2005 9:54 am
Location: Austria
Contact:

HTML-Help

Post 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
Regards,
Günther
---------------------------------
office@byte-one.com
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post 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" )
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
byte-one
Posts: 1048
Joined: Mon Oct 24, 2005 9:54 am
Location: Austria
Contact:

POPUP

Post 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);
}
Regards,
Günther
---------------------------------
office@byte-one.com
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post 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
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
byte-one
Posts: 1048
Joined: Mon Oct 24, 2005 9:54 am
Location: Austria
Contact:

Post 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
Regards,
Günther
---------------------------------
office@byte-one.com
Post Reply