-extern void wxSplitMessage2(const char *message, wxList *messageList, wxWindow *parent, wxRowColSizer *sizer);
+// Split message, using constraints to position controls
+static void wxSplitMessage2(const wxChar *message, wxList *messageList, wxWindow *parent, wxRowColSizer *sizer)
+{
+ wxChar *copyMessage = copystring(message);
+ size_t i = 0;
+ size_t len = wxStrlen(copyMessage);
+ wxChar *currentMessage = copyMessage;
+
+// wxWindow *lastWindow = parent;
+
+ while (i < len) {
+ while ((i < len) && (copyMessage[i] != _T('\n'))) i++;
+ if (i < len) copyMessage[i] = 0;
+ wxStaticText *mess = new wxStaticText(parent, -1, currentMessage);
+
+/*
+ wxLayoutConstraints *c = new wxLayoutConstraints;
+ c->left.SameAs (parent, wxLeft, 10);
+ c->top.SameAs (lastWindow, wxBottom, 5);
+ c->right.AsIs ();
+ c->height.AsIs ();
+
+ mess->SetConstraints(c);
+*/
+ sizer->AddSizerChild(mess);
+
+ messageList->Append(mess);
+
+ currentMessage = copyMessage + i + 1;
+ }
+ delete[] copyMessage;
+}