Sys Link control help

The SysLink control provides a convenient way to embed hypertext links in a window.

You can use HTML <A> tags to make links, use API_Control_SetText to set the HTML.

Function help:

Real API_SysLink_Create (Real Parent Handle, Real X, Real Y, Real Width, Real Height, Real Style Flags, Real Extended Style Flags);

This function creates a new sys link control.

Argument list:
(0) Parent Handle: Identifies the window handle of the window to create this control on.
(1) X: The horizontal position of the control in pixels, relative to the parent window.
(2) Y: The vertical position of the control in pixels, relative to the parent window.
(3) Width: The horizontal size of the control in pixels.
(4) Height: The vertical size of the control in pixels.
(5) Style Flags: The style flags, supports the Global Control Styles and the following styles:

LWS_TRANSPARENT
The background mix mode is transparent.

LWS_IGNORERETURN
When the link has keyboard focus and the user presses Enter, the keystroke is ignored by the control and passed to the host dialog box.

(6) Extended Style Flags: This can be any combination of the Global Extended Control Styles.

Return value:
If this function succeeds, it returns the Control ID of the control, otherwise it returns 0.

Secondary check commands for sys links:

NM_CLICK - The user clicked a link.

Use API_Check_TertiaryCommand to get the id of the link.
To set the ID of a link, use the id element in the Sys Links ` HTML, for example:

Click <a id="1">here</a> to close this dialog.


Example:

if ( Command == SysLink1)
{
Second = API_Check_SecondaryCommand (1); // Check the sys link command
if (Second == NM_CLICK)
{
ID = API_Check_TertiaryCommand (1) // Check the link id
show_message ("You clicked link "+string (ID)+".");
}
}



Example code:

is
Static1 = API_Static_Create (Win,450,50,100,20,SS_BITMAP|SS_NOTIFY);
Bitmap1 = API_Resource_LoadBitmap ("mwa.bmp"); // Load wma.bmp into a bitmap resource handle
API_Static_SetImage (Static1,0,Bitmap1); // Set the image

Return to help index