Changeset 329 for trunk/src


Ignore:
Timestamp:
Jul 18, 1999, 4:56:37 PM (26 years ago)
Author:
sandervl
Message:

* empty log message *

Location:
trunk/src/user32/new
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/user32/new/oslibwin.cpp

    r328 r329  
    1 /* $Id: oslibwin.cpp,v 1.12 1999-07-18 14:39:35 sandervl Exp $ */
     1/* $Id: oslibwin.cpp,v 1.13 1999-07-18 14:56:36 sandervl Exp $ */
    22/*
    33 * Window API wrappers for OS/2
     
    256256//******************************************************************************
    257257//******************************************************************************
    258 BOOL OSLibWinQueryUpdateRect(HWND hwnd, PRECT pRect)
     258BOOL OSLibWinQueryUpdateRect(HWND hwnd, PVOID pRect)
    259259{
    260260 BOOL rc;
     
    263263  rc = WinQueryUpdateRect(hwnd, (PRECTL)&rectl);
    264264  if(rc) {
    265         MapOS2ToWin32Rectl(hwnd, &rectl, pRect);
     265    MapOS2ToWin32Rectl(hwnd, &rectl, (PRECT)pRect);
    266266  }
    267267  return rc;
  • trunk/src/user32/new/oslibwin.h

    r328 r329  
    1 /* $Id: oslibwin.h,v 1.11 1999-07-18 14:39:35 sandervl Exp $ */
     1/* $Id: oslibwin.h,v 1.12 1999-07-18 14:56:36 sandervl Exp $ */
    22/*
    33 * Window API wrappers for OS/2
     
    184184
    185185BOOL  OSLibWinDestroyWindow(HWND hwnd);
    186 BOOL  OSLibWinQueryUpdateRect(HWND hwnd, PRECT pRect);
     186BOOL  OSLibWinQueryUpdateRect(HWND hwnd, PVOID pRect);
    187187BOOL  OSLibWinIsIconic(HWND hwnd);
    188188BOOL  OSLibWinSetActiveWindow(HWND hwnd);
  • trunk/src/user32/new/pmwindow.cpp

    r328 r329  
    1 /* $Id: pmwindow.cpp,v 1.9 1999-07-18 14:39:35 sandervl Exp $ */
     1/* $Id: pmwindow.cpp,v 1.10 1999-07-18 14:56:36 sandervl Exp $ */
    22/*
    33 * Win32 Window Managment Code for OS/2
     
    8484 POSTMSG_PACKET *postmsg;
    8585 Win32Window  *win32wnd;
    86  ULONG         magic;
    8786 APIRET        rc;
    8887
     
    9089  SetWin32TIB();
    9190
    92   win32wnd = (Win32Window *)WinQueryWindowULong(hwnd, OFFSET_WIN32WNDPTR);
    93   magic    = WinQueryWindowULong(hwnd, OFFSET_WIN32PM_MAGIC);
    94 
    95   if(msg != WM_CREATE && win32wnd == NULL && magic != WIN32PM_MAGIC) {
     91  win32wnd = Win32Window::GetWindowFromOS2Handle(hwnd);
     92
     93  if(msg != WM_CREATE && win32wnd == NULL) {
    9694        dprintf(("Invalid win32wnd pointer for window %x!!", hwnd));
    9795        goto RunDefWndProc;
  • trunk/src/user32/new/user32.cpp

    r327 r329  
    1 /* $Id: user32.cpp,v 1.6 1999-07-18 13:57:47 cbratschi Exp $ */
     1/* $Id: user32.cpp,v 1.7 1999-07-18 14:56:36 sandervl Exp $ */
    22
    33/*
     
    383383BOOL WIN32API GetUpdateRect( HWND hWnd, PRECT lpRect, BOOL  bErase)
    384384{
    385     OSRECTL rect;
    386385    ULONG windowH;
    387386    BOOL rc;
     
    391390#endif
    392391    if (!lpRect) return FALSE;
     392
    393393    hWnd = Win32ToOS2Handle(hWnd);
    394     rc = OSLibWinQueryUpdateRect(hWnd,&rect);
    395     windowH = OSLibGetWindowHeight(hWnd);
    396     OS2ToWin32Rect(lpRect,&rect,windowH);
    397     return rc;
     394    return OSLibWinQueryUpdateRect(hWnd, (PVOID)&lpRect);
    398395}
    399396//******************************************************************************
  • trunk/src/user32/new/win32wnd.cpp

    r328 r329  
    1 /* $Id: win32wnd.cpp,v 1.11 1999-07-18 14:39:35 sandervl Exp $ */
     1/* $Id: win32wnd.cpp,v 1.12 1999-07-18 14:56:37 sandervl Exp $ */
    22/*
    33 * Win32 Window Code for OS/2
     
    666666//******************************************************************************
    667667ULONG Win32Window::MsgMove(ULONG xParent, ULONG yParent)
    668 {       
     668{
    669669  return SendInternalMessageA(WM_MOVE, 0, MAKELONG((USHORT)xParent, (USHORT)yParent));
    670670}
     
    770770
    771771  if(keystate & WMMOVE_LBUTTON)
    772         winstate |= MK_LBUTTON;
     772    winstate |= MK_LBUTTON;
    773773  if(keystate & WMMOVE_RBUTTON)
    774         winstate |= MK_RBUTTON;
     774    winstate |= MK_RBUTTON;
    775775  if(keystate & WMMOVE_MBUTTON)
    776         winstate |= MK_MBUTTON;
     776    winstate |= MK_MBUTTON;
    777777  if(keystate & WMMOVE_SHIFT)
    778         winstate |= MK_SHIFT;
     778    winstate |= MK_SHIFT;
    779779  if(keystate & WMMOVE_CTRL)
    780         winstate |= MK_CONTROL;
    781        
     780    winstate |= MK_CONTROL;
     781
    782782   return SendInternalMessageA(WM_MOUSEMOVE, keystate, MAKELONG(x, y));
    783783}
     
    792792ULONG Win32Window::MsgEraseBackGround(ULONG hps)
    793793{
    794         if(isIcon) {
    795                         return SendInternalMessageA(WM_ICONERASEBKGND, hps, 0);
    796         }
    797         else    return SendInternalMessageA(WM_ERASEBKGND, hps, 0);
     794    if(isIcon) {
     795            return SendInternalMessageA(WM_ICONERASEBKGND, hps, 0);
     796    }
     797    else    return SendInternalMessageA(WM_ERASEBKGND, hps, 0);
    798798}
    799799//******************************************************************************
     
    802802{
    803803  if(isUnicode) {
    804         return SendInternalMessageW(WM_SETTEXT, 0, (LPARAM)lpsz);
     804        return SendInternalMessageW(WM_SETTEXT, 0, (LPARAM)lpsz);
    805805  }
    806806  else  return SendInternalMessageA(WM_SETTEXT, 0, (LPARAM)lpsz);
     
    14691469//******************************************************************************
    14701470//******************************************************************************
     1471Win32Window *Win32Window::GetWindowFromOS2Handle(HWND hwnd)
     1472{
     1473 Win32Window *win32wnd;
     1474 DWORD        magic;
     1475
     1476  win32wnd = (Win32Window *)OSLibWinGetWindowULong(hwnd, OFFSET_WIN32WNDPTR);
     1477  magic    = OSLibWinGetWindowULong(hwnd, OFFSET_WIN32PM_MAGIC);
     1478
     1479  if(win32wnd && CheckMagicDword(magic)) {
     1480    return win32wnd;
     1481  }
     1482  return 0;
     1483}
     1484//******************************************************************************
     1485//******************************************************************************
    14711486GenericObject *Win32Window::windows  = NULL;
  • trunk/src/user32/new/win32wnd.h

    r328 r329  
    1 /* $Id: win32wnd.h,v 1.10 1999-07-18 14:39:35 sandervl Exp $ */
     1/* $Id: win32wnd.h,v 1.11 1999-07-18 14:56:37 sandervl Exp $ */
    22/*
    33 * Win32 Window Code for OS/2
     
    125125
    126126static Win32Window *GetWindowFromHandle(HWND hwnd);
     127static Win32Window *GetWindowFromOS2Handle(HWND hwnd);
    127128
    128129protected:
Note: See TracChangeset for help on using the changeset viewer.