- wxDialog *dialogBox = (wxDialog *)this;
- long modalStyle = isModal ? wxDIALOG_MODAL : 0;
- if (!dialogBox->Create(parent, -1, title, wxPoint(x, y), wxSize(width, height), theWindowStyle|modalStyle, name))
- return FALSE;
+ wxDialog *dialogBox = (wxDialog *)thisWindow;
+ long modalStyle = isModal ?
+#if WXWIN_COMPATIBILITY_2_6
+ wxDIALOG_MODAL
+#else
+ 0
+#endif // WXWIN_COMPATIBILITY_2_6
+ : 0;
+ if (!dialogBox->Create(parent, wxID_ANY, title, wxPoint(x, y), wxSize(width, height), theWindowStyle|modalStyle, name))
+ return false;