Click to See Complete Forum and Search --> : when i insert my ActiveX into a pocket PC project my application won't start


UltraTrunks
July 19th, 2002, 11:59 AM
I don't under stand what is going on here, but I developed an activeX for windows CE (well, i developed it for desktop windows also) but when i insert it into an application, all of a sudden the application won't start. There isn't even an error. I just start the application on the windows CE device and nothing happens. I remove the activeX and the program runs fine. Whats weird is that the same activeX (and when i mean same i mean the same exact files for both destop and mobil projects) works on the desktop just fine. Does anyone know what is going on?

stober
July 20th, 2002, 12:01 AM
Is it an MFC application? If it is, when you created the project, did you specify ActiveX support in Step 2 of the WCE MFC AppWizard?

Elenjickal
July 21st, 2002, 02:08 AM
are you using ppc 2002? you need to implement IObjectSafety interface, otherwise it will generate a silent exception and may affect your application. check out microsoft site for a related KB article.

UltraTrunks
July 21st, 2002, 03:09 PM
Elenjickal:> I'm not using ppc 2002 i'm using the regular compile mode for ppc.

Stober:> well, its both a MFC activeX and a PPC activeX

stober
July 21st, 2002, 03:17 PM
In the OnInitInstance() in <your application name>.cpp see if it looks like below. I experienced your same problem when I forgot to check the "ActiveX Controls" checkbox in Step 2 of the WCE MFC AppWizard.

BOOL CMyApp::InitInstance()
{
// The following line enables ActiveX controls
AfxEnableControlContainer();

}

UltraTrunks
July 22nd, 2002, 11:18 AM
stober:> does the AfxEnableControlContainer go into the application that is using the activeX or the ActiveX's project??

I Tried putting it in the Container's project and it did not help.

UltraTrunks
July 22nd, 2002, 11:24 AM
:)

Sorry stober you were right. I put the AfxEnableControlConatiner too far down in the InitINstances() function. So it wasn't being called. I put it at the top and it works fine. :)

Thanks man