user1758954
user1758954

Reputation: 19

Combobox cbn_closeup event

I have combo box created with style CBS_DROPDOWN | CBS_HASSTRINGS | WS_VISIBLE | WS_CHILD.i want to perform some action on command cbn_closeup.But my control is not getting this event.Even in spy++ there is no cbn_closeup sent to combo box.Please somebody help me.

Upvotes: 0

Views: 969

Answers (1)

xMRi
xMRi

Reputation: 15375

  1. Not your Control gets the WM_COMMAND notification. The parent gets it. So you Need an ON_CBN_CLOSEUP in the parent window code.
  2. If you want that your window gets the notification you Need an ON_CONTROL_REFLECT handler. But this only works if the parent window is created by the MFC too, or at least subclassed.

Upvotes: 1

Related Questions