1) The Tooltips only appear automatically after say 1.5 seconds of letting the mouse pointer hover above a context menu entry
2) The Tooltips disappear automatically when the mouse pointer is moved
It would be, seriously, superb!
Update 12/28/06: Unfortunately, using Auto3Lib for the task proved to be a unworkable (since using tooltips on context menus is not a native windows options) therefore my two main objectives in this thread has NOT been achieved - anyways, have sent message to the original author of the GUIRegisterMsg'r code for hooking the context menu (eltorro) & is hoping for other solutions to show up!
#Include <GuiConstants.au3> #include <Array.au3> Opt("GUIOnEventMode", 1) $USE_TOOLTIP = TRUE Dim $a_CtrlIDArray[1] Dim $a_CtrlMsgArray[1] Dim $ControlID $Global_I = 0 Dim $__ControlID $HoverActive = 0 $Temp_Found = 0 $defaultstatus = "Ready" Dim $status Dim $Timer Const $WM_MENUSELECT = 0x011F GUIRegisterMsg($WM_MENUSELECT,"func_MouseOverMenu") $Form1 = GUICreate('TITLE', 400, 285) $filemenu = GUICtrlCreateMenu("&File") func_AddCtrl($filemenu,"FileMenu") $file1 = GUICtrlCreateMenuitem("Label 1", $filemenu) func_AddCtrl($file1,"This is Label1") $file2 = GUICtrlCreateMenuitem("Label 2", $filemenu) func_AddCtrl($file2,"Label 2 at Your Service") $file3 = GUICtrlCreateMenuitem("Label3", $filemenu) func_AddCtrl($file3,"Pleased to meet you from Label 3") $file4 = GUICtrlCreateMenuitem("Label 4", $filemenu) func_AddCtrl($file4,"Well, you get the picture, Label 4") GUISetOnEvent($GUI_EVENT_CLOSE, "func_Exit") $contextmenu = GUICtrlCreateContextMenu () $fileitem = GUICtrlCreateMenuitem ("Open", $contextmenu) func_AddCtrl($fileitem,"Works in contaxt menuitem 'Open' as well!") $saveitem = GUICtrlCreateMenuitem ("Save", $contextmenu) func_AddCtrl($saveitem,"Works in contaxt menuitem 'Save' as well!") GUICtrlCreateMenuitem ("", $contextmenu) ; separator $infoitem = GUICtrlCreateMenuitem ("Info", $contextmenu) func_AddCtrl($infoitem,"Works in contaxt menuitem 'Info' as well!") GUISetState() While 1 Sleep(333) WEnd Func func_MouseOverMenu($hWndGUI, $MsgID, $WParam, $LParam) Local $id = BitAnd($WParam, 0xFFFF) For $x= 0 To UBound($a_CtrlIDArray) -1 If $id = ($a_CtrlIDArray[$x]) Then If $USE_TOOLTIP Then ToolTip($a_CtrlMsgArray[$x]) EndIf ExitLoop EndIf Next EndFunc Func func_AddCtrl($ControlID,$ControlMsg) _ArrayAdd($a_CtrlIDArray,$ControlID) _ArrayAdd($a_CtrlMsgArray,$ControlMsg) EndFunc Func func_Exit() Exit EndFunc
Edited by Sunaj, 03 January 2007 - 01:11 PM.





