wxCHECK_RET( IsValid(nItem), wxT("invalid radiobox index") );
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
bool wxRadioBox::SetStringSelection(const wxString& rsStr)
{
long lVal;
- lVal = atol((char*)rsText.c_str());
+ lVal = atol(rsText.c_str());
wxSpinButton::SetValue(lVal);
} // end of wxSpinCtrl::SetValue
m_labelOrig = rsLabel; // save original label
// 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
void wxStaticText::DoSetLabel(const wxString& str)
{
wxString sLabel = ::wxPMTextToLabel(str);
- ::WinSetWindowText(GetHwnd(), (PSZ)sLabel.c_str());
+ ::WinSetWindowText(GetHwnd(), sLabel.c_str());
}
wxString wxStaticText::DoGetLabel() const
{
m_hWnd = (WXHWND)::WinCreateWindow( (HWND)GetHwndOf(pParent) // Parent window handle
,WC_MLE // Window class
- ,(PSZ)rsValue.c_str() // Initial Text
+ ,rsValue.c_str() // Initial Text
,(ULONG)lSstyle // Style flags
,(LONG)0 // X pos of origin
,(LONG)0 // Y pos of origin
{
m_hWnd = (WXHWND)::WinCreateWindow( (HWND)GetHwndOf(pParent) // Parent window handle
,WC_ENTRYFIELD // Window class
- ,(PSZ)rsValue.c_str() // Initial Text
+ ,rsValue.c_str() // Initial Text
,(ULONG)lSstyle // Style flags
,(LONG)0 // X pos of origin
,(LONG)0 // Y pos of origin
wxString wxTextCtrl::GetValue() const
{
wxString sStr = wxGetWindowText(GetHWND());
- char* zStr = (char*)sStr.c_str();
+ char* zStr = sStr.char_str();
for ( ; *zStr; zStr++ )
{
if (*zStr == '\r')
*zStr = '\n';
}
- return sStr;
+ return zStr;
} // end of wxTextCtrl::GetValue
void wxTextCtrl::DoSetValue(
if ( flags & SetValue_SendEvent )
m_bSkipUpdate = true;
- ::WinSetWindowText(GetHwnd(), (PSZ)rsValue.c_str());
+ ::WinSetWindowText(GetHwnd(), rsValue.c_str());
AdjustSpaceLimit();
}
} // end of wxTextCtrl::SetValue
)
{
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
- ::WinSetWindowText(GetHwnd(), (PSZ)rsValue.c_str());
+ ::WinSetWindowText(GetHwnd(), rsValue.c_str());
AdjustSpaceLimit();
} // end of wxTextCtrl::WriteText
}
if (uLen >= uLimit)
{
- uLimit = uLen + 0x8000; // 32Kb
- if (uLimit > 0xffff)
+ if (m_bIsMLE)
{
- uLimit = 0L;
+ uLimit = uLen + 0x8000; // 32Kb
+ if (uLimit > 0xffff)
+ {
+ uLimit = 0L;
+ }
}
+ else
+ uLimit = 0x7fff;
+
if (m_bIsMLE)
::WinSendMsg(GetHwnd(), MLM_SETTEXTLIMIT, MPFROMLONG(uLimit), 0);
else
m_hWnd = ::WinCreateWindow( HWND_DESKTOP
,WC_ENTRYFIELD
- ,(PSZ)rsTip.c_str()
+ ,rsTip.c_str()
,lStyle
,0, 0, 0, 0
,NULLHANDLE
hFrame = ::WinCreateStdWindow( hParent
,ulStyleFlags // frame-window style
,(PULONG)&lFlags // window style
- ,(PSZ)wxFrameClassName // class name
- ,(PSZ)rsTitle.c_str() // window title
+ ,wxFrameClassName // class name
+ ,rsTitle.c_str() // window title
,0L // default client style
,NULLHANDLE // resource in executable file
,0 // resource id
//
if (nWidth == (int)CW_USEDEFAULT)
{
- //
+ //
// The exact number doesn't matter, the dialog will be resized
// again soon anyhow but it should be big enough to allow
// calculation relying on "totalSize - clientSize > 0" work, i.e.
void wxWindowOS2::SetLabel( const wxString& label )
{
- ::WinSetWindowText(GetHwnd(), (PSZ)label.c_str());
+ ::WinSetWindowText(GetHwnd(), label.c_str());
} // end of wxWindowOS2::SetLabel
wxString wxWindowOS2::GetLabel() const
l = rString.length();
if (l > 0L)
{
- pStr = (PCH)rString.c_str();
+ pStr = rString.char_str();
//
// In world coordinates.
sClassName += wxT("NR");
}
m_hWnd = (WXHWND)::WinCreateWindow( (HWND)OS2GetParent()
- ,(PSZ)sClassName.c_str()
- ,(PSZ)(zTitle ? zTitle : wxEmptyString)
+ ,sClassName.c_str()
+ ,(zTitle ? zTitle : wxEmptyString)
,(ULONG)dwStyle
,(LONG)0L
,(LONG)0L