'###############################################################################
' BEGIN phnx_HyperLink_Class32
'###############################################################################
' Item states
%HLIS_NORMAL = &H00
%HLIS_FOCUSED = &H01
%HLIS_VISITED = &H02
%HLIS_NSTATES = &H0F
%HLIS_CLICKED = &H40
%HLIS_HIGHLIGHTED = &H80
' Hit-test values
%HLHT_NOWHERE = 0 ' mouse is not over the control
%HLHT_CLIENT = 1
%HLHT_TEXT = 2
%HLHT_IMAGE = 3
%HLHT_LINK = 4 ' mouse is over the intersection of text and image
' Used by the HLM_HITTEST message
TYPE HYPERLINKHITTEST ' hlht
tpt AS POINTAPI ' IN: location to test in client coordinates
trcImage AS RECT ' OUT: bounding rectangle of image item
trcText AS RECT ' OUT: bounding rectangle of text item
lHitCode AS LONG ' OUT: hit-test value
END TYPE
' Used by the HLN_HOTITEMCHANGE notification message
TYPE HYPERLINKHOTITEM ' hlhi
hdr AS NMHDR
fLeaving AS LONG ' TRUE if mouse is leaving the item
END TYPE
' phnx_HyperLink_Class32 styles
' -----------------------------
%HLS_RAISED = &H0001??
' The control has a raised appearance.
%HLS_SUNKEN = &H0002??
' A half-sunken border is drawn around the control.
%HLS_MULTILINE = &H0004??
' Text is displayed on multiple lines when it is too long to fit
' within the width of the control.
%HLS_AUTOSIZE = &H0008??
' The control automatically resizes to fit its contents.
%HLS_LEFT = &H0010??
' The image is on the left side of any text that is present. If only
' text or an image is present, the displayed item is centered.
%HLS_TOP = &H0020??
' The image is at the top of any text that is present. If only
' text or an image is present, the displayed item is centered.
%HLS_RIGHT = &H0040??
' The image is on the right side of any text that is present. If only
' text or an image is present, the displayed item is centered.
%HLS_BOTTOM = &H0080??
' The image is at the bottom of any text that is present. If only
' text or an image is present, the displayed item is centered.
%HLS_OVERLAP = &H0100??
' The image is drawn below any text that is present. Both text and image are centered.
%HLS_TRANSPARENT = &H0200??
' The control has a transparent background.
' phnx_HyperLink_Class32 messages
' -------------------------------
%HLM_GETSTATE = %WM_USER + &H0064??
' Purpose: Sent to determine the state of a hyperlink control.
' wParam: N/A
' lParam: N/A
' Return: The return value specifies the current state of the hyperlink control.
%HLM_SETSTATE = %WM_USER + &H0065??
' Purpose: Sent to change the state of a hyperlink control.
' wParam: New state of control.
' lParam: N/A
' Return: No return value.
%HLM_GOTOURL = %WM_USER + &H0066??
' Purpose: Sent to a hyperlink control to launch the default browser.
' wParam: N/A
' lParam: N/A
' Return: No return value.
%HLM_GETIMAGE = %WM_USER + &H0067??
' Purpose: Sent to retrieve the handle of the image (bitmap, icon, or cursor)
' associated with a hyperlink control.
' wParam: N/A
' lParam: N/A
' Return: The return value is the handle of the image, if any; otherwise, it is NULL.
%HLM_SETIMAGE = %WM_USER + &H0068??
' Purpose: Sent to associate a new image (bitmap, icon, or cursor) with a hyperlink control.
' wParam: The type of image
' lParam: Handle of new image.
' Return: The return value is the handle of the image previously associated with
' the hyperlink control, if any; otherwise, it is NULL.
%HLM_GETTEXTCOLOR = %WM_USER + &H0069??
' Purpose: Sent to retrieve the color used to draw text.
' wParam: Item state associated with color.
' lParam: N/A
' Return: The return value is the text color.
%HLM_SETTEXTCOLOR = %WM_USER + &H006A??
' Purpose: Sent to set the color used to draw text.
' wParam: Item state associated with color.
' lParam: New text color or &HFFFFFFFF??? to set the default color.
' Return: The return value is the old text color.
%HLM_GETBACKCOLOR = %WM_USER + &H006B??
' Purpose: Sent to retrieve the background color.
' wParam: N/A
' lParam: N/A
' Return: The return value is the background color.
%HLM_SETBACKCOLOR = %WM_USER + &H006C??
' Purpose: Sent to set the background color.
' wParam: N/A
' lParam: New background color or &HFFFFFFFF??? to set the default color.
' Return: The return value is the old background color.
%HLM_GETIMAGETEXTGAP = %WM_USER + &H006D??
' Purpose: Sent to get the width or height of the gap between the
' text and an image in a hyperlink control.
' wParam: N/A
' lParam: N/A
' Return: The return value is the width or height of the gap.
%HLM_SETIMAGETEXTGAP = %WM_USER + &H006E??
' Purpose: Sent to set the width or height of the gap between the image
' and text in a hyperlink control.
' wParam: N/A
' lParam: The new width or height of the gap.
' Return: The return value is the old width or height of the gap.
%HLM_HITTEST = %WM_USER + &H006F??
' Purpose: Sent to determine which link item, if any, of a hyperlink control
' is at a specified position.
'
' wParam: N/A
' lParam: Address of HYPERLINKHITTEST structure.
' Return: The return value is the hit-test code.
' phnx_HyperLink_Class32 notifications
' ------------------------------------
%HLN_ITEMCLICK = %WM_USER + &H0064??
' Purpose: Sent when the user clicks a mouse button over the image or text in a hyperlink control.
' This message is also sent when the user presses the return or spacebar keys while the
' control has the keyboard focus.
' wParam: Identifier of control.
' lParam: Address of NMHDR structure.
' Return: Return TRUE to prevent the default operation.
%HLN_HOTITEMCHANGE = %WM_USER + &H0065??
' Purpose: Sent when the mouse enters or leaves the client area of a hyperlink control. The
' parent window of the hyperlink control receives this notification message through
' the WM_NOTIFY message.
' wParam: Identifier of control.
' lParam: Address of HYPERLINKHOTITEM structure.
' Return: No return value.
DECLARE FUNCTION InitHyperlinkControl LIB "HYPERLNK.DLL" ALIAS "InitHyperlinkControl" () AS LONG
'###############################################################################
' END phnx_HyperLink_Class32
'###############################################################################