Tecman
Tecman

Reputation: 3009

Get CBN_SELCHANGE notification when combo box item is changed on mouse hover

Is there any notification message for WinAPI combo box controls we can use to know when the current item is changed while moving the mouse pointer over the drop-down list box?

My expectation is that the CBN_SELCHANGE notification should work for the mouse too, but unfortunately it is sent only when we change the selection using the keyboard or click an item with the mouse.

Upvotes: 0

Views: 1733

Answers (1)

theB
theB

Reputation: 6728

Listen for WM_DRAWITEM in your WndProc, and use the DRAWITEMSTRUCT to determine the selection.

Upvotes: 2

Related Questions