views:

518

answers:

3

I'd like to know if there is an event for ComboBox in Visual C++ that I can utilyze for doing something when mouse passes over the items of the combobox. Thank you

A: 

You could try WM_DRAWITEM notification, but you might need an owner drawn style for that.

The draw item member contains an itemAction that indicates for what situation the item needs to draw itself.

HS
I haven't understand. Can you do me an example of this please?
A: 

I haven't understand. Can you do me an example of this please?

A: 

Have a look at TrackMouseEvent().

You will probably need to create a class for your combobox (derived from CComboBox); to add the TrackMouseEvent() in it.

There are messages to handle the mouse hover (when the mouse is inside the client area of the CWnd) and mouse leave (when mouse leaves the client area of the CWnd).

Max