]> git.saurik.com Git - wxWidgets.git/blobdiff - src/os2/mdi.cpp
added wx/defs.h include to correct compilation issues under Mac OS X
[wxWidgets.git] / src / os2 / mdi.cpp
index 0a211183344006f0064baf5943a6fec659a7301a..800232b1528ceffb060be1cc7421632b34889677 100644 (file)
@@ -138,6 +138,7 @@ bool wxMDIParentFrame::Create(wxWindow *parent,
     wxTopLevelWindows.Append(this);
 
   SetName(name);
     wxTopLevelWindows.Append(this);
 
   SetName(name);
+  wxWindowBase::Show(TRUE); // MDI child frame starts off shown
   m_windowStyle = style;
 
   if (parent) parent->AddChild(this);
   m_windowStyle = style;
 
   if (parent) parent->AddChild(this);
@@ -288,8 +289,7 @@ void wxMDIParentFrame::ActivatePrevious()
 // the MDI parent frame window proc
 // ---------------------------------------------------------------------------
 
 // the MDI parent frame window proc
 // ---------------------------------------------------------------------------
 
-MRESULT wxMDIParentFrame::OS2WindowProc(HWND     hwnd,
-                                        WXUINT message,
+MRESULT wxMDIParentFrame::OS2WindowProc(WXUINT message,
                                         WXWPARAM wParam,
                                         WXLPARAM lParam)
 {
                                         WXWPARAM wParam,
                                         WXLPARAM lParam)
 {
@@ -504,8 +504,7 @@ bool wxMDIParentFrame::HandleCommand(WXWORD id, WXWORD cmd, WXHWND hwnd)
     return FALSE;
 }
 
     return FALSE;
 }
 
-MRESULT wxMDIParentFrame::OS2DefWindowProc(HWND hwnd,
-                                           WXUINT message,
+MRESULT wxMDIParentFrame::OS2DefWindowProc(WXUINT message,
                                            WXWPARAM wParam,
                                            WXLPARAM lParam)
 {
                                            WXWPARAM wParam,
                                            WXLPARAM lParam)
 {
@@ -774,8 +773,7 @@ void wxMDIChildFrame::Activate()
 // MDI window proc and message handlers
 // ---------------------------------------------------------------------------
 
 // MDI window proc and message handlers
 // ---------------------------------------------------------------------------
 
-MRESULT wxMDIChildFrame::OS2WindowProc(HWND hwnd,
-                                       WXUINT message,
+MRESULT wxMDIChildFrame::OS2WindowProc(WXUINT message,
                                        WXWPARAM wParam,
                                        WXLPARAM lParam)
 {
                                        WXWPARAM wParam,
                                        WXLPARAM lParam)
 {
@@ -987,7 +985,7 @@ bool wxMDIChildFrame::HandleWindowPosChanging(void *pos)
 // MDI specific message translation/preprocessing
 // ---------------------------------------------------------------------------
 
 // MDI specific message translation/preprocessing
 // ---------------------------------------------------------------------------
 
-MRESULT wxMDIChildFrame::OS2DefWindowProc(HWND hwnd, WXUINT message, WXWPARAM wParam, WXLPARAM lParam)
+MRESULT wxMDIChildFrame::OS2DefWindowProc(WXUINT message, WXWPARAM wParam, WXLPARAM lParam)
 {
     // TODO
 /*
 {
     // TODO
 /*
@@ -999,7 +997,12 @@ MRESULT wxMDIChildFrame::OS2DefWindowProc(HWND hwnd, WXUINT message, WXWPARAM wP
 
 bool wxMDIChildFrame::OS2TranslateMessage(WXMSG* msg)
 {
 
 bool wxMDIChildFrame::OS2TranslateMessage(WXMSG* msg)
 {
-    return m_acceleratorTable.Translate(GetParent(), msg);
+#if wxUSE_ACCEL
+    return m_acceleratorTable.Translate(GetParent()->GetHWND(), msg);
+#else
+    return FALSE;
+#endif  //wxUSE_ACCEL
+
 }
 
 // ---------------------------------------------------------------------------
 }
 
 // ---------------------------------------------------------------------------