]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mac/carbon/statlmac.cpp
simplify OnActivate menubar install code
[wxWidgets.git] / src / mac / carbon / statlmac.cpp
index cf9f999fa0e3dd1bf1236a4ab59182e00ed5b0c9..359893d527e5c1515f6d7e3df7e34377cc256660 100644 (file)
 // headers
 // ----------------------------------------------------------------------------
 
-#ifdef __GNUG__
-    #pragma implementation "statline.h"
-#endif
-
 // For compilers that support precompilation, includes "wx.h".
 #include "wx/wxprec.h"
 
+#if wxUSE_STATLINE
+
 #ifdef __BORLANDC__
     #pragma hdrstop
 #endif
@@ -56,10 +54,12 @@ bool wxStaticLine::Create( wxWindow *parent,
         return false;
 
     Rect bounds = wxMacGetBoundsForControl( this , pos , size ) ;
-    m_peer = new wxMacControl() ;
-    verify_noerr(CreateSeparatorControl(MAC_WXHWND(parent->MacGetTopLevelWindowRef()),&bounds, *m_peer ) ) ;  
+    m_peer = new wxMacControl(this) ;
+    verify_noerr(CreateSeparatorControl(MAC_WXHWND(parent->MacGetTopLevelWindowRef()),&bounds, m_peer->GetControlRefAddr() ) ) ;  
 
     MacPostControlCreate(pos,size) ;
 
     return TRUE;
 }
+
+#endif //wxUSE_STATLINE