m_windowStyle = style;
m_tickFreq = 0;
- int x = pos.x;
- int y = pos.y;
- int width = size.x;
- int height = size.y;
-
long msStyle = 0;
long wstyle = 0;
}
}
- SetSize(x, y, width, height);
+ SetSize(pos.x, pos.y, size.x, size.y);
SetValue(value);
+ // SetInitialBestSize is not called since we don't call MSWCreateControl
+ // for this control, so call SetBestSize here instead.
+ SetBestSize(size);
+
return TRUE;
}
int cy;
int cyf;
- wxGetCharSize(GetHWND(), &cx, &cy, & this->GetFont());
+ wxGetCharSize(GetHWND(), &cx, &cy, this->GetFont());
if ((m_windowStyle & wxSL_VERTICAL) != wxSL_VERTICAL)
{
int min_len = 0;
::GetWindowText((HWND) m_staticMin, buf, 300);
- GetTextExtent(buf, &min_len, &cyf,NULL,NULL, & this->GetFont());
+ GetTextExtent(buf, &min_len, &cyf);
int max_len = 0;
::GetWindowText((HWND) m_staticMax, buf, 300);
- GetTextExtent(buf, &max_len, &cyf,NULL,NULL, & this->GetFont());
+ GetTextExtent(buf, &max_len, &cyf);
if (m_staticValue)
{
int new_width = (int)(wxMax(min_len, max_len));
{
int min_len;
::GetWindowText((HWND) m_staticMin, buf, 300);
- GetTextExtent(buf, &min_len, &cyf,NULL,NULL, & this->GetFont());
+ GetTextExtent(buf, &min_len, &cyf);
int max_len;
::GetWindowText((HWND) m_staticMax, buf, 300);
- GetTextExtent(buf, &max_len, &cyf,NULL,NULL, & this->GetFont());
+ GetTextExtent(buf, &max_len, &cyf);
if (m_staticValue)
{
int min_len = 0;
int max_len = 0;
- wxGetCharSize(GetHWND(), &cx, &cy, & this->GetFont());
+ wxGetCharSize(GetHWND(), &cx, &cy, this->GetFont());
if ( !HasFlag(wxSL_VERTICAL))
{
if (HasFlag(wxSL_LABELS)) // do we need to add more for the labels?
{
::GetWindowText((HWND) m_staticMin, buf, 300);
- GetTextExtent(buf, &min_len, &cyf,NULL,NULL, & this->GetFont());
+ GetTextExtent(buf, &min_len, &cyf);
rv.x += min_len + cx;
::GetWindowText((HWND) m_staticMax, buf, 300);
- GetTextExtent(buf, &max_len, &cyf,NULL,NULL, & this->GetFont());
+ GetTextExtent(buf, &max_len, &cyf);
rv.x += max_len + cx;
if (m_staticValue)
if (HasFlag(wxSL_LABELS)) // do we need to add more for the labels?
{
::GetWindowText((HWND) m_staticMin, buf, 300);
- GetTextExtent(buf, &min_len, &cyf,NULL,NULL, & this->GetFont());
+ GetTextExtent(buf, &min_len, &cyf);
rv.y += cy;
::GetWindowText((HWND) m_staticMax, buf, 300);
- GetTextExtent(buf, &max_len, &cyf,NULL,NULL, & this->GetFont());
+ GetTextExtent(buf, &max_len, &cyf);
rv.y += cy;
if (m_staticValue)