# HLink

HyperLink control.

Summary

HLink | HyperLink control.
Add | Creates hyperlink control.
Examples |
About |

### Add

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

Creates hyperlink control.

#### Parameters

hGui | Handle of the parent GUI.
X..H | Size & position.
Handler | Notification handler. If you omit handler, link will be opened in default browser when clicked.
Text | Link 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)

hWnd | Handle of the HLink control that generated notification.
Text | Text of the control.
Link | Link 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

>     }

### About

- Ver 2.01 by majkinetor. See http://www.autohotkey.com/forum/topic19508.html
- HLink Reference at MSDN: http://msdn2.microsoft.com/en-us/library/bb760704.aspx
- Licensed under GNU GPL http://creativecommons.org/licenses/GPL/2.0/

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

Creates hyperlink control.
Close