Guidance
指路人
g.yi.org
Software / Reginald / Examples / help2 / Help.rex

Register 
注册
Search 搜索
首页 
Home Home
Software
Upload

  
/*
GUIBEGIN
WINDOW , 44, 105, 400, 212, CAPTION|SYSMENU|MINBOX|MAXBOX|THICK, , My Window
	FONT 8, 400, MS Shell Dlg
	MENU
DEND

MENU
	HEADING File
		ITEM Open
		ITEM Save
		ITEM Exit
	<
DEND
GUIEND
*/

/* An example of adding help support to a window. We have a CHM file (made
 * with Microsoft's HTML Help Workshop program. In this CHM file, we have
 * a separate page for each control and menu item for which we want to display
 * help. The page is named the same as the control/menu's associated REXX
 * variable, plus a .HTM extension. For example, our PUSH control has an
 * associated variable of "MyButton" so its help page is "MyButton.htm".
 * The File -> Open menu item has no associated variable, so its help page
 * is simply "FileOpen.htm".
 *
 * We'll name our help book the same as this REXX Script, with a .CHM extension.
 */

OPTIONS "C_CALL"
NUMERIC DIGITS 10
LIBRARY rexxgui
guierr = "SYNTAX"
guiheading = 1

/* We'll use the HTML control for help display. */
guiwindowdefaults(, , , , "HTML")

guicreatewindow('NORMAL')

/* Open the Contents docking window */
createobject("HelpContents.rex", , , guiwindow)

/* Create the Reference window, initially displaying a blank page */
createobject("HelpBox.rex", , , guiwindow, "about:blank")

again:
DO FOREVER
	guigetmsg()

	IF EXISTS('GuiObject') \== 0 THEN DO
		IF EXISTS('GuiSignal') == 0 THEN DROP (guiobject)
		ELSE SELECT guiobject
			WHEN "HELPCONTENTS" THEN displayurl(guisignal)
		END
	END

	CATCH SYNTAX
			CONDITION('M')
			SIGNAL again
	CATCH HALT
	FINALLY
		guidestroywindow()
END
RETURN

fileexit:
	guisendmsg(, "POST CLOSE")
	RETURN

displayurl:
	IF EXISTS("HELPBOX") == 0 THEN
		createobject("HelpBox.rex", , , guiwindow, ARG(1))
	ELSE
		helpbox~seturl(ARG(1))
	RETURN
掌柜推荐
 
 
 
 
 
 
 
 
 
 
 
 
© Wed 2024-4-24  Guidance Laboratory Inc.
Email:webmaster1g.yi.org Hits:0 Last modified:2010-07-16 20:48:53