Ignore:
Timestamp:
Oct 17, 1999, 2:17:46 PM (26 years ago)
Author:
cbratschi
Message:

added WINE scrollbars to frame, fixed pmframe, WM_ENTERIDLE

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/user32/pmwindow.cpp

    r1324 r1333  
    1 /* $Id: pmwindow.cpp,v 1.32 1999-10-16 18:56:51 sandervl Exp $ */
     1/* $Id: pmwindow.cpp,v 1.33 1999-10-17 12:17:44 cbratschi Exp $ */
    22/*
    33 * Win32 Window Managment Code for OS/2
     
    257257
    258258        if ((pswp->fl & (SWP_SIZE | SWP_MOVE | SWP_ZORDER)) == 0) break;
    259         if (!win32wnd->CanReceiveSizeMsgs())    break;
     259        if (!win32wnd->CanReceiveSizeMsgs())    break;
    260260
    261261        WinQueryWindowPos(hwnd, &swpOld);
     
    263263        if(pswp->fl & (SWP_MOVE | SWP_SIZE)) {
    264264            if (win32wnd->isChild()) {
    265                 if(win32wnd->getParent()) {
    266                         hParent = win32wnd->getParent()->getOS2WindowHandle();
    267                 }
    268                 else    break;
    269             }
     265                if(win32wnd->getParent()) {
     266                        hParent = win32wnd->getParent()->getOS2WindowHandle();
     267                }
     268                else    break;
     269            }
    270270            else
    271271                hFrame = win32wnd->getOS2FrameWindowHandle();
     
    297297
    298298        if ((pswp->fl & (SWP_SIZE | SWP_MOVE | SWP_ZORDER)) == 0) break;
    299         if (!win32wnd->CanReceiveSizeMsgs())    break;
     299        if (!win32wnd->CanReceiveSizeMsgs())    break;
    300300
    301301        if(pswp->fl & (SWP_MOVE | SWP_SIZE)) {
    302302            if (win32wnd->isChild()) {
    303                 if(win32wnd->getParent()) {
    304                         hParent = win32wnd->getParent()->getOS2WindowHandle();
    305                 }
    306                 else    goto RunDefWndProc; //parent has just been destroyed
     303                if(win32wnd->getParent()) {
     304                        hParent = win32wnd->getParent()->getOS2WindowHandle();
     305                }
     306                else    goto RunDefWndProc; //parent has just been destroyed
    307307            }
    308308            else
     
    311311        OSLibMapSWPtoWINDOWPOS(pswp, &wp, pswpo, hParent, hFrame);
    312312
    313         SWP swpFrame;
     313        SWP swpFrame;
    314314        WinQueryWindowPos(WinQueryWindow(hwnd, QW_PARENT), &swpFrame);
    315315        dprintf(("WINDOWPOSCHANGE %x %x %x (%d,%d) (%d,%d)", win32wnd->getWindowHandle(), win32wnd->getOS2FrameWindowHandle(),
    316316                         swpFrame.fl,swpFrame.x, swpFrame.y, swpFrame.cx, swpFrame.cy));
    317         POINTL point;
    318 
    319         point.x = swpFrame.x;
    320         point.y = swpFrame.y;
    321         if(win32wnd->getParent() != NULL)
    322         {
    323                 WinMapWindowPoints(WinQueryWindow(hwnd, QW_PARENT), HWND_DESKTOP,
    324                                    &point, 1);
    325         }
    326         point.y = OSLibQueryScreenHeight() - point.y - swpFrame.cy;
     317        POINTL point;
     318
     319        point.x = swpFrame.x;
     320        point.y = swpFrame.y;
     321        if(win32wnd->getParent() != NULL)
     322        {
     323                WinMapWindowPoints(WinQueryWindow(hwnd, QW_PARENT), HWND_DESKTOP,
     324                                   &point, 1);
     325        }
     326        point.y = OSLibQueryScreenHeight() - point.y - swpFrame.cy;
    327327        win32wnd->setWindowRect(point.x, point.y, point.x+swpFrame.cx, point.y+swpFrame.cy);
    328328        win32wnd->setClientRect(pswpo->x, pswpo->y, pswpo->x + pswpo->cx, pswpo->y + pswpo->cy);
     
    614614    //Slider messages
    615615    //**************************************************************************
     616/* CB: handled internally
    616617    case WM_VSCROLL:
    617618    case WM_HSCROLL:
     
    630631    break;
    631632    }
     633*/
    632634
    633635    case WM_CONTROL:
     
    845847    case WM_ERASEBACKGROUND:
    846848    {
    847         dprintf(("OS2: WM_ERASEBACKGROUND %x", win32wnd->getWindowHandle()));
     849        dprintf(("OS2: WM_ERASEBACKGROUND %x", win32wnd->getWindowHandle()));
    848850        if (!win32wnd->isSupressErase()) {
    849851            BOOL erased = sendEraseBkgnd (win32wnd);
     
    916918//******************************************************************************
    917919//******************************************************************************
     920MRESULT EXPENTRY Win32SubclassWindowProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
     921{
     922  Win32BaseWindow* win32wnd;
     923
     924  //Restore our FS selector
     925  SetWin32TIB();
     926
     927  win32wnd = Win32BaseWindow::GetWindowFromOS2Handle(hwnd);
     928
     929  if (!win32wnd)
     930  {
     931    dprintf(("Invalid win32wnd pointer for subclassed window %x!!", hwnd));
     932    goto RunDefWndProc;
     933  }
     934
     935  switch (msg)
     936  {
     937    case WM_WINDOWPOSCHANGED:
     938      {
     939        PSWP      pswp  = (PSWP)mp1;
     940        PSWP      pswpo = pswp + 1;
     941        WINDOWPOS wp;
     942        HWND      hParent = NULLHANDLE, hFrame = NULLHANDLE;
     943
     944        if ((pswp->fl & (SWP_SIZE | SWP_MOVE | SWP_ZORDER)) == 0) break;
     945
     946        if(pswp->fl & (SWP_MOVE | SWP_SIZE))
     947          hFrame = WinQueryWindow(hwnd, QW_PARENT);
     948
     949        OSLibMapSWPtoWINDOWPOS(pswp,&wp,pswpo,hParent,hFrame);
     950        win32wnd->MsgPosChanged((LPARAM)&wp);
     951
     952        goto RunOldWndProc;
     953      }
     954
     955    default:
     956      goto RunDefHandler;
     957  }
     958
     959RunDefWndProc:
     960  RestoreOS2TIB();
     961  return WinDefWindowProc(hwnd,msg,mp1,mp2);
     962
     963RunOldWndProc:
     964  RestoreOS2TIB();
     965  return ((PFNWP)win32wnd->getOldWndProc())(hwnd,msg,mp1,mp2);
     966
     967RunDefHandler:
     968  RestoreOS2TIB();
     969  return Win32WindowProc(hwnd,msg,mp1,mp2);
     970}
     971
     972PVOID SubclassWithDefHandler(HWND hwnd)
     973{
     974  return WinSubclassWindow(hwnd,Win32SubclassWindowProc);
     975}
Note: See TracChangeset for help on using the changeset viewer.