From: Thomas H. <pol...@us...> - 2005-10-24 15:46:05
|
Update of /cvsroot/smartwin/SmartWin/include/smartwin/aspects In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28751/include/smartwin/aspects Modified Files: AspectText.h Log Message: AspectFocus implemented in WidgetWindowBase Index: AspectText.h =================================================================== RCS file: /cvsroot/smartwin/SmartWin/include/smartwin/aspects/AspectText.h,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- AspectText.h 7 Oct 2005 16:12:04 -0000 1.7 +++ AspectText.h 24 Oct 2005 15:45:51 -0000 1.8 @@ -155,6 +155,8 @@ tstring AspectText<WindowOriginalType, WidgetType, MessageMapType>::getText() const { LRESULT textLength = ::SendMessage( static_cast<const WidgetType*>(this)->handle(), WM_GETTEXTLENGTH, 0, 0 ); + if( textLength == 0 ) + return _T(""); boost::scoped_array<TCHAR> txt(new TCHAR[++textLength]); ::SendMessage( static_cast<const WidgetType*>(this)->handle(), WM_GETTEXT, (WPARAM)textLength, (LPARAM)txt.get() ); tstring retVal = txt.get(); |