open "LBtip.dll" for Dll as #tip ... Button #main.b00, "", FlowButton, UL, 938, 150, 40, 30 ... hbutton1 = hwnd(#main.b00) tip$ = "Blank\Erase" calldll #tip, "SetTip", hbutton1 as ulong, tip$ as ptr, ret as void
|
open "LBtip.dll" for Dll as #tip ... for n = 0 to 5 v$ = "#main.b" + right$("0"+ str$(n),2) hbutton = hwnd(#v$) tip$ = word$("Erase Process Alt-Process Decision Input-Output",n+1) calldll #tip, "SetTip", hbutton as ulong, tip$ as ptr, ret as void next ... close #tip
|
SUB MakeTooltips hWin TTS.ALWAYSTIP = 1 : TTS.NOPREFIX = 2 : style = _WS_POPUP or TTS.NOPREFIX or TTS.ALWAYSTIP calldll #comctl32,"InitCommonControls", re as void calldll #user32, "GetWindowLongA", hWin as long, _GWL_HINSTANCE as long, hInstance as long calldll #user32, "CreateWindowExA", _WS_EX_TOPMOST as long,"tooltips_class32" as ptr, "" as ptr,_ style as long, _CW_USEDEFAULT as long, _CW_USEDEFAULT as long, _CW_USEDEFAULT as long, _CW_USEDEFAULT as long,_ hWin as long, 0 as long, hInstance as long, "" as ptr, hwndTT as long flags=_SWP_NOMOVE or _SWP_NOSIZE or _SWP_NOACTIVATE calldll #user32, "SetWindowPos", hwndTT as long,_HWND_TOPMOST as long, 0 as long, 0 as long, 0 as long, 0 as long, flags as long, r as long 'create a struct for the tooltips: struct toolinfo, cbSize as long, uFlags as long, hWindow as long, uId as long, x as long, y as long, w as long, h as long, hInst as long, lpstrText$ as ptr toolinfo.cbSize.struct = len(toolinfo.struct) toolinfo.uFlags.struct = 1 Or 16 toolinfo.hWindow.struct = hWin 'Button Tooltip: tipData$ = "Erase Process Alt-Process Decision Input\Output Manual-Input Connector Delay\Wait Doc\Printer" tipData$ = tipData$ + " Start End Edit\Text Arrow Yes No Copy Paste File Disk Print" for n = 0 to 19 v$ = "#main.b" + right$("0"+ str$(n),2) toolinfo.uId.struct = hwnd(#v$) toolinfo.lpstrText$.struct = word$(tipData$,n+1) calldll #user32, "SendMessageA", hwndTT as long, 1028 as long, 0 as long, toolinfo as struct, re as long next end sub