CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Jul 1999
    Posts
    22

    How to handle ....

    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.




  2. #2
    Join Date
    Jul 1999
    Location
    Romania - Iasi
    Posts
    558

    Re: How to handle ....

    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


  3. #3
    Join Date
    Jul 1999
    Posts
    22

    Re: How to handle ....

    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.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured