WinAPI tooltip shows, then hides and then shows again

I use the following code for adding tooltip to selected window region (RECT):
{code} INITCOMMONCONTROLSEX icc;
InitCommonControlsEx(&icc);
icc.dwSize = sizeof(INITCOMMONCONTROLSEX);
icc.dwICC = ICC_BAR_CLASSES;

HWND tooltip_hwnd = CreateWindowEx(WS_EX_TOPMOST, TOOLTIPS_CLASS, "MyTooltip", WS_POPUP | TTS_ALWAYSTIP, CW_USEDEFAULT, CW_USEDEFAULT, hwnd, NULL, (HINSTANCE)GetModuleHandle(NULL), NULL);

SetWindowPos(tooltip_hwnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE |WP_NOACTIVATE);

SendMessage(tooltip_hwnd, TTM_SETMAXTIPWIDTH, 0, 200);
SendMessage(tooltip_hwnd, TTM_SETDELAYTIME, TTDT_AUTOPOP, 15000);
SendMessage(tooltip_hwnd, TTM_SETDELAYTIME, TTDT_RESHOW, 10);

TOOLINFO ti = {0};
ti.cbSize = sizeof(TOOLINFO);
ti.uFlags = TTF_SUBCLASS;
ti.hwnd = hwnd;
ti.hinst = (HINSTANCE)GetModuleHandle(NULL);
ti.uId = 1;
ti.lpszText = "tooltip_text";
ti.rect.left = 10;
ti.rect.top = 10;
ti.rect.right = 100;
ti.rect.bottom = 80;
SendMessage(tooltip_hwnd, TTM_ADDTOOL, 0, (LPARAM)(LPTOOLINFO)&ti);{code} 
And problem is in here: when the mouse cursor appears above the selected rect, then tooltip window quickly shows, then hides and then shows again. Where is mistake in this code? And how to fix this bug?
0
Igor
9/30/2014 6:38:49 AM
embarcadero.cppbuilder.native 608 articles. 0 followers. Follow

0 Replies
750 Views

Similar Articles

[PageSpeed] 10

Reply:

Similar Artilces:

To Show or Not to Show
Hi ;) I have a DataSet where i want to check a value for each row ..then depending on the value for each row i want to show or hide something inside the datagrid ...is this possible ? cant find the right way to do it the main thing is to show or hide a label in every row of the Datagrid Thanks in advance for any help Cheers Are they associated?Loop through each item: if ( myitem(i) == whatever ) myrow(i) = "" (I assume you don't want the whole row to disappear) End LoopPicky Yes they are associated .... In the database theres a field w...

Show/Hide panel for a tooltip
When a user clicks in a textbox, I want to display a panel that has various text in it.  I know I can achieve this for one textbox via the popupcontrolextender.  Is there a way to do this with multiple textboxes?  I have a datagrid that will have about 20 textboxes.   I want one panel to show/hide for all of these textbox.  This panel will display different text for each text box. Any help would be greatly appreciated.  Jason ...

ModalPopupExtender shows background on obj.Show but does not show panel
The code at the bottom shows a basic page with an UpdatePanel and a ModalPopup. Prior to updating to Beta 1.0.61025.0 i could display the popup after a postback by the following:Page.ClientScript.RegisterStartupScript(Me.GetType(), "JavaScriptFragment_ShowDriverSearchPanel", "setTimeout('ShowDriverSearchPanel();', 0);", True) which called the following javascript:function ShowDriverSearchPanel() { $object('mpp1').show(); }(mpp1 was the name of the ModalPopupProperties tag)When the beta was released they removed the properties tags and provi...

superreview requested: [Bug 289366] editorOverlay inserts a second menupopup into message compose view show/hide menu : [Attachment 180449] Do not use editorOverlay for view menu Show/Hide
Justin Wood (irc: Callek) <bugspam.Callek@gmail.com> has asked neil@parkwaycc.co.uk <neil.parkwaycc.co.uk@myrealbox.com> for superreview: Bug 289366: editorOverlay inserts a second menupopup into message compose view show/hide menu https://bugzilla.mozilla.org/show_bug.cgi?id=289366 Attachment 180449: Do not use editorOverlay for view menu Show/Hide https://bugzilla.mozilla.org/attachment.cgi?id=180449&action=edit ------- Additional Comments from Justin Wood (irc: Callek) <bugspam.Callek@gmail.com> Yes that first line change is a BOM, according to bz anyway t...

superreview granted: [Bug 289366] editorOverlay inserts a second menupopup into message compose view show/hide menu : [Attachment 180449] Do not use editorOverlay for view menu Show/Hide
neil@parkwaycc.co.uk <neil.parkwaycc.co.uk@myrealbox.com> has granted Justin Wood (irc: Callek) <bugspam.Callek@gmail.com>'s request for superreview: Bug 289366: editorOverlay inserts a second menupopup into message compose view show/hide menu https://bugzilla.mozilla.org/show_bug.cgi?id=289366 Attachment 180449: Do not use editorOverlay for view menu Show/Hide https://bugzilla.mozilla.org/attachment.cgi?id=180449&action=edit ------- Additional Comments from neil@parkwaycc.co.uk <neil.parkwaycc.co.uk@myrealbox.com> >diff -u -r1.279 messengercompose.xul...

getting to show validation message to show up before the onclick javascsript message box shows up?
Hi All,I have button which checks if a textbox has a required field validator on it. Also, on this button i have a javascript to show a messagebox. I would like to get the validation message to show up before the onclick event message shows up. At the moment it shows the javascript messagebox first.Any ideas? If you are doing Client-side validation (default option) on the validator, then why not change the validator to CustomValidator. Then, have the CustomValidator call the javascript method that would set IsValid=false for the CustomValidator and/or write any custom javascript you want....

Show / not show values in dddw
I have a dddw with employeeID as datavalue and employeename as displayvalue. In the table itself I have a field "active" too. What I need is that I can select an employee who is in an active state. I know, that I can manage this by a filter (or in the retrieve). BUT what I need is the following: After a while I want to edit the dw again. Meanswhile the former selected employee is in an inactive state. That's why my dddw only show the employeeID and not his "former" name (because his name isn't in my list anymore). Any ideas how I can manage this?...

Show an Hide
Hi :) I have a DataGrid with a DataSet as DataSource I want to check the result for each DataSet Row and if the result is True or False i want to show or hide a Label inside the DataGrid Can anyone Please show me some sample code to acomplish this Thanks so much Hi, With the itemdatabound event of the datagrid itself you can change some things of the datagrid. Look for this article about conditional formatting. You can adjust the code easily to your own needs. Grz, Kris.Read my blog. Handy Firefox plugins for web developers.Workaround for non working Mark as answer butt...

Java -show (shows nothing)
I am running SBS 6.0 and had IFOLDER and GroupWise Webaccess 6.0 running until I tried to get my Novell Webmanager running. Novell Webmanager did not work so I tried to reinstall it and now IFOLDER does not give me a login page nor does my GroupWise Webaccess servlet work. When I type in java -show at the console it shows nothing. What could I have done wrong and how can I correct it? Just wondering, Ken@rlmrlm.com , > I am running SBS 6.0 and had IFOLDER and GroupWise Webaccess 6.0 running > until I tried to get my Novell Webmanager running. Novell Webmanager did ...

Show and Hide
Hello,I created an Asp:Repeater where I have an Asp:Panel and an Asp:Label.In each record of the repeater I want to have a small button which hides or shows the panel in that record. If possible with no postback. And it would be great to have a button like "Show" which would change to "Hide".Well, but this is not so important.Could somebody, please, help me out with this? I have no idea of how to create this.Thanks,Miguel Hi,shapper:Here is the sample when the use want to hide the panel according to the request parameter.As your scenario, you can add the code in the cli...

validations were showing,how to i show my calendar
 i am using required field validator , calender(with visible false) and  a readOnly  textBox, i want to show calendar(with visible true) while blank textbox my code; on button1 click event calendar1.visible = true; but textbox is blank so required field validator don't allow for visible of calendar1 what can i do ? Microsoft Certified Professional www.yazilimekibi.com when you click the button to show calendar try adding some temporary text to the textbox. on button 1 click event txtDate.Text = "Select Date Value"; cale...

ModalPopupExtender not showing when I call Show()
I need to get my modal popup to show itself in response to some server-side processing. It can't wait to be fired via a button click. I've put a panel together with an initial css style of display:none, and placed a label and OK button inside it. I added a ModalPopupExtender, assigned its TargetControlID to a "dummy button" that is present but not visible, and set its PopupControlID to the panel I created. In the code-behind file, I used the Page_PreRender event (I've also tried the Page_Load, Page_LoadComplete) to find and fire off the modal window. Here's the code...

sub-report show or not show
Hello, I have a sub-report and I need to show it if the data available otherwise non of the data should be show including headers and title, how can I do this? Thanks, Well, First and foremost, we include a Count(1) as DataValue in all of our stored procedures that are executed for the datasets within RS. If datavalue is equal to or greater that 1 we have data to present to the user. Then when the results are returned to display the data in RS - we have editing on the headers only if DataValue >= 1 to display headers and detail data and most of the time our data is "grouped" in som...

Tooltips not showing
I had my tooltips showing ok. Then I changed the graphic and now there is no tooltips?? Are tooltips known to be bug prone? Nope. Button1.ToolTip = "some string"   NC...  ...

Web resources about - WinAPI tooltip shows, then hides and then shows again - embarcadero.cppbuilder.native

Tooltip - Wikipedia, the free encyclopedia
The tooltip or infotip or a hint is a common graphical user interface element. It is used in conjunction with a cursor , usually a pointer . ...

All sizes - 20110120-NodeXL-Twitter-Quantified Self Graph Highlighted Most Between User with tooltip ...
Flickr is almost certainly the best online photo management and sharing application in the world. Show off your favorite photos and videos to ...

CSS Filter Editor Tooltip in FirefoxDevTools 44 - YouTube
CSS filters are awesome (https://developer.mozilla.org/en-US/docs/Web/CSS/filter). But finding the exact value you need takes a bit of going ...


Google Docs Tooltip Shows Page Number
When you scroll a document in Google Docs, Google now shows a tooltip that includes the number of the page you're currently reading or editing ...

Microsoft Previews Customizable Tooltips on Power Map for Excel
New data cards will allow users of Microsoft's geographic visualization software to soon tailor their mouse-over tooltips.

Chrome Web Store - Wowhead Tooltips
Adds tooltips to all wowhead.com links

Google AdSense Enables Alt/Title Tooltip To Display Advertiser URL
Now on Google AdSense text ad units you can learn the URL of the advertiser by hovering your mouse pointer over the ad. It appears Google added ...

How to replace formtastic inline hints with tooltips
This little bit of coffeescript can be used to replace inline hints from formtastic with a tooltip that appears whenever the user hovers over ...

Animated tooltips with CSS3
Love this. ∞ Permalink

Resources last updated: 12/2/2015 11:42:53 PM