Combobox with CListctrl as dropdown

  • Thread starter Thread starter sgrm123
  • Start date Start date
S

sgrm123

Guest
Hi,

I am displaying CListctrl as dropdown in CComboBox instead of combobox's inbuilt listbox.

I have a MFC dialog based application. The main dialog launches another dialog. In this dialog I am displaying CListctrl as dropdown in CComboBox instead of combobox's inbuilt listbox.

My listctrl is using WS_POPUP style and displayed as topmost window.

SetWindowPos(&wndTopMost, rect.left, rect.top, rect.Width(), rect.Height(), SWP_SHOWWINDOW);

Now the problem is whenever clicking on other controls in the dialog, I am getting killfocus event for clistctrl and hiding the listctrl whereas when I click on main dialog I am not getting killfocus or any other event in listctrl so I could not hide it. For normal combobox , when I click on main dialog the inbuilt dropdown(listbox) is getting hided.

I want to hide the dropdown listctrl when click on main dialog.

I shared my code in the below location. Please help me.

https://aspiresysinc-my.sharepoint....ZOspUebmB9f7wBhHqx5uNNxBOCM0Ed0irMww?e=2SpZ3b

Continue reading...
 
Back
Top