#include <wx/scrolwin.h>
#endif
+#if wxUSE_SLIDER
+
#include "wx/slider.h"
#include "wx/os2/private.h"
int nCy;
int nCyf;
char zBuf[300];
+ wxFont vFont = this->GetFont();
wxGetCharSize( GetHWND()
,&nCx
,&nCy
- ,&this->GetFont()
+ ,&vFont
);
if ((m_windowStyle & wxSL_VERTICAL) != wxSL_VERTICAL)
int nMaxLen = 0;
::WinQueryWindowText((HWND)m_hStaticMin, 300, zBuf);
- GetTextExtent(zBuf, &nMinLen, &nCyf, NULL, NULL, &this->GetFont());
+ GetTextExtent(zBuf, &nMinLen, &nCyf, NULL, NULL, &vFont);
::WinQueryWindowText((HWND)m_hStaticMax, 300, zBuf);
- GetTextExtent(zBuf, &nMaxLen, &nCyf, NULL, NULL, &this->GetFont());
+ GetTextExtent(zBuf, &nMaxLen, &nCyf, NULL, NULL, &vFont);
if (m_hStaticValue)
{
int nMaxLen = 0;
::WinQueryWindowText((HWND)m_hStaticMin, 300, zBuf);
- GetTextExtent(zBuf, &nMinLen, &nCyf, NULL, NULL, &this->GetFont());
+ GetTextExtent(zBuf, &nMinLen, &nCyf, NULL, NULL, &vFont);
::WinQueryWindowText((HWND)m_hStaticMax, 300, zBuf);
- GetTextExtent(zBuf, &nMaxLen, &nCyf, NULL, NULL, &this->GetFont());
+ GetTextExtent(zBuf, &nMaxLen, &nCyf, NULL, NULL, &vFont);
if (m_hStaticValue)
{
,(PVOID)&lColor
);
SetValue(nValue);
- return TRUE;
+ return true;
} // end of wxSlider::Create
void wxSlider::DoSetSize(
int nCurrentX;
int nCurrentY;
char zBuf[300];
+ wxFont vFont = this->GetFont();
//
// Adjust for OS/2's reverse coordinate system
wxGetCharSize( GetHWND()
,&nCx
,&nCy
- ,&this->GetFont()
+ ,&vFont
);
if ((m_windowStyle & wxSL_VERTICAL) != wxSL_VERTICAL)
int nMaxLen = 0;
::WinQueryWindowText((HWND)m_hStaticMin, 300, zBuf);
- GetTextExtent(zBuf, &nMinLen, &nCyf, NULL, NULL, &this->GetFont());
+ GetTextExtent(zBuf, &nMinLen, &nCyf, NULL, NULL, &vFont);
::WinQueryWindowText((HWND)m_hStaticMax, 300, zBuf);
- GetTextExtent(zBuf, &nMaxLen, &nCyf, NULL, NULL, &this->GetFont());
+ GetTextExtent(zBuf, &nMaxLen, &nCyf, NULL, NULL, &vFont);
if (m_hStaticValue)
{
int nMaxLen;
::WinQueryWindowText((HWND)m_hStaticMin, 300, zBuf);
- GetTextExtent(zBuf, &nMinLen, &nCyf, NULL, NULL, &this->GetFont());
+ GetTextExtent(zBuf, &nMinLen, &nCyf, NULL, NULL, &vFont);
::WinQueryWindowText((HWND)m_hStaticMax, 300, zBuf);
- GetTextExtent(zBuf, &nMaxLen, &nCyf, NULL, NULL, &this->GetFont());
+ GetTextExtent(zBuf, &nMaxLen, &nCyf, NULL, NULL, &vFont);
if (m_hStaticValue)
{
int nNewWidth = wxMax(nMinLen, nMaxLen);
break;
default:
- return FALSE;
+ return false;
}
int nPixelRange = SHORT1FROMMR(::WinSendMsg( GetHwnd()
//
// Out of range - but we did process it
//
- return TRUE;
+ return true;
}
SetValue(nNewPos);
::WinShowWindow((HWND)m_hStaticMin, bShow);
if(m_hStaticMax)
::WinShowWindow((HWND)m_hStaticMax, bShow);
- return TRUE;
+ return true;
} // end of wxSlider::Show
+#endif // wxUSE_SLIDER