Compilation fix for wxCStrData handling.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45277 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
f450b5cf10
commit
a8988cb339
@ -781,7 +781,7 @@ void wxRadioBox::SetString(unsigned int nItem, const wxString& rsLabel)
|
|||||||
wxCHECK_RET( IsValid(nItem), wxT("invalid radiobox index") );
|
wxCHECK_RET( IsValid(nItem), wxT("invalid radiobox index") );
|
||||||
|
|
||||||
m_pnRadioWidth[nItem] = m_pnRadioHeight[nItem] = -1;
|
m_pnRadioWidth[nItem] = m_pnRadioHeight[nItem] = -1;
|
||||||
::WinSetWindowText((HWND)m_ahRadioButtons[nItem], (PSZ)rsLabel.c_str());
|
::WinSetWindowText((HWND)m_ahRadioButtons[nItem], rsLabel.c_str());
|
||||||
} // end of wxRadioBox::SetString
|
} // end of wxRadioBox::SetString
|
||||||
|
|
||||||
bool wxRadioBox::SetStringSelection(const wxString& rsStr)
|
bool wxRadioBox::SetStringSelection(const wxString& rsStr)
|
||||||
|
@ -456,7 +456,7 @@ void wxSpinCtrl::SetValue(
|
|||||||
{
|
{
|
||||||
long lVal;
|
long lVal;
|
||||||
|
|
||||||
lVal = atol((char*)rsText.c_str());
|
lVal = atol(rsText.c_str());
|
||||||
wxSpinButton::SetValue(lVal);
|
wxSpinButton::SetValue(lVal);
|
||||||
} // end of wxSpinCtrl::SetValue
|
} // end of wxSpinCtrl::SetValue
|
||||||
|
|
||||||
|
@ -236,7 +236,8 @@ void wxStaticText::SetLabel(
|
|||||||
m_labelOrig = rsLabel; // save original label
|
m_labelOrig = rsLabel; // save original label
|
||||||
|
|
||||||
// OS/2 does not support neither ellipsize nor markup in static text:
|
// OS/2 does not support neither ellipsize nor markup in static text:
|
||||||
DoSetLabel(GetEllipsizedLabelWithoutMarkup(label));
|
DoSetLabel(rsLabel);
|
||||||
|
DoSetLabel(GetEllipsizedLabelWithoutMarkup());
|
||||||
|
|
||||||
//
|
//
|
||||||
// Adjust the size of the window to fit to the label unless autoresizing is
|
// Adjust the size of the window to fit to the label unless autoresizing is
|
||||||
@ -277,7 +278,7 @@ MRESULT wxStaticText::OS2WindowProc(
|
|||||||
void wxStaticText::DoSetLabel(const wxString& str)
|
void wxStaticText::DoSetLabel(const wxString& str)
|
||||||
{
|
{
|
||||||
wxString sLabel = ::wxPMTextToLabel(str);
|
wxString sLabel = ::wxPMTextToLabel(str);
|
||||||
::WinSetWindowText(GetHwnd(), (PSZ)sLabel.c_str());
|
::WinSetWindowText(GetHwnd(), sLabel.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
wxString wxStaticText::DoGetLabel() const
|
wxString wxStaticText::DoGetLabel() const
|
||||||
|
@ -160,7 +160,7 @@ bool wxTextCtrl::Create(
|
|||||||
{
|
{
|
||||||
m_hWnd = (WXHWND)::WinCreateWindow( (HWND)GetHwndOf(pParent) // Parent window handle
|
m_hWnd = (WXHWND)::WinCreateWindow( (HWND)GetHwndOf(pParent) // Parent window handle
|
||||||
,WC_MLE // Window class
|
,WC_MLE // Window class
|
||||||
,(PSZ)rsValue.c_str() // Initial Text
|
,rsValue.c_str() // Initial Text
|
||||||
,(ULONG)lSstyle // Style flags
|
,(ULONG)lSstyle // Style flags
|
||||||
,(LONG)0 // X pos of origin
|
,(LONG)0 // X pos of origin
|
||||||
,(LONG)0 // Y pos of origin
|
,(LONG)0 // Y pos of origin
|
||||||
@ -177,7 +177,7 @@ bool wxTextCtrl::Create(
|
|||||||
{
|
{
|
||||||
m_hWnd = (WXHWND)::WinCreateWindow( (HWND)GetHwndOf(pParent) // Parent window handle
|
m_hWnd = (WXHWND)::WinCreateWindow( (HWND)GetHwndOf(pParent) // Parent window handle
|
||||||
,WC_ENTRYFIELD // Window class
|
,WC_ENTRYFIELD // Window class
|
||||||
,(PSZ)rsValue.c_str() // Initial Text
|
,rsValue.c_str() // Initial Text
|
||||||
,(ULONG)lSstyle // Style flags
|
,(ULONG)lSstyle // Style flags
|
||||||
,(LONG)0 // X pos of origin
|
,(LONG)0 // X pos of origin
|
||||||
,(LONG)0 // Y pos of origin
|
,(LONG)0 // Y pos of origin
|
||||||
@ -329,7 +329,7 @@ void wxTextCtrl::SetupColours()
|
|||||||
wxString wxTextCtrl::GetValue() const
|
wxString wxTextCtrl::GetValue() const
|
||||||
{
|
{
|
||||||
wxString sStr = wxGetWindowText(GetHWND());
|
wxString sStr = wxGetWindowText(GetHWND());
|
||||||
char* zStr = (char*)sStr.c_str();
|
char* zStr = sStr.char_str();
|
||||||
|
|
||||||
for ( ; *zStr; zStr++ )
|
for ( ; *zStr; zStr++ )
|
||||||
{
|
{
|
||||||
@ -341,7 +341,7 @@ wxString wxTextCtrl::GetValue() const
|
|||||||
if (*zStr == '\r')
|
if (*zStr == '\r')
|
||||||
*zStr = '\n';
|
*zStr = '\n';
|
||||||
}
|
}
|
||||||
return sStr;
|
return zStr;
|
||||||
} // end of wxTextCtrl::GetValue
|
} // end of wxTextCtrl::GetValue
|
||||||
|
|
||||||
void wxTextCtrl::DoSetValue(
|
void wxTextCtrl::DoSetValue(
|
||||||
@ -360,7 +360,7 @@ void wxTextCtrl::DoSetValue(
|
|||||||
if ( flags & SetValue_SendEvent )
|
if ( flags & SetValue_SendEvent )
|
||||||
m_bSkipUpdate = true;
|
m_bSkipUpdate = true;
|
||||||
|
|
||||||
::WinSetWindowText(GetHwnd(), (PSZ)rsValue.c_str());
|
::WinSetWindowText(GetHwnd(), rsValue.c_str());
|
||||||
AdjustSpaceLimit();
|
AdjustSpaceLimit();
|
||||||
}
|
}
|
||||||
} // end of wxTextCtrl::SetValue
|
} // end of wxTextCtrl::SetValue
|
||||||
@ -370,9 +370,9 @@ void wxTextCtrl::WriteText(
|
|||||||
)
|
)
|
||||||
{
|
{
|
||||||
if (m_bIsMLE)
|
if (m_bIsMLE)
|
||||||
::WinSendMsg(GetHwnd(), MLM_INSERT, MPARAM((PCHAR)rsValue.c_str()), MPARAM(0));
|
::WinSendMsg(GetHwnd(), MLM_INSERT, MPARAM(rsValue.char_str()), MPARAM(0));
|
||||||
else
|
else
|
||||||
::WinSetWindowText(GetHwnd(), (PSZ)rsValue.c_str());
|
::WinSetWindowText(GetHwnd(), rsValue.c_str());
|
||||||
AdjustSpaceLimit();
|
AdjustSpaceLimit();
|
||||||
} // end of wxTextCtrl::WriteText
|
} // end of wxTextCtrl::WriteText
|
||||||
|
|
||||||
@ -1170,11 +1170,17 @@ void wxTextCtrl::AdjustSpaceLimit()
|
|||||||
}
|
}
|
||||||
if (uLen >= uLimit)
|
if (uLen >= uLimit)
|
||||||
{
|
{
|
||||||
uLimit = uLen + 0x8000; // 32Kb
|
if (m_bIsMLE)
|
||||||
if (uLimit > 0xffff)
|
|
||||||
{
|
{
|
||||||
uLimit = 0L;
|
uLimit = uLen + 0x8000; // 32Kb
|
||||||
|
if (uLimit > 0xffff)
|
||||||
|
{
|
||||||
|
uLimit = 0L;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
uLimit = 0x7fff;
|
||||||
|
|
||||||
if (m_bIsMLE)
|
if (m_bIsMLE)
|
||||||
::WinSendMsg(GetHwnd(), MLM_SETTEXTLIMIT, MPFROMLONG(uLimit), 0);
|
::WinSendMsg(GetHwnd(), MLM_SETTEXTLIMIT, MPFROMLONG(uLimit), 0);
|
||||||
else
|
else
|
||||||
|
@ -61,7 +61,7 @@ void wxToolTip::Create(
|
|||||||
|
|
||||||
m_hWnd = ::WinCreateWindow( HWND_DESKTOP
|
m_hWnd = ::WinCreateWindow( HWND_DESKTOP
|
||||||
,WC_ENTRYFIELD
|
,WC_ENTRYFIELD
|
||||||
,(PSZ)rsTip.c_str()
|
,rsTip.c_str()
|
||||||
,lStyle
|
,lStyle
|
||||||
,0, 0, 0, 0
|
,0, 0, 0, 0
|
||||||
,NULLHANDLE
|
,NULLHANDLE
|
||||||
|
@ -484,8 +484,8 @@ bool wxTopLevelWindowOS2::CreateFrame( const wxString& rsTitle,
|
|||||||
hFrame = ::WinCreateStdWindow( hParent
|
hFrame = ::WinCreateStdWindow( hParent
|
||||||
,ulStyleFlags // frame-window style
|
,ulStyleFlags // frame-window style
|
||||||
,(PULONG)&lFlags // window style
|
,(PULONG)&lFlags // window style
|
||||||
,(PSZ)wxFrameClassName // class name
|
,wxFrameClassName // class name
|
||||||
,(PSZ)rsTitle.c_str() // window title
|
,rsTitle.c_str() // window title
|
||||||
,0L // default client style
|
,0L // default client style
|
||||||
,NULLHANDLE // resource in executable file
|
,NULLHANDLE // resource in executable file
|
||||||
,0 // resource id
|
,0 // resource id
|
||||||
@ -553,7 +553,7 @@ bool wxTopLevelWindowOS2::CreateFrame( const wxString& rsTitle,
|
|||||||
//
|
//
|
||||||
if (nWidth == (int)CW_USEDEFAULT)
|
if (nWidth == (int)CW_USEDEFAULT)
|
||||||
{
|
{
|
||||||
//
|
//
|
||||||
// The exact number doesn't matter, the dialog will be resized
|
// The exact number doesn't matter, the dialog will be resized
|
||||||
// again soon anyhow but it should be big enough to allow
|
// again soon anyhow but it should be big enough to allow
|
||||||
// calculation relying on "totalSize - clientSize > 0" work, i.e.
|
// calculation relying on "totalSize - clientSize > 0" work, i.e.
|
||||||
|
@ -512,7 +512,7 @@ void wxWindowOS2::Lower()
|
|||||||
|
|
||||||
void wxWindowOS2::SetLabel( const wxString& label )
|
void wxWindowOS2::SetLabel( const wxString& label )
|
||||||
{
|
{
|
||||||
::WinSetWindowText(GetHwnd(), (PSZ)label.c_str());
|
::WinSetWindowText(GetHwnd(), label.c_str());
|
||||||
} // end of wxWindowOS2::SetLabel
|
} // end of wxWindowOS2::SetLabel
|
||||||
|
|
||||||
wxString wxWindowOS2::GetLabel() const
|
wxString wxWindowOS2::GetLabel() const
|
||||||
@ -1681,7 +1681,7 @@ void wxWindowOS2::GetTextExtent( const wxString& rString,
|
|||||||
l = rString.length();
|
l = rString.length();
|
||||||
if (l > 0L)
|
if (l > 0L)
|
||||||
{
|
{
|
||||||
pStr = (PCH)rString.c_str();
|
pStr = rString.char_str();
|
||||||
|
|
||||||
//
|
//
|
||||||
// In world coordinates.
|
// In world coordinates.
|
||||||
@ -2971,8 +2971,8 @@ bool wxWindowOS2::OS2Create( PSZ zClass,
|
|||||||
sClassName += wxT("NR");
|
sClassName += wxT("NR");
|
||||||
}
|
}
|
||||||
m_hWnd = (WXHWND)::WinCreateWindow( (HWND)OS2GetParent()
|
m_hWnd = (WXHWND)::WinCreateWindow( (HWND)OS2GetParent()
|
||||||
,(PSZ)sClassName.c_str()
|
,sClassName.c_str()
|
||||||
,(PSZ)(zTitle ? zTitle : wxEmptyString)
|
,(zTitle ? zTitle : wxEmptyString)
|
||||||
,(ULONG)dwStyle
|
,(ULONG)dwStyle
|
||||||
,(LONG)0L
|
,(LONG)0L
|
||||||
,(LONG)0L
|
,(LONG)0L
|
||||||
|
Loading…
Reference in New Issue
Block a user