home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
BUG 4
/
BUGCD1997_05.BIN
/
aplic
/
clip4win
/
clip4win.exe
/
C4W30E.HUF
/
SOURCE
/
HELP.PRG
< prev
next >
Wrap
Text File
|
1995-07-12
|
2KB
|
64 lines
////////////////////////////
//
// Clip-4-Win WinHelp demo
//
// Copyright (C) 1992 Skelton Software, Kendal Cottage, Hillam, Leeds, UK.
// All Rights Reserved.
//
// To build: c4wbuild winhelp
//
////////////////////////////
#define WIN_WANT_HELP
#define WIN_WANT_ALL
#include "windows.ch"
#define NO_C4WCLASS
#include "commands.ch"
static hWnd
function main()
local oApp, oWnd
CREATE APPLICATION oApp WINDOW oWND TITLE "Clip-4-Win WinHelp demo" ;
ON INIT MenuSetup(oWnd)
return nil
static function DoHelp(nCmd)
static lNeedQuit := .f.
local n
if empty(nCmd) .and. lNeedQuit
WinHelp(hWnd, "PROGMAN.HLP", HELP_QUIT, 0) // exiting
lNeedQuit = .f.
else
n = WinHelp(hWnd, "PROGMAN.HLP", nCmd, iif(nCmd == HELP_PARTIALKEY, "", 0))
lNeedQuit = .t.
endif
return nil
static function MenuSetup(oWnd)
hWnd = oWnd
MENU IN oWnd
POPUP "&File"
MENUITEM "E&xit" ACTION (DoHelp(), PostQuitMessage())
ENDPOPUP
POPUP "&Help"
MENUITEM "&Contents" ACTION DoHelp(HELP_CONTENTS)
MENUITEM "&Index" ACTION DoHelp(HELP_INDEX)
MENUITEM "&Search for Help on..." ACTION DoHelp(HELP_PARTIALKEY)
MENUITEM SEPARATOR
MENUITEM "&How to Use Help" ACTION DoHelp(HELP_HELPONHELP)
MENUITEM "&Windows Tutorial" ACTION WinExec("WINTUTOR.EXE")
MENUITEM SEPARATOR
MENUITEM "&About this program" ACTION MessageBox( , "WinHelp Demo", "About")
ENDPOPUP
ENDMENU
return nil