Carlos:
Primero echate una pasada por este link:
http://www.mygnet.net/articulos/chm,help/568/
Esta parte del codigo lo saque si no mal recuerdo del foro en inglés, no me acuerdo en estos momentos quien es su autor...
Lo agregas como un .PRG adicional (AYUDA.PRG)
**Lo agrego para que no salga el mensaje de No existe ayuda cuando se oprime F1
**Solo Comentario de Mauricio Arevalo
//-----------------------------------------------------------------------//
// This functions provide a way to execute 32 Bits Help Files from a FiveWin Application
// under Windows NT.
// The problem is that FiveWin applications are recognized as 16 Bits applications by
// Windows NT, so NT thinks that help file is also 16 bits.
//-----------------------------------------------------------------------//
// Notes.
// Those functions will only work under 32 bits environment.
//-----------------------------------------------------------------------//
#include "FiveWin.ch"
//-----------------------------------------------------------------------//*
#define HELP_CONTEXT 1 // 0x0001
#define HELP_QUIT 2 // 0x0002
#define HELP_INDEX 3 // 0x0003
#define HELP_CONTENTS 3 // 0x0003
#define HELP_HELPONHELP 4 // 0x0004
#define HELP_SETINDEX 5 // 0x0005
#define HELP_SETCONTENTS 5 // 0x0005
#define HELP_CONTEXTPOPUP 8 // 0x0008
#define HELP_FORCEFILE 9 // 0x0009
#define HELP_KEY 257 // 0x0101
#define HELP_COMMAND 258 // 0x0102
#define HELP_PARTIALKEY 261 // 0x0105
#define HELP_MULTIKEY 513 // 0x0201
#define HELP_SETWINPOS 515 // 0x0203
#define HELP_FINDER 11 // 0x000b
//-----------------------------------------------------------------------//
function HelpTopic( nHelpId )
local cHelpFile := GetHelpFile()
local cHelpTopic := GetHelpTopic()
* MSGSTOP(1)
if Empty( cHelpFile )
* MsgStop( "No Help file available", " Attention" )
return .f.
endif
if nHelpId != NIL
if ValType( nHelpId ) == "N"
SPWinHelp( GetActiveWindow(), cHelpFile, HELP_CONTEXT, nHelpId )
else
SPWinHelpC( GetActiveWindow(), cHelpFile, HELP_KEY, nHelpId )
endif
else // nHelpId == NIL
SPWinHelpC( GetActiveWindow(), cHelpFile, HELP_KEY, cHelpTopic )
endif
return NIL
//-----------------------------------------------------------------------//
function HelpIndex()
local cHelpFile := GetHelpFile()
* MSGSTOP(2)
if Empty( cHelpFile )
* MsgStop( "No Help file available", " Attention" )
return .f.
endif
SPWinHelp( GetActiveWindow(), cHelpFile, HELP_FINDER, 0 )
return NIL
//-----------------------------------------------------------------------//
function HelpSearch( cSearch ) // this is not working it just brings search screen
local cHelpFile := GetHelpFile()
* MSGSTOP(3)
DEFAULT cSearch := ""
if Empty( cHelpFile )
* MsgStop( "No Help file available", " Attention" )
return .f.
endif
SPWinHelpC( GetActiveWindow(), cHelpFile, HELP_PARTIALKEY, cSearch )
return NIL
//-----------------------------------------------------------------------//
function HelpPopup( nHelpId )
local cHelpFile := GetHelpFile()
* MSGSTOP(4)
if Empty( cHelpFile )
* MsgStop( "No Help file available", " Attention" )
return .f.
endif
SPWinHelp( GetActiveWindow(), cHelpFile, HELP_CONTEXTPOPUP, nHelpId )
return NIL
//-----------------------------------------------------------------------//
function WinHelp( cHelpFile, nId, nParams ) // this don't work.
DEFAULT nId := HELP_CONTENTS
DEFAULT nParams := 0
MSGSTOP(5)
SPWinHelp( GetActiveWindow(), cHelpFile, nId, nParams )
return NIL
//-----------------------------------------------------------------------//
DLL32 FUNCTION SPWinHelp( HWND AS LONG, cHelpFile AS LPSTR, nId AS LONG,;
nParams AS LONG );
AS BOOL PASCAL FROM "WinHelpA" LIB "User32.dll"
//-----------------------------------------------------------------------//
DLL32 FUNCTION SPWinHelpC( HWND AS LONG, cHelpFile AS LPSTR, nId AS LONG,;
nParams AS LPSTR );
AS BOOL PASCAL FROM "WinHelpA" LIB "User32.dll"
#ifndef __CLIPPER__
/*
DLL32 Function HTMLHelp( ;
hWnd As LONG, cChmFile As LPSTR, nCommand As LONG, nTopic As LONG ) ;
As LONG From "HtmlHelpA" Lib "hhctrl.ocx"
*/
DLL32 Function HTMLHelpCtx( ;
hWnd As LONG, cChmFile As LPSTR, nCommand As LONG, cTopic As LPSTR ) ;
As LONG From "HtmlHelpA" Lib "hhctrl.ocx"
DLL32 Function HTMLHelpPopup( ;
hWnd As LONG, cChmFile As LPSTR, nCommand As LONG, @sPopUp As LPSTR ) ;
As LONG From "HtmlHelpA" Lib "hhctrl.ocx"
#endif
En tu PRG principal agregas esta linea..
SetKey(VK_F1, {|nKey|HtmlHelp( 0, "\hym32\ayu\ayuda.chm", 2,0 ) })
Espero te sirva...Saludos
Edgar Mauricio Arévalo Mogollón.
Bogotá DC. Colombia
FWH FTDN, xHarbour 1.2.1, Pelles C, Fivedit, Visual Studio Code, Borland 7.30, Mysql, Dbfs
http://www.hymplus.com http://www.hymlyma.com
Tratando de retomar la programación....