Home > Software engineering >  OCX control on DUILIb loading a third party
OCX control on DUILIb loading a third party

Time:05-15

I use DUILIB load OCX is written by myself, when added to the DUILIB always loading unsuccessful was searched some articles on the Internet but almost didn't solve the problem, I don't know if my OCX controls, the control on the MFC project use without any problem,
In the first place in the use of OCX first according to the official method in the XML file write OCX csid then add to, according to the process failure
Then according to their online add a control and then rewrite the createControl function
 CControlUI * CWndUI: : CreateControl (LPCTSTR pstrClassName) 
{
If (_tcsicmp (pstrClassName, _T (" Wnd "))==0)
{
PUI CWndUI *=new CWndUI;
OcxCLASS * pOcx=new ocxCLASS ();
POcx - & gt; Create (_T (" Ocx "), the WS_VISIBLE | WS_CHILD | BS_PUSHBUTTON, CRect (0, 0, 0, 0), CWnd: : FromHandle (m_pManager - & gt; GetPaintWindow ()), 0);
The pUI - & gt; The Attach (* pOcx);
Return the pUI;
}
Return nullptr.
}

Writing always prompt I cannot instantiate an abstract class type,,, don't know why,
  • Related