]> git.saurik.com Git - wxWidgets.git/blobdiff - src/os2/gauge.cpp
reenabled WS_EX_CONTROLPARENT style together with a check that the focus window is...
[wxWidgets.git] / src / os2 / gauge.cpp
index c1fe612f6c8c1bd3a4a479801be38f572450dd76..e12f17230431c2e0fef5361da4b9629e50470f4c 100644 (file)
@@ -14,6 +14,7 @@
 #ifndef WX_PRECOMP
 #include "wx/defs.h"
 #include "wx/utils.h"
 #ifndef WX_PRECOMP
 #include "wx/defs.h"
 #include "wx/utils.h"
+#include "wx/scrolwin.h"
 #endif
 
 #include "wx/os2/private.h"
 #endif
 
 #include "wx/os2/private.h"
@@ -155,8 +156,6 @@ bool wxGauge::Create(
     if (m_windowStyle & wxCLIP_SIBLINGS)
         lMsStyle |= WS_CLIPSIBLINGS;
 
     if (m_windowStyle & wxCLIP_SIBLINGS)
         lMsStyle |= WS_CLIPSIBLINGS;
 
-
-
     m_hWnd = (WXHWND)::WinCreateWindow( (HWND)GetHwndOf(pParent) // Parent window handle
                                        ,WC_ENTRYFIELD            // Window class
                                        ,(PSZ)NULL                // Initial Text
     m_hWnd = (WXHWND)::WinCreateWindow( (HWND)GetHwndOf(pParent) // Parent window handle
                                        ,WC_ENTRYFIELD            // Window class
                                        ,(PSZ)NULL                // Initial Text
@@ -177,7 +176,12 @@ bool wxGauge::Create(
     ::WinQueryWindowPos(m_hWnd, &vSwp);
     SetXComp(vSwp.x);
     SetYComp(vSwp.y);
     ::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)
     if (nWidth == -1L)
         nWidth = 50L;
     if (nHeight == -1L)
@@ -188,6 +192,7 @@ bool wxGauge::Create(
             ,nHeight
            );
     ::WinShowWindow((HWND)GetHWND(), TRUE);
             ,nHeight
            );
     ::WinShowWindow((HWND)GetHWND(), TRUE);
+    delete pTextFont;
     return TRUE;
 } // end of wxGauge::Create
 
     return TRUE;
 } // end of wxGauge::Create