CREATE,USE and HOOK a TOOLTIP control

I want to create a tooltip, an instance of the system tooltip , how could i use it and HOOK it for the Message TTN_NEEDTEXT

Please help ASAP.

Ful code is needed .
LVL 7
InteqamAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

nutwissCommented:
Are you any good at hacking around in C++?

This is a toolbar sample (win32 MFC):

http://www.descriptor.com/win32prog/chp12/15eg.htm

it ~might~ be of some help...
0
nutwissCommented:
Here's a portion from the Errata of Hardcore VB which (sort-of) describes how to handle the message (do a search for TTN_NEEDTEXT on the page)

http://www.devx.com/upload/free/features/vbpj/1999/mckinney/mckinney2a.asp
0
InteqamAuthor Commented:
no ,
i want a pure VB code ,

thank you for the links nutwiss , even that i've seen them before .
:o)

can you help any furthor

please try to .
0
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

InteqamAuthor Commented:
hello

is it difficult that much ?
0
nutwissCommented:
give me a break, it's christmas! :)
0
InteqamAuthor Commented:
lol
sorry

ok , i'll wait for you
until the next millenium
:o)
0
InteqamAuthor Commented:
happy new millennium guys
0
amebaCommented:
So, you already have code which is not working, or you just have the idea?
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
InteqamAuthor Commented:
i reached a point where a could track the NEEDTEXT message and get a string that CONTAINS the tooltip , actually i recieves ( the moment the tool tip is shown ) four NEEDTEXT messages , one of then CONTAINS the tooltip text not at the begining of the string nor at the end , i don't know why ?
0
InteqamAuthor Commented:
and about the articles , what i need is to use the system tooltip , not to create my own , i already created my own tooltip and associated its color to the system tooltip color , but i couldn't get the system tooltip font and the way it is displayed
0
amebaCommented:
>not to create my own
Eh.
Sorry, I don't know how to help you without revising your actual code.
Feel free to reject my answer.
0
amebaCommented:
Maybe you didn't try the sample, it hooks system tooltip and uses TTN_NEEDTEXT message.
0
InteqamAuthor Commented:
well

let me check it , to tell the truth i didn't check it when i saw the blue tooltips, sorry :o)

i'll check it and then return to you , OK ?
0
InteqamAuthor Commented:
well ameba
after a quick review to the example i can tell that it gives half the answer ,

it is hardcoding the delay time and other things that is system dependence,
can you give some time to try to get those value from the system , or can you help me doing that ?

i need about a week to do so , " i have to reformat my PC at home, i am having some problems in it " , OK ?

please if you can help, post a note .
0
amebaCommented:
>it is hardcoding the delay time
It is not, it is setting delay time:
    .DelayTime(ttDelayShow) = 20000
but there is also Get procedure

Public Property Get DelayTime(dwType As ttDelayTimeConstants) As Long
  If (m_hwndTT = 0) Then Exit Property
  DelayTime = SendMessage(m_hwndTT, TTM_GETDELAYTIME, (dwType And ttDelayMask), 0&)
End Property

so you can use
    MsgBox .DelayTime(ttDelayShow) ' I got 7160
'    .DelayTime(ttDelayShow) = 20000 ' don't set time
0
amebaCommented:
>i have to reformat my PC
don't forget to backup your VB sources!
0
InteqamAuthor Commented:
i will Thank you
;o)

for the delay time , what i've noticed when i ran the program , is that it is faster than the system delay , and when i saw the number 2000 , i was sure it is hardcoded ,
anyhow let me test it ,
and be sure that the points are yours ,

can i ask one more thing ,

DO you know if this program will work the same way on a windows NT, "i am using Win98 "

i heard that tooltips manipulation differs between both.

0
amebaCommented:
>DO you know if this program will work the same way on a windows NT
I hope so. I'm using Win95.
0
InteqamAuthor Commented:
Hi ameba

I am working on the code you linked me to, but i am stuck with something

How can I attach a tooltip control to a ListBox?

so you have an Idea, i want the tooltip to send a TTN_NEEDTEXT message to the listbox that owns it ,

Please if you have a clue.
0
amebaCommented:
from Code Box at http://www.vbbox.com/
"List Tooltips

Well, they said it couldn't be done, but here it is. Add a tooltip to each element of a standard VB listbox. Subclassing required, though. Have fun.

 Download LISTTIPS.ZIP (26.7KB)"
0
InteqamAuthor Commented:
well
i don't know if this will work or not

but you've answered my original question perfectly , thank you
:o)

one more thing : i may send asking e-mails to you if i needed help ,or i may continue with this thread , is it ok ?


0
amebaCommented:
Thanks for your points.
You can ask me here or send me e-mail. I'll try to help if possible.
0
InteqamAuthor Commented:
thanks

thats what i expect from a profissional
0
InteqamAuthor Commented:
Hi ameba

thanks to you i've made it, but with one problem

the tooltip appears behind the listbox of the combo box, have any ideas why or how to solve this ?

Please it is urgent?
0
amebaCommented:
I am not sure how can I help without seeing actual code.
0
InteqamAuthor Commented:
thanks alot ameba

i found a solution
:o)
0
amebaCommented:
Where was the problem?
0
InteqamAuthor Commented:
in the createwindowex API,

i passed the ALWAYSONTOP to the tooltip.

now the ocx is ready.
0
amebaCommented:
Cool, I'm glad you solved it.
0
InteqamAuthor Commented:
thank you
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.