-
- case WM_SIZE:
- bProcessed = HandleSize(LOWORD(lParam), HIWORD(lParam), (WXUINT)wParam);
- break;
-
- case WM_QUERYFRAMECTLCOUNT:
- {
- USHORT itemCount = SHORT1FROMMR(OS2GetOldWndProc()(GetHWND(), uMessage, wParam, lParam));
-#if wxUSE_STATUSBAR
- if(m_frameStatusBar)
- ++itemCount;
-#endif //wxUSE_STATUSBAR
-
- bProcessed = TRUE;
- mRc = MRFROMSHORT( itemCount );
- }
- break;
-
- case WM_FORMATFRAME:
- {
- PSWP pSWP = 0;
- USHORT usClient = 0;
- SWP swp;
- USHORT itemCount;
- char s[128];
-
- itemCount = SHORT1FROMMR(OS2GetOldWndProc()(GetHWND(), uMessage, wParam, lParam));
- pSWP = (PSWP)PVOIDFROMMP( wParam );
-
- while(pSWP[usClient].hwnd != WinWindowFromID(GetHWND(), FID_CLIENT)
- && usClient < itemCount)
- usClient++;
-
-#if wxUSE_STATUSBAR
- if(m_frameStatusBar)
- {
- int height;
-
- m_frameStatusBar->GetSize(NULL, &height);
-
- if(usClient == itemCount)
- {
- // frame has no client window
- // using another method of calculation
- RECTL wRectl;
-
- ::WinQueryWindowRect(GetHWND(), &wRectl);
- ::WinMapWindowPoints(GetHWND(), HWND_DESKTOP, (PPOINTL)&wRectl, 2);
- ::WinCalcFrameRect(GetHWND(), &wRectl, TRUE);
- ::WinMapWindowPoints(HWND_DESKTOP, GetHWND(), (PPOINTL)&wRectl, 2);
-
- pSWP[itemCount].x = wRectl.xLeft;
- pSWP[itemCount].y = wRectl.yBottom;
- pSWP[itemCount].cx = wRectl.xRight - wRectl.xLeft - 1;
- pSWP[itemCount].cy = height;
- pSWP[itemCount].fl = SWP_SIZE |
- SWP_MOVE |
- SWP_SHOW;
- pSWP[itemCount].hwnd = m_frameStatusBar->GetHWND();
- pSWP[itemCount].hwndInsertBehind = HWND_TOP;
- ++itemCount;
- }
- else
- {
- pSWP[itemCount].x = pSWP[usClient].x;
- pSWP[itemCount].y = pSWP[usClient].y;
- pSWP[itemCount].cx = pSWP[usClient].cx;
- pSWP[itemCount].cy = height;
- pSWP[itemCount].fl = SWP_SIZE |
- SWP_MOVE |
- SWP_SHOW;
- pSWP[itemCount].hwnd = m_frameStatusBar->GetHWND();
- pSWP[itemCount].hwndInsertBehind = HWND_TOP;
- pSWP[usClient].cy -= height;
- pSWP[usClient].y += height;
-
- ++itemCount;
- }
- }
-#endif //wxUSE_STATUSBAR
-
- bProcessed = TRUE;
- mRc = MRFROMSHORT(itemCount);
- }
- break;