I'm using the ToolTip_Support_Mixin class and setting the Set pbUseFormWindowHandle to False in the constructor of an active-x class.
Code:
Class cWsCtDayView is a cComCtDayView
Procedure Construct_object
Forward Send Construct_Object
...
Property String[] psAppointToolTips
...
Send Define_ToolTip_Support_Mixin
Set pbUseFormWindowHandle to False // must come after Define_ToolTip_Support_Mixin
End_Procedure
Import_Class_Protocol ToolTip_Support_Mixin
...
End_Class
And in the active-x MouseMove event I am looking for the current appointment that the mouse is pointing to and setting the psToolTip accordingly
Code:
Procedure OnComMouseMove Short llButton Short llShift OLE_XPOS_PIXELS llx OLE_YPOS_PIXELS lly
Integer iAppIndex iMaxToolTips
String sTip
String[] saToolTips
Forward Send OnComMouseMove llButton llShift llx lly
Get ComAppointmentAt llx lly to iAppIndex
Move "" to sTip
If (iAppIndex <> 0) Begin
Get psAppointToolTips to saToolTips
Move (SizeOfArray(saToolTips)) to iMaxToolTips
If (iAppIndex < iMaxToolTips) Begin
Move saToolTips[iAppIndex] to sTip
End
End
If (sTip <> "") Begin
Set psToolTip to sTip
End
Else Begin
Send DeleteToolTip
Set psToolTip_private to ""
End
End_Procedure
This works but I have to manually clear the private property when calling the DeleteToolTip. Otherwise the tooltip will not be created again when setting for the same appointment. Note that setting the psToolTip to "" will not work as it does not remove the tooltip.