+void wxSlider::AdjustSubControls(
+ int nX
+, int nY
+, int nWidth
+, int nHeight
+, int nSizeFlags
+)
+{
+ SWP vSwp;
+ int nXOffset = nX;
+ int nYOffset = nY;
+ int nCx; // slider,min,max sizes
+ int nCy;
+ int nCyf;
+ char zBuf[300];
+
+ wxGetCharSize( GetHWND()
+ ,&nCx
+ ,&nCy
+ ,&this->GetFont()
+ );
+
+ if ((m_windowStyle & wxSL_VERTICAL) != wxSL_VERTICAL)
+ {
+ if (m_windowStyle & wxSL_LABELS )
+ {
+ int nMinLen = 0;
+ int nMaxLen = 0;
+
+ ::WinQueryWindowText((HWND)m_hStaticMin, 300, zBuf);
+ GetTextExtent(zBuf, &nMinLen, &nCyf, NULL, NULL, &this->GetFont());
+
+ ::WinQueryWindowText((HWND)m_hStaticMax, 300, zBuf);
+ GetTextExtent(zBuf, &nMaxLen, &nCyf, NULL, NULL, &this->GetFont());
+
+ if (m_hStaticValue)
+ {
+ int nNewWidth = wxMax(nMinLen, nMaxLen);
+ int nValueHeight = nCyf;
+
+ ::WinSetWindowPos( (HWND)m_hStaticValue
+ ,HWND_TOP
+ ,(LONG)nXOffset - (nNewWidth + nCx + nMinLen + nCx)
+ ,(LONG)nYOffset
+ ,(LONG)nNewWidth
+ ,(LONG)nValueHeight
+ ,SWP_ZORDER | SWP_SIZE | SWP_MOVE | SWP_SHOW
+ );
+ }
+ ::WinSetWindowPos( (HWND)m_hStaticMin
+ ,HWND_TOP
+ ,(LONG)nXOffset - (nMinLen + nCx)
+ ,(LONG)nYOffset
+ ,(LONG)nMinLen
+ ,(LONG)nCy
+ ,SWP_ZORDER | SWP_SIZE | SWP_MOVE | SWP_SHOW
+ );
+ nXOffset += nWidth + nCx;
+
+ ::WinSetWindowPos( (HWND)m_hStaticMax
+ ,HWND_TOP
+ ,(LONG)nXOffset
+ ,(LONG)nYOffset
+ ,(LONG)nMaxLen
+ ,(LONG)nCy
+ ,SWP_ZORDER | SWP_SIZE | SWP_MOVE | SWP_SHOW
+ );
+ }
+ }
+ //
+ // Now deal with a vertical slider -- OS/2 doesn't have vertical sliders
+ //
+} // end of wxSlider::AdjustSubControls
+