From b963e7d5460b50ec5b8fc462d6a9b5bc6301db18 Mon Sep 17 00:00:00 2001 From: David Webster Date: Thu, 23 Mar 2000 05:17:18 +0000 Subject: [PATCH] no message git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@6911 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/os2/app.cpp | 4 ++-- src/os2/frame.cpp | 51 ++++++++++++++++++++++------------------------- 2 files changed, 26 insertions(+), 29 deletions(-) diff --git a/src/os2/app.cpp b/src/os2/app.cpp index 26611eed61..4e41b7077f 100644 --- a/src/os2/app.cpp +++ b/src/os2/app.cpp @@ -555,7 +555,7 @@ bool wxApp::DoMessage() { BOOL bRc = ::WinGetMsg(vHabmain, &svCurrentMsg, HWND(NULL), 0, 0); - wxUsleep(10000); + wxUsleep(1000); if (bRc == 0) { // got WM_QUIT @@ -658,7 +658,7 @@ int wxApp::MainLoop() #endif // wxUSE_THREADS while (!Pending() && ProcessIdle()) { - wxUsleep(10000); +// wxUsleep(10000); } DoMessage(); } diff --git a/src/os2/frame.cpp b/src/os2/frame.cpp index ef321ea46c..31ce6652e5 100644 --- a/src/os2/frame.cpp +++ b/src/os2/frame.cpp @@ -804,11 +804,8 @@ bool wxFrame::OS2Create( HWND hTitlebar = NULLHANDLE; HWND hHScroll = NULLHANDLE; HWND hVScroll = NULLHANDLE; - SWP vSwp; - SWP vSwpClient; - SWP vSwpTitlebar; - SWP vSwpVScroll; - SWP vSwpHScroll; + SWP vSwp[10]; + RECTL vRect[10]; USHORT uCtlCount; m_hDefaultIcon = (WXHICON) (wxSTD_FRAME_ICON ? wxSTD_FRAME_ICON : wxDEFAULT_FRAME_ICON); @@ -878,16 +875,16 @@ bool wxFrame::OS2Create( // // Create the frame window // - if ((m_hFrame = ::WinCreateWindow( hParent // Frame is parent - ,WC_FRAME // standard frame class - ,(PSZ)zTitle // Window title - ,0 // No styles - ,0, 0, 0, 0 // Window position - ,NULLHANDLE // Owner - ,HWND_TOP // Sibling - ,(ULONG)nId // ID - ,(PVOID)&flFrameCtlData // Creation data - ,NULL // Window Pres Params + if ((m_hFrame = ::WinCreateWindow( hParent // Frame is parent + ,WC_FRAME // standard frame class + ,(PSZ)zTitle // Window title + ,0 // No styles + ,0, 0, 0, 0 // Window position + ,NULLHANDLE // Owner + ,HWND_TOP // Sibling + ,(ULONG)nId // ID + ,(PVOID)&vFrameCtlData // Creation data + ,NULL // Window Pres Params )) == 0L) { return FALSE; @@ -895,7 +892,7 @@ bool wxFrame::OS2Create( if (!wxWindow::OS2Create( m_hFrame ,wxFrameClassName - ,NULL + ,NULL ,0L ,0L ,0L @@ -924,17 +921,17 @@ bool wxFrame::OS2Create( )) return FALSE; - uCtlCount = ::WinSendMsg(m_hFrame, WM_FORMATFRAME, (MPARAM)pSwp, (MPARAM)pRect); + uCtlCount = SHORT1FROMMP(::WinSendMsg(m_hFrame, WM_FORMATFRAME, (MPARAM)vSwp, (MPARAM)vRect)); for (int i = 0; i < uCtlCount; i++) { - if (pSwp[i].hwnd == m_hFrame) - memcpy(m_vSwp, pSwp[i], sizeof(SWP)); - else if (pSwp[i].hwnd == m_hVScroll) - memcpy(m_vSwpVScroll, pSwp[i], sizeof(SWP)); - else if (pSwp[i].hwnd == m_hHScroll) - memcpy(m_vSwpVScroll, pSwp[i], sizeof(SWP)); - else if (pSwp[i].hwnd == m_hTitleBar) - memcpy(m_vSwpTitleBar, pSwp[i], sizeof(SWP)); + if (vSwp[i].hwnd == m_hFrame) + memcpy(&m_vSwp, &vSwp[i], sizeof(SWP)); + else if (vSwp[i].hwnd == m_hVScroll) + memcpy(&m_vSwpVScroll, &vSwp[i], sizeof(SWP)); + else if (vSwp[i].hwnd == m_hHScroll) + memcpy(&m_vSwpVScroll, &vSwp[i], sizeof(SWP)); + else if (vSwp[i].hwnd == m_hTitleBar) + memcpy(&m_vSwpTitleBar, &vSwp[i], sizeof(SWP)); } // @@ -945,7 +942,7 @@ bool wxFrame::OS2Create( ,SV_CXSIZEBORDER/2 ,(SV_CYSIZEBORDER/2) + m_vSwpHScroll.cy/2 ,m_vSwp.cx - ((SV_CXSIZEBORDER + 1) + m_vSwpVScroll.cx) - ,m_vSwp.cy - ((SV_CYSIZEBORDER + 1) + m_vSwpTitlebar.cy + m_vSwpHScroll.cy/2) + ,m_vSwp.cy - ((SV_CYSIZEBORDER + 1) + m_vSwpTitleBar.cy + m_vSwpHScroll.cy/2) ,SWP_SIZE | SWP_MOVE ); @@ -1428,7 +1425,7 @@ MRESULT wxFrame::OS2WindowProc( // Return TRUE to request PM to paint the window background // in SYSCLR_WINDOW. // - bProcessed = TRUE; + bProcessed = TRUE; mRc = (MRESULT)(TRUE); break;