' Extract the x and y mouse coordinates from the lp parameter.
'
Call dwDWORDto2Integers(lp, x%, y%)
'
' Calculate the icon row and column the mouse is over.
'
column% = x% \ frmFlyout!Image1(0).Width
row% = y% \ frmFlyout!Image1(0).Height
'
' Determine the index of the icon the mouse is over.
' Take into account the fact that the mouse may be outside the flyout window.
'
If ((column% >= gToolbox.flyout_data(gToolbox.tool_selected).num_columns) Or (row% >= gToolbox.flyout_data(gToolbox.tool_selected).num_rows) Or (x% < 0) Or (y% < 0)) Then