Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: Show tooltips / hints when window do NOT have focus


This question is answered.


Permlink Replies: 3 - Last Post: Apr 29, 2016 9:46 AM Last Post By: Remy Lebeau (Te...
Asger Joergensen

Posts: 370
Registered: 11/18/08
Show tooltips / hints when window do NOT have focus  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Apr 16, 2016 11:34 AM
Hi

Is it possible to make buttons show their tooltips / hints even when the button or its parent window do NOT have the focus ?

I have seen other programs do it and I have found it on a page that relate to .Net :
https://msdn.microsoft.com/en-us/library/system.windows.forms.tooltip.showalways(v=vs.110).aspx?cs-save-lang=1&cs-lang=cpp#code-snippet-1

Anybody know if this can be done using CB2009 ?

Thanks in advance
Best regards
Asger
Remy Lebeau (Te...


Posts: 9,447
Registered: 12/23/01
Re: Show tooltips / hints when window do NOT have focus
Correct
Click to report abuse...   Click to reply to this thread Reply
  Posted: Apr 18, 2016 9:48 AM   in response to: Asger Joergensen in response to: Asger Joergensen
Asger wrote:

Is it possible to make buttons show their tooltips / hints even when
the button or its parent window do NOT have the focus ?

Technically yes, if you call Application->HintMouseMessage() directly to
simulate mouse rollovers. A better option would be to juse use THintWindow
directly instead and nshow your own tooltips as needed, like ay other window.

--
Remy Lebeau (TeamB)
Asger Joergensen

Posts: 370
Registered: 11/18/08
Re: Show tooltips / hints when window do NOT have focus  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Apr 29, 2016 9:21 AM   in response to: Remy Lebeau (Te... in response to: Remy Lebeau (Te...
Thanks Remy

I got it working using the THintWindow, but the only way determining if my app have focus was
setting a flag in Application OnActivate and OnDeactivate, is there a simpler way ?

Thanks again
Best regards
Asger
Remy Lebeau (Te...


Posts: 9,447
Registered: 12/23/01
Re: Show tooltips / hints when window do NOT have focus  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Apr 29, 2016 9:46 AM   in response to: Asger Joergensen in response to: Asger Joergensen
Asger wrote:

the only way determining if my app have focus was setting a
flag in Application OnActivate and OnDeactivate, is there a
simpler way ?

Not really. I suppose another option would be to use the Win32 API GetForegroundWindow()
function and see if the HWND belongs to your app or not.

--
Remy Lebeau (TeamB)
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02