]> git.saurik.com Git - wxWidgets.git/blobdiff - src/cocoa/statbox.mm
removed Win16 code (patch 905241), last version with remains of Win16 support tagged...
[wxWidgets.git] / src / cocoa / statbox.mm
index a54fc3fb4faa055ba5dc811ac4f97afd629cfe30..202608a7be39548cbd6dc8fa948cd34782474686 100644 (file)
@@ -16,6 +16,7 @@
 #endif //WX_PRECOMP
 
 #include "wx/cocoa/autorelease.h"
+#include "wx/cocoa/string.h"
 
 #import <AppKit/NSBox.h>
 #import <Foundation/NSString.h>
@@ -37,7 +38,7 @@ bool wxStaticBox::Create(wxWindow *parent, wxWindowID winid,
         return false;
     m_cocoaNSView = NULL;
     SetNSBox([[NSBox alloc] initWithFrame:MakeDefaultNSRect(size)]);
-    [GetNSBox() setTitle:[NSString stringWithCString:title.c_str()]];
+    [GetNSBox() setTitle:wxNSStringWithWxString(wxStripMenuCodes(title))];
     if(m_parent)
         m_parent->CocoaAddChild(this);
     SetInitialFrameRect(pos,size);
@@ -47,7 +48,7 @@ bool wxStaticBox::Create(wxWindow *parent, wxWindowID winid,
 
 wxStaticBox::~wxStaticBox()
 {
-    DisassociateNSBox(m_cocoaNSView);
+    DisassociateNSBox(GetNSBox());
 }
 
 void wxStaticBox::GetBordersForSizer(int *borderTop, int *borderOther) const