]> git.saurik.com Git - wxWidgets.git/blobdiff - src/os2/statline.cpp
fixing osx_carbon
[wxWidgets.git] / src / os2 / statline.cpp
index effb7de3505bfb725eeb0410f82adc36711208b4..62562b26e01521c7a1759936174092d3a8717a62 100644 (file)
@@ -1,5 +1,5 @@
 /////////////////////////////////////////////////////////////////////////////
 /////////////////////////////////////////////////////////////////////////////
-// Name:        msw/statline.cpp
+// Name:        src/os2/statline.cpp
 // Purpose:     OS2 version of wxStaticLine class
 // Author:      David Webster
 // Created:     10/23/99
 // Purpose:     OS2 version of wxStaticLine class
 // Author:      David Webster
 // Created:     10/23/99
 // headers
 // ----------------------------------------------------------------------------
 
 // headers
 // ----------------------------------------------------------------------------
 
-#ifdef __GNUG__
-    #pragma implementation "statline.h"
-#endif
-
 // For compilers that support precompilation, includes "wx.h".
 #include "wx/wxprec.h"
 
 // For compilers that support precompilation, includes "wx.h".
 #include "wx/wxprec.h"
 
+#if wxUSE_STATLINE
+
 #include "wx/statline.h"
 
 #include "wx/statline.h"
 
-#if wxUSE_STATLINE
+#ifndef WX_PRECOMP
+    #include "wx/log.h"
+#endif
 
 #include "wx/os2/private.h"
 
 #include "wx/os2/private.h"
-#include "wx/log.h"
 
 // ============================================================================
 // implementation
 // ============================================================================
 
 
 // ============================================================================
 // implementation
 // ============================================================================
 
-IMPLEMENT_DYNAMIC_CLASS(wxStaticLine, wxControl)
-
 // ----------------------------------------------------------------------------
 // wxStaticLine
 // ----------------------------------------------------------------------------
 // ----------------------------------------------------------------------------
 // wxStaticLine
 // ----------------------------------------------------------------------------
@@ -60,12 +57,26 @@ bool wxStaticLine::Create(
                         ,rsName
                        ))
         return FALSE;
                         ,rsName
                        ))
         return FALSE;
-    return OS2CreateControl( _T("STATIC")
-                            ,_T("")
-                            ,rPos
-                            ,vSize
-                            ,lStyle
-                           );
+    if (!OS2CreateControl( wxT("STATIC")
+                          ,SS_FGNDFRAME
+                          ,rPos
+                          ,rSize
+                          ,rsName
+                         ))
+        return FALSE;
+
+    wxColour                        vColour;
+
+    vColour.Set(wxString(wxT("GREY")));
+
+    LONG                            lColor = (LONG)vColour.GetPixel();
+
+    ::WinSetPresParam( m_hWnd
+                      ,PP_FOREGROUNDCOLOR
+                      ,sizeof(LONG)
+                      ,(PVOID)&lColor
+                     );
+    return TRUE;
 } // end of wxStaticLine::Create
 
 WXDWORD wxStaticLine::OS2GetStyle(
 } // end of wxStaticLine::Create
 
 WXDWORD wxStaticLine::OS2GetStyle(