I’m trying to create a CExtEdit control dynamically in the OnInitDialog of a CExtResizableDialog. It didn’t act as expected, so I tried it in one of your samples as well (CompoundProperties), with same result. I can see the control appearing, but when hovering over it with the mouse, or putting the focus into it, the editbox doesn’t have any kind of border appearing (it should be a border consistent with the selected paintmanager). This is the code I added to your sample:
MainDlg.h:
CArray <CWnd *, CWnd *> m_vWnds;
MainDlg.cpp:
CMainDlg::~CMainDlg()
{
for (int i = 0; i < m_vWnds.GetSize(); i++) {
if(m_vWnds[i] != NULL) delete m_vWnds[i];
}
m_vWnds.RemoveAll();
}
...
BOOL CMainDlg::OnInitDialog()
{
...
CRect rect(700, 472, 800, 492);
ScreenToClient(&rect);
CExtEdit *pEdit = new CExtEdit;
pEdit->Create(WS_VISIBLE|WS_CHILD|WS_TABSTOP|ES_AUTOHSCROLL, rect, this, IDC_EDIT1);
pEdit->ModifyStyleEx(0, WS_EX_CLIENTEDGE|WS_EX_NOPARENTNOTIFY);
m_vWnds.Add(pEdit);
AddAnchor( IDC_OBJECT_CANVAS, CSize(0,0), CSize(60,100) );
AddAnchor( IDC_PROPERTY_GRID_CTRL, CSize(60,0), CSize(100,100) );
...
}
I got the applied styles from another CExtEdit created throught the .rc file (, which works fine). Could you give me any hint on what initialization I’m missing?
Thank you,
Chris