Professional UI Solutions
Site Map   /  Register
 
 

Forum

Please Log In to post a new message or reply to an existing one. If you are not registered, please register.

NOTE: Some forums may be read-only if you are not currently subscribed to our technical support services.

Forums » Prof-UIS General Discussion » Trouble having OCX in the dialogbox derived from CExtResizableDialog Collapse All
Subject Author Date
Saroj Acharya Aug 5, 2004 - 4:46 PM

Hi,


I have an OCX control that runs OK on a dialog box when it is used in MFC dialog based application. However, when I try to drop this control in a dialogbox and use CExtResizableDialog as a base calss, I cannot display the dialogbox using DoModal(). However, when I remove the control from the dialog box, I could display it using the same function i.e. DoModal().


Any idea what is going on ?


Thanks,


Saroj


 

Technical Support Aug 9, 2004 - 3:34 AM

Dear Saroj,

There are two types of MFC DLL extension libraries: EXE extensions and regular DLL extensions (RDE). Prof-UIS 2.25 supports RDE configurations (see build configurations of the profuisdll project).

You need to define the __PROF_UIS_FOR_REGULAR_DLL symbol in the preprocessor settings of your project. This make your project use the RDE version of Prof-UIS automatically. Besides, initialize the RDE library manually. Place the following code at the beginning of the InitInstance virtual method of your CWinApp-derived class:

    BOOL CApp::InitInstance()
    {
        if( ! ::AfxOleInit() )
        {
            ASSERT( FALSE );
            return FALSE;
        } // if( ! ::AfxOleInit() )
        CExt_ProfUIS_ModuleState::InitExtension(
            AfxGetStaticModuleState()
            );

Saroj Acharya Aug 9, 2004 - 9:49 AM


Hi Tech Support,


I tried what you suggested and got errore during runtime. Unfortunately, the error is in message pump loop and I cannot even launch my application. To be more precise, error is from the line # 6121 of file ExtPopupMenuWnd.cpp.


The error message is as below:


Unhandled exception at 0x00744f55 (ProfUIS225ud-RDE.dll) in Optiview-nd.exe: 0xC0000005: Access violation reading location 0x00000000.


I don’t know what the cause of this problem is. Your help is highly appreciated. If I cannot resolve this problem, I am kinda stuck with my project because I cannot use the OCX that I MUST use.


Regards,


Saroj

Technical Support Aug 10, 2004 - 6:14 AM

It seems we need to take a look at your source code. We believe that we will help you quickly resolve the problem. Please send us your project.