Welcome to Dream.In.Code
Getting C++ Help is Easy!

Join 136,136 C++ Programmers for FREE! Get instant access to thousands of C++ experts, tutorials, code snippets, and more! There are 1,824 people online right now. Registration is fast and FREE... Join Now!




Mouse hover help

 
Reply to this topicStart new topic

Mouse hover help, Using the tooltip control

sun_storm
5 Jun, 2007 - 11:44 AM
Post #1

New D.I.C Head
*

Joined: 22 May, 2007
Posts: 7


My Contributions
Hello guys. I have another question for you. I'm trying to insert in my application "that help" when I hover a button with the mouse. Exactly like when you hover the X button from the application title bar: right next to it, appears, in an yellow box, the message "Close". Can anyone help me ?

Thanks !
User is offlineProfile CardPM
+Quote Post

NickDMax
RE: Mouse Hover Help
5 Jun, 2007 - 06:50 PM
Post #2

2B||!2B
Group Icon

Joined: 18 Feb, 2007
Posts: 2,858



Thanked: 49 times
Dream Kudos: 550
My Contributions
HI, those little boxes are called "tooltips" and windows does natively support them. To use them in your program you must follow the following steps:
#1 load the control from the dll.
#2 Create the control using the CreateWindow and the TOOLTIPS_CLASS
#3 Prepare TOOLINFO structure.
#4 Send the control you want to add the tooltip to a message telling it to add the tool tip control (not all controls will process this message... but the common controls do).
#5 Activate the tool (I am not sure YOU have to do this... I think the control can do it).

Anyway, I am no expert. The above was gleaned from MSDN. The process is a bit less involved with MFC. And there are other 3rd party tooltip classes.
User is offlineProfile CardPM
+Quote Post

sun_storm
RE: Mouse Hover Help
6 Jun, 2007 - 01:50 AM
Post #3

New D.I.C Head
*

Joined: 22 May, 2007
Posts: 7


My Contributions
QUOTE(NickDMax @ 5 Jun, 2007 - 07:50 PM) *

HI, those little boxes are called "tooltips" and windows does natively support them. To use them in your program you must follow the following steps:
#1 load the control from the dll.
#2 Create the control using the CreateWindow and the TOOLTIPS_CLASS
#3 Prepare TOOLINFO structure.
#4 Send the control you want to add the tooltip to a message telling it to add the tool tip control (not all controls will process this message... but the common controls do).
#5 Activate the tool (I am not sure YOU have to do this... I think the control can do it).

Anyway, I am no expert. The above was gleaned from MSDN. The process is a bit less involved with MFC. And there are other 3rd party tooltip classes.



Woow...thanks a lot Nick, that really really helped me. I've managed to work it out. Thanks again & good luck icon_up.gif
User is offlineProfile CardPM
+Quote Post

Reply to this topicStart new topic
Time is now: 12/1/08 10:32PM

Live C++ Help!

C++ Tutorials

Reference Sheets

C++ Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month