c++ - Assert in afxwin1.inl on line 21 when creating and testing a custom MFC CEdit in VS2012 unit test -


my boss has custom cedit class called cinplaceedit , we're testing class in visual studio 2012 unit test project. create cedit class in unit test this:

cdialog *dlg = new cdialog(); dlg->create(idd_edit_string); cwnd *plistctrl = dlg;  auto pparent = plistctrl->getparent();   auto editsplat = new cinplaceedit(-1, i, pszblank, getedittemplates()->m_pedtsplat, (void*)&m_psp, plistctrl, ipe_ctrl | ipe_ptrtoptr_var | ipe_right_justify, ids); editsplat->create(dwstyle, crect(0, 0, 1, 1), plistctrl, idc_inplaceedit + i); 

the assert in afxwin1.inl on line 21 thrown during call create( ... ); assert in file afxwin1.inl assert(afxcurrentinstancehandle != null). there way can make unit tests past this?


Comments

Popular posts from this blog

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

html - How to style widget with post count different than without post count -

url rewriting - How to redirect a http POST with urlrewritefilter -