Dear support,
We have developed a kind of paint software. However, it can not to write a curve by a delay of 0.5 seconds that occur in the following places.
ExtNcFrame.cpp(1562) :
UINT nSHR = (UINT)::SHAppBarMessage( ABM_GETSTATE, &_data );
As a result of investigating, delay has occurred by the following flow.
1. Application that we are developing is to display the mouse position in the status bar.
Because of this, the application running the SetPaneText () whenever the mouse moves.
2. By SetPaneText(), CExtStatusControlBar :: OnPaint () occurs frequently.
3. By the frequent occurrence of OnPaint (), WM_GETMINMAXINFO occurs continuously.
4. WM_GETMINMAXINFO occurs slightly after the window is switched, a delay of about 0.5 seconds occurs in SHAppBarMessage().
(0.001 seconds in other cases)
Question1Problem is solved by the following, but What is the affect in this case?
ExtStatusControlBar.cpp
if( pWndParentStatus != NULL )
{
WINDOWPLACEMENT _wp;
::memset( (void*)&_wp, 0, sizeof(WINDOWPLACEMENT) );
_wp.length = sizeof(WINDOWPLACEMENT);
pWndParentStatus->GetWindowPlacement( &_wp );
if( _wp.showCmd != SW_SHOWMAXIMIZED
//&& (pWndParentStatus->GetStyle()&WS_BORDER) != 0
)
{
MINMAXINFO _mmi;
::memset( &_mmi, 0, sizeof(MINMAXINFO) );
CExtPaintManager::monitor_parms_t _mp;
CExtPaintManager::stat_GetMonitorParms( _mp, (CWnd*)pWndParentStatus );
_mmi.ptMaxPosition.x = _mp.m_rcWorkArea.left;
_mmi.ptMaxPosition.y = _mp.m_rcWorkArea.top;
_mmi.ptMaxTrackSize.x = _mp.m_rcWorkArea.Width(); // ::GetSystemMetrics( SM_CXMAXTRACK );
_mmi.ptMaxTrackSize.y = _mp.m_rcWorkArea.Height(); // ::GetSystemMetrics( SM_CYMAXTRACK );
_mmi.ptMinTrackSize.x = ::GetSystemMetrics( SM_CXMINTRACK );
_mmi.ptMinTrackSize.y = ::GetSystemMetrics( SM_CYMINTRACK );
_mmi.ptMaxSize.x = _mmi.ptMaxTrackSize.x;
_mmi.ptMaxSize.y = _mmi.ptMaxTrackSize.y;
//if( ((CWnd*)pWndParentStatus)->SendMessage( WM_GETMINMAXINFO, 0, LPARAM(&_mmi) ) == 0 )
//{
// if( _mmi.ptMinTrackSize.x < _mmi.ptMaxTrackSize.x
// || _mmi.ptMinTrackSize.y < _mmi.ptMaxTrackSize.y
// )
// {
// GetClientRect( &rcGrip );
// rcGrip.left = rcGrip.right - ::GetSystemMetrics( SM_CXVSCROLL );
// dc.ExcludeClipRect( &rcGrip );
//}
} // if( ((CWnd*)pWndParentStatus)->SendMessage( WM_GETMINMAXINFO, 0, LPARAM(&_mmi) ) == 0 )
} // if( _wp.showCmd != SW_SHOWMAXIMIZED ...
} // if( pWndParentStatus != NULL )
Question2Please tell me how to resolve other than Question1.
--------------------------------------------------------------
Development and operating environment
Windows7 SP1 32bit (Japanese)
VisualStuido2013 Update2 (Japanese)
Prof-UISv3.01(mfc)
----------------------------------------------------------------
Thanks.