+    if ( id == -1 )
+        m_windowId = (int)NewControlId();
+    else
+        m_windowId = id;
+
+    int x = pos.x;
+    int y = pos.y;
+    int width = size.x;
+    int height = size.y;
+
+    if (x < 0) x = wxDIALOG_DEFAULT_X;
+    if (y < 0) y = wxDIALOG_DEFAULT_Y;
+
+    m_windowStyle = style;
+
+    m_isShown = FALSE;
+    m_modalShowing = FALSE;
+
+    if (width < 0)
+        width = 500;
+    if (height < 0)
+        height = 500;
+
+    // TODO: convert below to OS/2 PM code
+
+    // All dialogs should really have this style
+//    m_windowStyle |= wxTAB_TRAVERSAL;
+//
+//    WXDWORD extendedStyle = MakeExtendedStyle(m_windowStyle);
+//    if (m_windowStyle & wxSTAY_ON_TOP)
+//        extendedStyle |= WS_EX_TOPMOST;
+//
+    // Allows creation of dialogs with & without captions under MSWindows,
+    // resizeable or not (but a resizeable dialog always has caption -
+    // otherwise it would look too strange)
+//    const wxChar *dlg;
+//    if ( style & wxRESIZE_BORDER )
+//        dlg = wxT("wxResizeableDialog");
+//    else if ( style & wxCAPTION )
+//        dlg = wxT("wxCaptionDialog");
+//    else
+//        dlg = wxT("wxNoCaptionDialog");
+//    MSWCreate(m_windowId, parent, NULL, this, NULL,
+//              x, y, width, height,
+//              0, // style is not used if we have dlg template
+//              dlg,
+//              extendedStyle);
+//
+//    HWND hwnd = (HWND)GetHWND();
+//
+//    if ( !hwnd )
+//    {
+//        wxLogError(wxT("Failed to create dialog."));
+//
+//        return FALSE;
+//    }
+//
+//    SubclassWin(GetHWND());
+//
+//    SetWindowText(hwnd, title);
+//    SetFont(wxSystemSettings::GetSystemFont(wxSYS_DEFAULT_GUI_FONT));
+//
+    return TRUE;