|
|
|
|
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 |
|
Rado Manzela
|
May 2, 2011 - 4:04 PM
|
In CExtEditSystemCurrency::OnSettingChange( UINT uFlags, __EXT_MFC_SAFE_LPCTSTR lpszSection ) you don’t check whether lpszSection is NULL so sometimes it crashes in _tcscmp( lpszSection, _T("intl") )
(for example when switching windows user ). I’ve overridden this function but you could care. It would be nice if you fix other bug with this class I’ve reported to you weeks ago.
|
|
Technical Support
|
May 3, 2011 - 9:41 AM
|
Thank you for reporting this issue. It’s present in two methods CExtEditSystemNumber::OnSettingChange() and CExtEditSystemCurrency::OnSettingChange() : void CExtEditSystemNumber::OnSettingChange(UINT uFlags, __EXT_MFC_SAFE_LPCTSTR lpszSection)
{
ASSERT_VALID( this );
CExtEditSystemNumberCurrencyBase::OnSettingChange( uFlags, lpszSection );
if( LPCTSTR(lpszSection) != NULL && _tcscmp( LPCTSTR(lpszSection), _T("intl") ) == 0 )
{
long double lfSaved = LongDoubleGet();
_Init();
LongDoubleSet( lfSaved );
SetSel( -1, -1 );
}
}
void CExtEditSystemCurrency::OnSettingChange( UINT uFlags, __EXT_MFC_SAFE_LPCTSTR lpszSection )
{
ASSERT_VALID( this );
CExtEditSystemNumberCurrencyBase::OnSettingChange( uFlags, lpszSection );
if( LPCTSTR(lpszSection) != NULL && _tcscmp( LPCTSTR(lpszSection), _T("intl") ) == 0 )
{
long double lfSaved = LongDoubleGet();
_Init();
LongDoubleSet( lfSaved );
SetSel( -1, -1 );
}
}
|
|