0
votes

I managed to create and show a modeless window in a property page's message handler:

m_pListCtrl = new CListCtrl();
m_pParent->ScreenToClient(rtList);
m_pListCtrl->CreateEx(WS_EX_TOPMOST, WS_CHILD|WS_VISIBLE|LVS_LIST, rtList, m_pParent, IDC_LIST_INFO);
m_pListCtrl->ShowWindow(SW_SHOWNORMAL);

But this list ctrl cannot work for me, it doesn't keep focused or be active(it cannot capture and handle its client area itself, e.g. an editbox behind it can paint upon it) I hope it be able to behave like a dropdown list from combobox. I didn't use combobox because I cannot use cue banner of combobox as my project didn't define UNICODE. Back to the title, I am wondering if it's possible to make a custom popup window(it can be a mfc control or a common dialog) work properly in modal dialog. I am pretty sure it possible to do this in a modeless window.

1
What is m_pParent? If it isn't the dialog or a child of the dialog, it will be disabled and so will its children.Mark Ransom
@MarkRansom m_pParent is a pointer of CPropertyPage object, m_pListCtrl->CreateEx succeeded and returned non-zero.Rob L

1 Answers

0
votes

I put the control in a dialog and DoModal the dialog, that works for me.