]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/statbox.cpp
fixes for new lib dirs for wxMSW
[wxWidgets.git] / src / msw / statbox.cpp
index a713c99cb5ea89aaa78f5389fedcbf12241cfe7b..2f99119dfba617a50ed1db687b70a6c076e24593 100644 (file)
@@ -5,8 +5,8 @@
 // Modified by:
 // Created:     04/01/98
 // RCS-ID:      $Id$
-// Copyright:   (c) Julian Smart and Markus Holzem
-// Licence:     wxWindows license
+// Copyright:   (c) Julian Smart
+// Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
 // ============================================================================
@@ -17,7 +17,7 @@
 // headers
 // ----------------------------------------------------------------------------
 
-#ifdef __GNUG__
+#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
     #pragma implementation "statbox.h"
 #endif
 
 // wxWin macros
 // ----------------------------------------------------------------------------
 
+#if wxUSE_EXTENDED_RTTI
+IMPLEMENT_DYNAMIC_CLASS_XTI(wxStaticBox, wxControl,"wx/statbox.h")
+
+WX_BEGIN_PROPERTIES_TABLE(wxStaticBox)
+       WX_PROPERTY( Label,wxString, SetLabel, GetLabel, wxEmptyString , 0 /*flags*/ , wxT("Helpstring") , wxT("group"))
+/*
+       TODO PROPERTIES :
+               label
+*/
+WX_END_PROPERTIES_TABLE()
+
+WX_BEGIN_HANDLERS_TABLE(wxStaticBox)
+WX_END_HANDLERS_TABLE()
+
+WX_CONSTRUCTOR_6( wxStaticBox , wxWindow* , Parent , wxWindowID , Id , wxString , Label , wxPoint , Position , wxSize , Size , long , WindowStyle ) 
+#else
 IMPLEMENT_DYNAMIC_CLASS(wxStaticBox, wxControl)
+#endif
 
 // ============================================================================
 // implementation
@@ -76,9 +93,17 @@ bool wxStaticBox::Create(wxWindow *parent,
     //        after removing WS_EX_TRANSPARENT bit) and so let's use it until
     //        we fix the real underlying problem
     if ( !MSWCreateControl(wxT("BUTTON"), BS_GROUPBOX, pos, size, label,
-                           WS_EX_TRANSPARENT) )
+#ifdef __WXWINCE__
+        0
+#else
+        WS_EX_TRANSPARENT
+#endif
+                           ) )
         return FALSE;
 
+    // to be transparent we should have the same colour as the parent as well
+    SetBackgroundColour(GetParent()->GetBackgroundColour());
+
     return TRUE;
 }
 
@@ -100,6 +125,7 @@ long wxStaticBox::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam)
 {
     switch ( nMsg )
     {
+#ifndef __WXWINCE__
         case WM_NCHITTEST:
             // FIXME: this hack is specific to dialog ed, shouldn't it be
             //        somehow disabled during normal operation?
@@ -115,7 +141,7 @@ long wxStaticBox::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam)
                     return (long)HTCLIENT;
             }
             break;
-
+#endif
         case WM_ERASEBKGND:
             // prevent wxControl from processing this message because it will
             // erase the background incorrectly and there is no way for us to