|
|
|
|
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.
Subject |
Author |
Date |
|
Alfonso Bastias
|
Feb 9, 2006 - 9:50 AM
|
I want to add a skinning capabilities to my application. To start a simple add: //StdAfx.h #if (!defined __PROF_SKIN_H) #include <../ProfSkin/ProfSkin.h> #endif // (!defined __PROF_SKIN_H) // Mainfrm.cpp
CExtPaintManagerSkin * pPM = new CExtPaintManagerSkin; //BlackDiamond if( ! pPM->m_Skin.SearchAndLoadSkinFile( _T("Aqua.Skin"), false ) ) { ::AfxMessageBox( _T("Failed to load initial skin.") ); delete pPM; } else g_PaintManager.InstallPaintManager( pPM );
The skin is loaded OK, but some controls are not skinable, like the main Caption Bar, and the MDI container. I did not find any help about how to use this feature.
Do I need to control onPaint() or similar function... does the g_PainManager do all the job?
Thanks in advance
Alfonso
|
|
Alfonso Bastias
|
Feb 9, 2006 - 11:21 AM
|
Done!... just I derive //Class
class CAboutDlg : public CExtNCW <CExtResizableDialog >
//Constructor
CAboutDlg::CAboutDlg() : CExtNCW < CExtResizableDialog>(CAboutDlg::IDD)
{
}
Last question... What about external DLG, such as Load File, or ever MessageBox...those are not taken the new SKIN..How to solve this problem...Thanks
|
|
Alfonso Bastias
|
Feb 9, 2006 - 11:00 AM
|
Got it...But what about the Dialog... Do I need to derive CExtResizableDialog from template? (CExtNCW did not work) Regards, Alfonso
|
|
Technical Support
|
Feb 9, 2006 - 10:53 AM
|
We may guess that the main and child frames in your application are defined like as follows: class CMainFrame : public CMDIFrameWnd
{
. . .
};
class CChildFrame : public CMDIChildWnd
{
. . .
}; In fact, they should be defined like the following: class CMainFrame : public CExtNCW < CMDIFrameWnd >
{
. . .
};
class CChildFrame : public CExtNCW < CMDIChildWnd >
{
. . .
}; Prof-UIS and ProfSkin libraries do not repaint the non-client area of the frame windows. You need to use the CExtNCW template class to make the frames be skinned.
|
|
Alfonso Bastias
|
Feb 9, 2006 - 10:51 AM
|
I derive CMainFrm from CExtNCW... class CMainFrame : public CExtNCW <CMDIFrameWnd> The main windows is persistent with the Skin, however, the Dialog box (derived from CExtResizableDialog) did not repain the caption with the new skin... What to do?
|
|
Technical Support
|
Feb 9, 2006 - 12:12 PM
|
There are no classes in Prof-UIS which do skinned re-painting of the non-client window area. You need to use the CExtNCW template class in your CExtResizableDialog -derived class: class CYourDialog : public CExtNCW < CExtResizableDialog >
{
. . .
};
|
|