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 |
|
Jonas Gauffin
|
Aug 4, 2006 - 1:00 AM
|
I have a SDI application with a dialog that is run in App::Initinstance(). The dialog body get’s skinned, but not the frame around it or the caption bar. How can I fix that? The mainframe is skinned to when it’s displayed, so the skin is loaded alright.
BOOL CAgentApp::InitInstance() { // InitCommonControls() is required on Windows XP if an application // manifest specifies use of ComCtl32.dll version 6 or later to enable // visual styles. Otherwise, any window creation will fail. InitCommonControls();
CWinApp::InitInstance();
SetupUiAdvancedOptions();
CExtPaintManagerSkin * pPM = new CExtPaintManagerSkin; if( ! pPM->m_Skin.SearchAndLoadSkinFile( _T("BlackDiamond.Skin"), false ) ) { ::AfxMessageBox( _T("Failed to load initial skin.") ); delete pPM; } else g_PaintManager.InstallPaintManager( pPM );
try { queueSystem.Startup(Settings::GetInstance().GetRemoteHost(), Settings::GetInstance().GetRemotePort()); } catch (const runtime_error& err) { AfxMessageBox(err.what()); return FALSE; }
// This is the dialog. (inherits CExtRezisableDialog) CLoginDlg dlg; dlg.SetQueueSystem(queueSystem); INT_PTR res = dlg.DoModal(); if (res == IDCANCEL) return FALSE;
[....] }
|
|
Jonas Gauffin
|
Aug 4, 2006 - 3:06 AM
|
Ok. I found the CExtNCW template class. How do I use the code described in "How to subclass controls on a CExtResizableDialog dialog dynamically?"?
|
|
Technical Support
|
Aug 4, 2006 - 4:57 AM
|
You can just copy the content of SubclassAllControlsDynamically() to your code and invoke it in the OnInitDialog() method: SubclassAllControlsDynamically( m_hWnd );
|
|