Guidance
指路人
g.yi.org
Software / Reginald / Examples / help / HelpBox.rex

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

  
/*
GUIBEGIN
WINDOW , 18, 51, 259, 135, POPUP|CAPTION|SYSMENU|MINBOX|MAXBOX|THICK, , My Help Window
	HTML 0, 0, 24, 21, , , MyBrowser
DEND
GUIEND
*/

/* This child script simply displays an HTML page in a window, and
 * waits until the user closes the window.
 *
 * It is assumed that the creator passes one extra arg to CreateObject --
 * a URL to display in our HTML control.
 */

create:
DO
	guierr = "SYNTAX"
	guiheading = 1

	/* Stuff the caller's URL into the variable associated with our
	 * HTML control. When our window opens, it will display this URL.
	 */
	mybrowser = ARG(1)

	/* Create a modal window, displaying the passed URL. */
	guicreatewindow("NORMAL", -1)

	guisetctlplacement("MyBrowser", , , width, height)

	/* Since we've created modal, we can do a message loop
	 * right here, and then destroy the window when the
	 * user closes.
	 */
	continue = 1
again:
	DO WHILE continue
		guigetmsg()
		CATCH SYNTAX
			CONDITION('M')
			SIGNAL again
		CATCH HALT
	END

FINALLY
	guidestroywindow()
END
RETURN 0

wm_close:
	continue = 0
	RETURN

wm_size:
	/* Resize the HTML control so that it fills our window. We do this
	 * by calling GuiSetCtlPlacement, with the same width and height
	 * as our size event now. But don't do this until the HTML control
	 * is finally created (ie, SIZE events can happen for the window
	 * before its controls are created.
	 */
	width = ARG(3)
	height = ARG(4)
	IF guiinfo("HANDLE", "MyBrowser", 2) \== "" THEN
		guisetctlplacement("MyBrowser", , , width, height)
	RETURN
掌柜推荐
 
 
¥289.00 ·
 
 
¥1,080.00 ·
 
 
¥1,380.00 ·
 
 
¥638.00 ·
 
 
¥1,290.00 ·
 
 
¥1,420.00 ·
© Sun 2024-11-24  Guidance Laboratory Inc.
Email:webmaster1g.yi.org Hits:0 Last modified:2010-07-16 20:49:00