+ // the dialogs have this flag on by default to prevent the events from the
+ // dialog controls from reaching the parent frame which is usually
+ // undesirable and can lead to unexpected and hard to find bugs
+ SetExtraStyle(GetExtraStyle() | wxWS_EX_BLOCK_EVENTS);
+
+#ifdef wxTopLevelWindowNative // FIXME - temporary hack, should be always used!
+ m_container.SetContainerWindow(this);
+#endif
+}
+
+#if wxUSE_STATTEXT // && wxUSE_TEXTCTRL
+
+wxSizer *wxDialogBase::CreateTextSizer( const wxString& message )
+{
+ bool is_pda = (wxSystemSettings::GetScreenType() <= wxSYS_SCREEN_PDA);
+
+ wxString text = message;
+
+ // I admit that this is complete bogus, but it makes
+ // message boxes work for pda screens temporarily..
+ int max_width = -1;
+ if (is_pda)
+ {
+ max_width = wxSystemSettings::GetMetric( wxSYS_SCREEN_X ) - 25;
+ text += wxT('\n');
+ }
+
+
+ wxBoxSizer *box = new wxBoxSizer( wxVERTICAL );
+
+ // get line height for empty lines
+ int y = 0;
+ wxFont font( GetFont() );
+ if (!font.Ok())
+ font = *wxSWISS_FONT;
+ GetTextExtent( wxT("H"), (int*)NULL, &y, (int*)NULL, (int*)NULL, &font);
+
+ size_t last_space = 0;