]> git.saurik.com Git - wxWidgets.git/blobdiff - src/palmos/dialog.cpp
ensure that gsockmsw.obj is linked in, it was optimized away by MSVC linker resulting...
[wxWidgets.git] / src / palmos / dialog.cpp
index 88c4620e43f08ac371ffeaa8133ee4afe6e1d3c9..c368c78f564da6d59423646e858ff3fa7f373d6e 100644 (file)
@@ -147,11 +147,14 @@ bool wxDialog::Create(wxWindow *parent,
                       long style,
                       const wxString& name)
 {
-    return false;
+    if ( !wxTopLevelWindow::Create(parent, id, title, pos, size, style, name) )
+        return false;
+    return true;
 }
 
 wxDialog::~wxDialog()
 {
+    Show (false);
 }
 
 // ----------------------------------------------------------------------------
@@ -165,7 +168,10 @@ wxWindow *wxDialog::FindSuitableParent() const
 
 bool wxDialog::Show(bool show)
 {
-    return false;
+    if (show && CanDoLayoutAdaptation())
+        DoLayoutAdaptation();
+
+    return wxTopLevelWindowPalm::Show (show);
 }
 
 void wxDialog::Raise()
@@ -175,6 +181,12 @@ void wxDialog::Raise()
 // show dialog modally
 int wxDialog::ShowModal()
 {
+    if (show && CanDoLayoutAdaptation())
+        DoLayoutAdaptation();
+
+    if (errNone == FrmDoDialog ((FormType *)wxTopLevelWindow::GetForm())) {
+        return 0;
+    }
     return -1;
 }