views:

243

answers:

1

Hi,

I have this code in the switch (msg) loop inside WindowProc on my GUI App.

case WM_MOUSEMOVE:

         TRACKMOUSEEVENT tme;
         tme.cbSize = sizeof(TRACKMOUSEEVENT);
         tme.dwFlags = TME_HOVER;
         tme.dwHoverTime = 100;
         tme.hwndTrack = hwnd;
         TrackMouseEvent(&tme);
    break;
    case WM_MOUSEHOVER:
         DialogBox(hInstance, MAKEINTRESOURCE(IDD_DIALOG), hwnd, AboutDlg);
    break;

I was wondering if I could do anything to have event WM_MOUSEOVER only when I hover over a Control of the window (in this case a CHECKBUTTON)

I need this because I want some explanation about this checkbox (I don't want to write it on the label) to popup when the mouse is over it. I don't want either a DialogBox... is there any Balloon (or something without an OK button) that appears and dissappears instead a dialogbox or messagebox?

Thanks a lot

A: 

It's called a tooltip. They often don't require you to track any mouse events at all. You can even make them look like speech balloons. To get started, read about them in MSDN.

Rob Kennedy
I found that yesterday afternoon but I don't know what I'm doing wrongly, because it still doesn't work.
deb
Sorry to hear that. You're going to need to be more specific that "it doesn't work" if you expect to get help, though. Consider asking a new question about how to use tooltips.
Rob Kennedy