- wxString curLine;
- long height, width, heightTextMax = 0, widthTextMax = 0;
- for ( const wxChar *pc = message; ; pc++ )
- {
- if ( *pc == _T('\n') || !*pc )
- {
-#if defined(__VISAGECPP__)
-// have two versions of this in wxWindowDC tp avoid function hiding
-// since there are two of these in wxDCBase, and in turn in wxDC.
-// VA cannot resolve this so:
- dc.GetTextExtent(curLine, &width, &height, NULL, NULL, NULL, FALSE);
-#else
- dc.GetTextExtent(curLine, &width, &height);
+ // 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);