Click to See Complete Forum and Search --> : How to handle ....


laClass
July 26th, 1999, 08:36 AM
Hi,

I wrote a Dialog-based Application and added a statusbar to the Dialog. Id like to display some information (in the statusbar) about a button in the Dialog, when Im hovering over it with the mouse.But I dont know exactly how to check when the mouse is hovering over or leaving the button. Any help is greatly appreciated.

Burlacu Ovidiu
July 26th, 1999, 08:55 AM
Why don't you use ToolTip?
If you don't wanna use it try to handle WM_MOUSEMOVE message

If this help you let me
Regards,
Ovidiu

laClass
July 26th, 1999, 10:07 AM
I dont know how to use Tooltip exactly.I tried to us WM_MOUSEMOVE, but I couldnt figure out how to match the coordinates of the cursor and the ButtonRect. Can you tell me how to use tooltip. I tried the following but it doesnt display anything :

CRect rect;
add = (CButton*)GetDlgItem(IDC_ADD);
add->GetClientRect(&rect);
m_ctlTT.Create(this);
m_ctlTT.AddTool(this,"Add host",rect,IDC_ADD);




i dont know whats wrong. Do I have to direct any mouseevent to this ToolTipclass ?? Thanks.