Fixed some small non-fatal bugs like missing c_str() and the like.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@6152
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
if (m_windowStyle & wxTE_READONLY)
msStyle |= ES_READONLY;
if (m_windowStyle & wxTE_READONLY)
msStyle |= ES_READONLY;
- if (m_windowStyle & wxHSCROLL)
- msStyle |= (WS_HSCROLL | ES_AUTOHSCROLL);
if (m_windowStyle & wxTE_PASSWORD) // hidden input
msStyle |= ES_PASSWORD;
if (m_windowStyle & wxTE_PASSWORD) // hidden input
msStyle |= ES_PASSWORD;
#ifndef RICHEDIT_CLASS
wxString RICHEDIT_CLASS;
RICHEDIT_CLASS.Printf(_T("RichEdit%d0"), ver);
#ifndef RICHEDIT_CLASS
wxString RICHEDIT_CLASS;
RICHEDIT_CLASS.Printf(_T("RichEdit%d0"), ver);
RICHEDIT_CLASS += _T('W');
#else // ANSI
RICHEDIT_CLASS += _T('A');
RICHEDIT_CLASS += _T('W');
#else // ANSI
RICHEDIT_CLASS += _T('A');
// might be -1 in which case we should use the default values (and
// SetSize called below takes care of it)
m_hWnd = (WXHWND)::CreateWindowEx(exStyle,
// might be -1 in which case we should use the default values (and
// SetSize called below takes care of it)
m_hWnd = (WXHWND)::CreateWindowEx(exStyle,
NULL,
msStyle,
0, 0, 0, 0,
NULL,
msStyle,
0, 0, 0, 0,
#if wxUSE_RICHEDIT
if ( m_isRich )
{
#if wxUSE_RICHEDIT
if ( m_isRich )
{
int len = GetWindowTextLength(GetHwnd()) + 1;
int len = GetWindowTextLength(GetHwnd()) + 1;
wxChar *p = str.GetWriteBuf(len);
TEXTRANGE textRange;
wxChar *p = str.GetWriteBuf(len);
TEXTRANGE textRange;
if ( (value.length() > 0x400) || (value != GetValue()) )
{
wxString valueDos = wxTextFile::Translate(value, wxTextFileType_Dos);
if ( (value.length() > 0x400) || (value != GetValue()) )
{
wxString valueDos = wxTextFile::Translate(value, wxTextFileType_Dos);
-
- SetWindowText(GetHwnd(), valueDos);
+
+ SetWindowText(GetHwnd(), valueDos.c_str());
// implemenation details
// ----------------------------------------------------------------------------
// implemenation details
// ----------------------------------------------------------------------------
void wxTextCtrl::Command(wxCommandEvent & event)
{
SetValue(event.GetString());
ProcessCommand (event);
}
void wxTextCtrl::Command(wxCommandEvent & event)
{
SetValue(event.GetString());
ProcessCommand (event);
}
void wxTextCtrl::OnDropFiles(wxDropFilesEvent& event)
{
void wxTextCtrl::OnDropFiles(wxDropFilesEvent& event)
{
case EN_CHANGE:
{
wxCommandEvent event(wxEVT_COMMAND_TEXT_UPDATED, m_windowId);
case EN_CHANGE:
{
wxCommandEvent event(wxEVT_COMMAND_TEXT_UPDATED, m_windowId);
- wxString val(GetValue());
- if ( !val.IsNull() )
- event.m_commandString = WXSTRINGCAST val;
event.SetEventObject( this );
event.SetEventObject( this );
+ event.SetString( GetValue() );
+ ProcessCommand( event );