]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/resource.cpp
Reworked the undef stuff a little
[wxWidgets.git] / src / common / resource.cpp
index 5fd8860ea34cbcfa70c91520233fb0735be2d1b2..8c9d706d436163c0dca0c6269ec4ad4401115a7b 100644 (file)
@@ -651,6 +651,9 @@ wxItemResource *wxResourceInterpretDialog(wxResourceTable& table, wxExpr *expr,
   }
   dialogItem->SetStyle(windowStyle);
   dialogItem->SetValue1(isModal);
+  if (windowStyle & wxDIALOG_MODAL) // Uses style in wxWin 2
+    dialogItem->SetValue1(TRUE);
+
   dialogItem->SetName(name);
   dialogItem->SetTitle(title);
   dialogItem->SetSize(x, y, width, height);
@@ -1893,6 +1896,9 @@ static wxResourceBitListStruct wxResourceBitListTable[] =
   { _T("wxTB_VERTICAL"), wxTB_VERTICAL},
   { _T("wxTB_FLAT"), wxTB_FLAT},
 
+  /* wxDialog */
+  { _T("wxDIALOG_MODAL"), wxDIALOG_MODAL },
+
   /* Generic */
   { _T("wxVSCROLL"), wxVSCROLL },
   { _T("wxHSCROLL"), wxHSCROLL },
@@ -2846,7 +2852,7 @@ bool wxResourceParseString(char *s, wxResourceTable *table)
  * resource loading facility
  */
 
-bool wxWindow::LoadFromResource(wxWindow *parent, const wxString& resourceName, const wxResourceTable *table)
+bool wxWindowBase::LoadFromResource(wxWindow *parent, const wxString& resourceName, const wxResourceTable *table)
 {
   if (!table)
     table = wxDefaultResourceTable;
@@ -2885,7 +2891,7 @@ bool wxWindow::LoadFromResource(wxWindow *parent, const wxString& resourceName,
   }
   else
   {
-    if (!this->Create(parent, -1, wxPoint(x, y), wxSize(width, height), theWindowStyle, name))
+    if (!((wxWindow *)this)->Create(parent, -1, wxPoint(x, y), wxSize(width, height), theWindowStyle, name))
       return FALSE;
   }
 
@@ -2932,7 +2938,7 @@ bool wxWindow::LoadFromResource(wxWindow *parent, const wxString& resourceName,
   return TRUE;
 }
 
-wxControl *wxWindow::CreateItem(const wxItemResource *resource, const wxItemResource* parentResource, const wxResourceTable *table)
+wxControl *wxWindowBase::CreateItem(const wxItemResource *resource, const wxItemResource* parentResource, const wxResourceTable *table)
 {
   if (!table)
     table = wxDefaultResourceTable;