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 » Where can i find the technical documents peratainig to applying new skins to my (MFC VS 6.0) applica Collapse All
Subject Author Date
howard liu Dec 2, 2007 - 10:09 PM

Hi,
I have just purchased Prof- UI MFC Version. I would like to have a detailed documentation about ’how to apply the skins to my application’. The help that is already present is only related to user interfaces. It does not describe anything about the code updations required for applying these skins over my application.
Also, when i click on the License Key option ( in the web through my account) I do not see any license key present. How do i make sure that i have purchased a full version of Prof UI.

Thanks and Regards,
Ranga

Technical Support Dec 3, 2007 - 7:22 AM

User interface themes in Prof-UIS are implemented as a set of CExtPaintManager*** classes. For example, the Office 2007 black theme is represented by the CExtPaintManagerOffice2007_Black class. You can load a particular theme using a global paint manager that can be accessed through g_PaintManager, which is a smart pointer variable. Each Prof-UIS control paints its inner parts using a paint manager. You can apply a new theme with this code:

 g_PaintManager.InstallPaintManager( RUNTIME_CLASS( CExtPaintManager*** ) );
or with this code:
CExtPaintManager * pPM = new CExtPaintManager***;
      g_PaintManager.InstallPaintManager( pPM );
The CExtPaintManager class is the base class for all other paint managers and it implements the Office 2000 UI theme ( the old classic Windows 2000 UI style). Most of other paint managers are parts of Prof-UIS. But the CExtPaintManagerSkin class is provided by the ProfSkin library that comes with Prof-UIS. This class implements a UI theme based on a skin file which describes rules for painting each UI element. If you need a skinable paint manager, then the StdAfx.h file should include the following:
#if (!defined __PROF_UIS_H)
      #include <Prof-UIS.h>
#endif

#if (!defined __PROF_SKIN_H)
      #include <../ProfSkin/ProfSkin.h>
#endif // (!defined __PROF_SKIN_H)
This will make your project linking automatically with both Prof-UIS and ProfSkin libraries. So, for successful linking you should have appropriate configurations of both libraries compiled first. The build output text of your project will show you which Prof-UIS and ProfSkin libraries should be compiled first. Now, after including the ProfSkin.h file in your project, you have access to the CExtPaintManagerSkin</b> class which can be installed into the <code>g_PaintManager smart pointer variable using similar code as above, but you should load skin data into the skinable paint manager first before installing it:
CExtPaintManagerSkin * pPM = new CExtPaintManagerSkin;
bool bLoaded = true;
      if( ! pPM->m_Skin.SearchAndLoadSkinFile( _T("Aqua.Skin"), false ) )
      {
            bLoaded = false;
            ::AfxMessageBox( _T("Failed to load initial skin.") );
            delete pPM;
      }
      if( bLoaded )
            g_PaintManager.InstallPaintManager( pPM );
As you can see, this code is similar to installing built-in paint managers implemented in Prof-UIS library, but it loads skin data into the pPM->m_Skin skin object before invoking the g_PaintManager.InstallPaintManager( pPM ); code.

As for your question about license keys, the license keys are only needed if you are using Prof-UIS .NET or ActiveX components. But MFC Prof-UIS you purchased comes with full source code so the license key is not needed.