]> git.saurik.com Git - wxWidgets.git/blobdiff - src/os2/gauge.cpp
compilation fix for wxUSE_TOOLTIPS=0 (i.e. wxUniv)
[wxWidgets.git] / src / os2 / gauge.cpp
index b7700f4147cbf29e2a47ea18f36c0bc5305aaf63..e12f17230431c2e0fef5361da4b9629e50470f4c 100644 (file)
@@ -156,15 +156,6 @@ bool wxGauge::Create(
     if (m_windowStyle & wxCLIP_SIBLINGS)
         lMsStyle |= WS_CLIPSIBLINGS;
 
-    //
-    // If the parent is a scrolled window the controls must
-    // have this style or they will overlap the scrollbars
-    //
-    if (pParent)
-        if (pParent->IsKindOf(CLASSINFO(wxScrolledWindow)) ||
-            pParent->IsKindOf(CLASSINFO(wxGenericScrolledWindow)))
-            lMsStyle |= WS_CLIPSIBLINGS;
-
     m_hWnd = (WXHWND)::WinCreateWindow( (HWND)GetHwndOf(pParent) // Parent window handle
                                        ,WC_ENTRYFIELD            // Window class
                                        ,(PSZ)NULL                // Initial Text
@@ -185,7 +176,12 @@ bool wxGauge::Create(
     ::WinQueryWindowPos(m_hWnd, &vSwp);
     SetXComp(vSwp.x);
     SetYComp(vSwp.y);
-    SetFont(pParent->GetFont());
+    wxFont*                          pTextFont = new wxFont( 10
+                                                            ,wxMODERN
+                                                            ,wxNORMAL
+                                                            ,wxNORMAL
+                                                           );
+    SetFont(*pTextFont);
     if (nWidth == -1L)
         nWidth = 50L;
     if (nHeight == -1L)
@@ -196,6 +192,7 @@ bool wxGauge::Create(
             ,nHeight
            );
     ::WinShowWindow((HWND)GetHWND(), TRUE);
+    delete pTextFont;
     return TRUE;
 } // end of wxGauge::Create