[BUG_FIXED] (Author: Andreas Jonsson) Fix Find/Replace dialog status bar overwriting memory problem.
git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository/trunk@1070 f5eea248-9336-0410-98b8-ebc06183d4e3
This commit is contained in:
parent
67f5cbb79e
commit
e66965e460
|
@ -73,14 +73,16 @@ public :
|
||||||
return Window::getHeight();
|
return Window::getHeight();
|
||||||
};
|
};
|
||||||
|
|
||||||
bool setText(const TCHAR *str, int whichPart) const {
|
bool setText(const TCHAR *str, int whichPart) {
|
||||||
if (whichPart > _nbParts)
|
if (whichPart > _nbParts)
|
||||||
return false;
|
return false;
|
||||||
return (::SendMessage(_hSelf, SB_SETTEXT, whichPart, (LPARAM)str) == TRUE);
|
_lastSetText = str;
|
||||||
|
return (::SendMessage(_hSelf, SB_SETTEXT, whichPart, (LPARAM)_lastSetText.c_str()) == TRUE);
|
||||||
};
|
};
|
||||||
|
|
||||||
bool setOwnerDrawText(const TCHAR *str) const {
|
bool setOwnerDrawText(const TCHAR *str) {
|
||||||
return (::SendMessage(_hSelf, SB_SETTEXT, SBT_OWNERDRAW, (LPARAM)str) == TRUE);
|
_lastSetText = str;
|
||||||
|
return (::SendMessage(_hSelf, SB_SETTEXT, SBT_OWNERDRAW, (LPARAM)_lastSetText.c_str()) == TRUE);
|
||||||
};
|
};
|
||||||
|
|
||||||
void adjustParts(int clientWidth);
|
void adjustParts(int clientWidth);
|
||||||
|
@ -90,7 +92,8 @@ private :
|
||||||
int *_partWidthArray;
|
int *_partWidthArray;
|
||||||
|
|
||||||
HLOCAL _hloc;
|
HLOCAL _hloc;
|
||||||
LPINT _lpParts;
|
LPINT _lpParts;
|
||||||
|
generic_string _lastSetText;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // STATUS_BAR_H
|
#endif // STATUS_BAR_H
|
||||||
|
|
Loading…
Reference in New Issue