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 » Need Sample Using Prof-UIS MFC Toolbars inside an ActiveX Control Collapse All
Subject Author Date
Paparao Gummadapu Jun 19, 2004 - 11:17 AM

I am trying to evaluate Prof-UIS MFC Library to use in our product. We designed our ActiveX Control with MFC Document/View Model as per the article(http://www.microsoft.com/mind/0497/mfc.asp)


I looked at all the samples but did not find any sample about Prof-UIS controls used in ActiveX Control.


I am interested in a Sample in the above mentioned article with Prof-UIS MenuBar, ToolBar, Office 2003/XP/2000 Look and Feel, Customization of toolbar and menubar items, Save the State in the Registry and Load the state.


Please let me know if anyone has already achieved this. I appreciate if anyone can help me with this. We would like to buy Prof-UIS controls if anybody can show the above requirement is achievable.


--Paparao Gummadapu

Technical Support Jun 24, 2004 - 3:24 AM

Dear Paparao,

Prof-UIS is an MFC extension library. There are two types of MFC extension DLLs:

1) extension DLLs used by MFC-based EXE modules
2) extension DLLs used by regular MFC DLL modules, which are also called regular DLL extensions (RDE)

It is impossible to write a single MFC extension DLL which can be used as an extension of both EXE and other DLL modules.

The RDE version of Prof-UIS is supported by Prof-UIS 2.25. So you can use the Prof-UIS extension DLL from within other MFC regular DLLs like ActiveX modules. In your ActiveX project you should have support for MFC and the __PROF_UIS_FOR_REGULAR_DLL symbol defined in the C/C++ preprocessor settings. Your ActiveX version will be automatically linked with an appropriate RDE version of Prof-UIS if you include Prof-UIS.h file into StdAfx.h. You will be able to use any Prof-UIS features in your ActiveX project.

Additonally you should initialize the Prof-UIS library in the C_Your_ActiveX_App::InitInstance method:

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

Do not forget to use the AFX_MANAGE_STATE( AfxGetStaticModuleState() ); code in the methods of your ActiveX object(s).