PDA

View Full Version : why other MSFlexgrid control is working in my project?



akfromvizzitec
May 18, 2007, 08:45:28
hi!

in my SDI (VC 6.0) project im using the camera library and some registered activex controls like ms flexi grid..

if include the following lines in initialupdate function of my project, not even single activex control is working...:mad: but im not getting any errors...

if( ! DShowLib::InitLibrary( "licence key" ) )
{
return FALSE;
}

what will be the reason for this error..?

pls help me...


thanks in advance


AK

Stefan Geissler
May 18, 2007, 12:32:16
Hi AK,

Problem: Using the classlibary causes lock ups using other ActiveX Controls in the application.
Workaround:

There is a workaround available. Insert in one of the cpp files (i.e the app file) following lines of code:


struct static_init
{
static_init()
{
CoUninitialize();
OleInitialize( 0 )
};
};
#pragma init_seg( user )
static_init sys_init;

akfromvizzitec
May 19, 2007, 12:38:20
hi friend!

thank u very much for your quict reply..:) nw i can able to include any activex control in my project..


thanks a lot..

AK