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.