-///////////////////////////////////////////////////////////////////
-// New dialog box implementations
-
-// Split message, using constraints to position controls
-wxSize wxSplitMessage2( const wxString &message, wxWindow *parent, int text_pos_x )
-{
- int y = 15;
- int w = 50;
- wxString line( _T("") );
- for (uint pos = 0; pos < message.Len(); pos++)
- {
- if (message[pos] == _T('\n'))
- {
- if (!line.IsEmpty())
- {
- wxStaticText *s1 = new wxStaticText( parent, -1, line, wxPoint(text_pos_x,y) );
- wxSize size1( s1->GetSize() );
- if (size1.x > w) w = size1.x;
- line = _T("");
- }
- y += 18;
- }
- else
- {
- line += message[pos];
- }
- }
-
- if (!line.IsEmpty())
- {
- wxStaticText *s2 = new wxStaticText( parent, -1, line, wxPoint(text_pos_x,y) );
- wxSize size2( s2->GetSize() );
- if (size2.x > w) w = size2.x;
- }
-
- y += 18;
-
- return wxSize(w+15+text_pos_x,y);
-}