|
|
|
|
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 |
|
delu qiu
|
Jul 20, 2006 - 12:43 PM
|
Hi,
I want to slove my Frame and Dialog window flash problem, these windows applied Prof-UIS skin. It take about half second to completely display the dialog, and the dialog controls flash during the half second. And Frame window flash even longer.
I use xml skin so that I can use my own skin picture file. Does binary skin perform better?
Is there any skin solution to prevent the flash?
Thanks
======================================================== Frame Window ======================================================== class CMainFrame : public CExtNCW < CMDIFrameWnd > { ...
}
CMainFrame::CMainFrame() { CExtPaintManagerSkin * pPM = new CExtPaintManagerSkin; if( ! pPM->m_Skin.Load( LPCTSTR(strPath) ) ) { ::AfxMessageBox( _T("Failed to load initial skin.") ); delete pPM; } else g_PaintManager.InstallPaintManager( pPM );
}
=========================================== Dialog Window =========================================== class CDlgChrysler:public CExtNCW < CExtResizableDialog> { ... }
int CDlgChrysler::OnCreate(LPCREATESTRUCT lpCreateStruct) { if (CDialog::OnCreate(lpCreateStruct) == -1) return -1; ....
CExtPaintManagerSkin * pPM = new CExtPaintManagerSkin; if( ! pPM->m_Skin.Load( LPCTSTR(strPath) ) ) { ::AfxMessageBox( _T("Failed to load initial skin.") ); delete pPM; } else g_PaintManager.InstallPaintManager( pPM ); return 0; }
|
|
Technical Support
|
Jul 21, 2006 - 4:38 AM
|
First of all, there is no reason to install the paint manager twice. That is why you have a delay before the dialog appears on the screen. If you do not know what should appear on the screen first, the dialog or frame window, you should put the code which initializes the paint manager into the InitInstance() virtual method of the CWinApp -derived class. We may also guess you have this flickering because you forgot to specify the WS_CLIPCHILDREN window style in the properties of the dialog template resource.
|
|
delu qiu
|
Jul 21, 2006 - 7:58 AM
|
First, the dialog window and the frame window are seperate project. For the dialog window, I followed the sample code to load the skin in OnCreate() function. I specify the WS_CLIPCHILDREN window style to dialog, the window is still flickering but it was light improved. the window are runtime responsive when the skin was disabled.
when the window flickering, I can see the buttons be paint at its design-time postion first, and then move to its runtime postion.
I should mention I have used photoshop to change several image file in skin folder: Aqua\Button\ControlPushButton\Hover.png Aqua\Button\FrameNcButton\Active\.... Aqua\WindowNcArea\FrameActive.png Aqua\WindowNcArea\FrameInActive.png
I only change image color. and it flickering same way when I use original skin file.
|
|
Technical Support
|
Jul 23, 2006 - 12:30 PM
|
These details about your project are important but we still have no enough information to provide you with a solution. Would you send us a test project?
|
|