I have a problem with CWnd::CreateControl method while loading custom ActiveX control from the MFC application.
I have list of Custom ActiveX controls which are implemented Create method inturn calling CWnd::CreateControl method.
I am having Dialog window, in the OnInitDialog, I have started timer thread using Settimer(). In the OnTimer event, I am loading all the controls by calling respective control's Create method. After opening and closing the dialog window more than 10 times, OnTimer is not able to load the contols.
I checked the return value which is false and the GetLastError which is 0x0 (Operation successful). I was debugging completely and checked all the possiblities of errors before this event. I couldn't find the root cause what made not loading the controls.