HLink

HyperLink control.

Summary
HLinkHyperLink control.
AddCreates hyperlink control.
Examples
About

Add

HLink_Add(hGui,  
X,  
Y,  
W,  
H,  
Handler = "",
Text = "'HLink Control':")

Creates hyperlink control.

Parameters

hGuiHandle of the parent GUI.
X..HSize & position.
HandlerNotification handler.  If you omit handler, link will be opened in default browser when clicked.
TextLink text.  Link is text between the ‘ char followd by the : char and location (as Textille mark-up).  Everything else will be displayed as ordinary text.

Notifications

Result := OnLink(hWnd, Text, Link)
hWndHandle of the HLink control that generated notification.
TextText of the control.
LinkLink of the control.

Returns

Handle of the new control or 0 on failure.  Example:

hLink := HLink_Add(hGui, "OnLink", 10, 10, 200, 20, "Click 'here':www.Google.com to go to Google")

Examples

#SingleInstance force

   Gui, +LastFound
   hGui := WinExist() +0

   HLink_Add(hGui, 10,  10,  250, 20, "OnLink", "Click 'here':www.Google.com to go to Google" )
   HLink_Add(hGui, 10,  40,  250, 20, "OnLink", "Click 'this link':www.Yahoo.com to go to Yahoo")
   HLink_Add(hGui, 10,  170, 100, 20, "OnLink", "'About HLink':About")
   HLink_Add(hGui, 110, 170, 100, 20, "OnLink", "'Forum':http://www.autohotkey.com/forum/topic19508.html")
   HLink_Add(hGui, 10,  60,  100, 20, "", "'Google':www.Google.com) ;without handler
   Gui, Show, w300 h200
return

OnLink(hCtrl, Text, Link){
    if Link = About
        msgbox Hlink control`nby majkinetor
    else return 1

}
HLink_Add(hGui,  
X,  
Y,  
W,  
H,  
Handler = "",
Text = "'HLink Control':")
Creates hyperlink control.
Close