|
PowerBASIC Forums
![]() Programming
![]() To William Burns (Page 1)
|
This topic is 2 pages long: 1 2 |
next newest topic | next oldest topic |
| Author | Topic: To William Burns |
|
Bob Scott Member |
William, This post is relative to the ToolTips code. I like your ToolTips very much but I am currently experiencing a problem. If a ToolTip is repeatedly changed then the prior ToolTip does not seem to be removed and an increasing memory usage exists. I have never seen the problem before because I almost never revise the ToolTip. Am I blowing smoke again? ![]() The following sample program will demonstrate what I am seeing if memory use is monitored using Task Manager or equivalent. If the modified ToolTips2.inc file is not used then the RemoveToolTip command must be commented out. Thanks for your help. ~Bob [update] code was modified to add two more controls for test purposes and also to include the modified ToolTips2.inc file located at the ToolTips link. [/update] #COMPILE EXE
[This message has been edited by Bob Scott (edited November 30, 2004).] IP: Logged |
|
Pat Logan Member |
Bob, have no clue about Williams code, but . . . you need to delete existing entry text before adding new text. ' SendMessage hToolTip, %TTM_DELTOOL, 0, BYVAL VARPTR(TT) ' SendMessage hToolTip, %TTM_ADDTOOL, 0, BYVAL VARPTR(TT) Thanks, P. ------------------ IP: Logged |
|
Bob Scott Member |
It appears that %TTM_DELTOOL & %TTM_ADDTOOL are not proper for what is required in my application. In fact, I have never seen a case where the %TTM_DELTOOL message is triggered. It appears that once the ToolTip has been added, that %TTM_UPDATETIPTEXT should be used similar to the following:
~Bob ------------------ IP: Logged |
|
Bob Scott Member |
Deleted [This message has been edited by Bob Scott (edited November 30, 2004).] IP: Logged |
|
Bob Scott Member |
Deleted [This message has been edited by Bob Scott (edited November 30, 2004).] IP: Logged |
|
Bob Scott Member |
I have modified William Burns ToolTips code to inhibit excessive memory use when the ToolTip Text is continually updated. What I have programmed is as follows: 1. Get Last ToolTip Text. 2. If Last ToolTip Text is a NULL then Add the ToolTip. 3. If the Last ToolTip Text is not a NULL but is different than the new ToolTip Text then Update the ToolTip Text. Also, 4. I have added a separate function to the INCLUDE file: RemoveToolTip hDlg. CtlID ~Bob ------------------ IP: Logged |
|
Gösta H. Lovgren-2 Member |
ToolTips is a great addition to the PB toolchest. However I can't figure out how to turn them on/off. There is no RemoveToolTip function in the include file. ------------------ IP: Logged |
|
Bob Scott Member |
quote: Gösta, If you use the ToolTips2.inc file, there is a RemoveToolTip function. Make sure you get the ToolTips2.inc file. The command format is: RemoveToolTip hDlg, CtlID Regards, ~Bob ---------------------- Composed with EZ-Post! ![]() ------------------ [This message has been edited by Bob Scott (edited February 19, 2006).] IP: Logged |
|
Gösta H. Lovgren-2 Member |
quote: Bob, The file I have: Thx ------------------ [This message has been edited by Gösta H. Lovgren-2 (edited February 10, 2006).] IP: Logged |
|
Gösta H. Lovgren-2 Member |
Works fine now Bob. Thanks. I just had the wrong ToolTips.Inc. ------------------ IP: Logged |
|
Michael Mattias Member |
I ran into an error in that file just the other day.... When style of the tooltip is being created based in the level of common controls available, the styles are inconsistent. Whith "old" common controls, the style is....
If balloons are available, the style is set to:
For consistency when balloons are available the style should be
(Yup, I created some tooltip text containing ampersands this past week). MCM [This message has been edited by Michael Mattias (edited February 16, 2006).] IP: Logged |
|
Bob Scott Member |
quote: Michael, Thanks very much for the "Tip" . I really appreciate the way you feedback required changes and explain them. Thank you very much!!!ToolTips2.inc has been updated to the required change. Best Regards, ~Bob ---------------------- Composed with EZ-Post! ![]() ------------------ IP: Logged |
|
Gösta H. Lovgren-2 Member |
Bob, After I upgraded to the latest TT2, I ran into a funny thing. Whenever a TT I tried the original TT (William's version) and it works fine Would you still have a copy of the original TT2 so I could try
------------------ [This message has been edited by Gösta H. Lovgren-2 (edited February 23, 2006).] IP: Logged |
|
Gösta H. Lovgren-2 Member |
Found the problem I was having with ToolTips2. I am using several Dialogs. It appears that whatever Dialog is called first is the one the TT's work in. When a TT is summoned in the next/second dialog it may cause an error Just found this, so may be more at play here. Apparently (so far) TT1 (Wm Burns original) doesn't have the problem BUT
[This message has been edited by Gösta H. Lovgren-2 (edited February 25, 2006).] IP: Logged |
|
Gösta H. Lovgren-2 Member |
UPDATE ALERT UPDATE ALERT UPDATE ALERT DISREGARD ALL PREVIOUS COMPLAINTS {STOP} BOZO PROGRAMMER LOOSE ON FORUM! {STOP} I was creating a "child" dialog with %HWND_DESKTOP instead of What I often do is call a child dialog from PB Main before the Then when I remmed the early call to run the full program, that's
------------------ IP: Logged |
This topic is 2 pages long: 1 2 All times are EasternTime (US) | next newest topic | next oldest topic |
![]() |
|
Copyright © 1999-2005 PowerBASIC, Inc. All Rights Reserved.