HTML-Help

HTML-Help

Postby byte-one » Mon Nov 19, 2007 1:21 pm

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
byte-one
 
Posts: 1048
Joined: Mon Oct 24, 2005 9:54 am
Location: Austria

Postby Antonio Linares » Mon Nov 19, 2007 8:07 pm

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
Antonio Linares
Site Admin
 
Posts: 42079
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

POPUP

Postby byte-one » Tue Nov 20, 2007 12:12 am

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
byte-one
 
Posts: 1048
Joined: Mon Oct 24, 2005 9:54 am
Location: Austria

Postby Antonio Linares » Tue Nov 20, 2007 12:28 am

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  Expand view
#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
Antonio Linares
Site Admin
 
Posts: 42079
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby byte-one » Tue Nov 20, 2007 7:52 am

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
User avatar
byte-one
 
Posts: 1048
Joined: Mon Oct 24, 2005 9:54 am
Location: Austria


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: nageswaragunupudi and 98 guests