Changeset 1039


Ignore:
Timestamp:
Sep 25, 1999, 11:27:08 AM (26 years ago)
Author:
dengert
Message:

fixed ClientToScreen adn ScreenToClient

Location:
trunk
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified trunk/changelog

    r1037 r1039  
    1  /* $Id: changelog,v 1.235 1999-09-24 22:47:48 sandervl Exp $ */
     1 /* $Id: changelog,v 1.236 1999-09-25 09:25:58 dengert Exp $ */
     2
     3 99-09-25: Daniela Engert <dani@ngrt.de>
     4        - USER32: ClientToScreen and ScreenToClient didn't work -> fixed.
    25
    36 99-09-24: David Raison <djr@lemur.co.uk>
    4         - OLE32: Ported remaining files pertaining to OLE32 from WINE
    5         - OLEAUT32: Patched OaBuildVersion to level 0x1E...
     7        - OLE32: Ported remaining files pertaining to OLE32 from WINE
     8        - OLEAUT32: Patched OaBuildVersion to level 0x1E...
    69
    710 99-09-24: Sander van Leeuwen <sandervl@xs4all.nl>
    811        - USER32: Rewrote menu code to use Open32 (==PM) menu handles
    9                   Note: Uses mostly Open32 apis; they work fine, but maybe
    10                         we should write our own someday.
    11                   Cursor fixes. Not working in winhlp32 yet though.
     12                  Note: Uses mostly Open32 apis; they work fine, but maybe
     13                        we should write our own someday.
     14                  Cursor fixes. Not working in winhlp32 yet though.
    1215        - KERNEL32: Cursor & cursorgroup fixes
    1316
    1417 99-09-23: Patrick Haller <phaller@gmx.net>
    15         - KERNEL32:     Fix: WinImgRes:findResourceW erroneously tried to free 
     18        - KERNEL32:     Fix: WinImgRes:findResourceW erroneously tried to free
    1619                        numerical resource IDs instead of translated Unicode
    1720                        strings.
    1821        - USER32:       Fix: in USER32:HeapShared:getmoreShared()
    19                         Fix: in USER32:WIN32WMDIClient:childActivate() 
    20                         Fix: in USER32:WinMenu:GetSubMenu 
     22                        Fix: in USER32:WIN32WMDIClient:childActivate()
     23                        Fix: in USER32:WinMenu:GetSubMenu
    2124                                now returns Win32MenuRes object instead of PM handle
    22                         Fix: in USER32:WinMenu:GetSystemMenu 
     25                        Fix: in USER32:WinMenu:GetSystemMenu
    2326                                now returns Win32MenuRes object instead of PM handle
    2427                        Fix: in USER32:Char:CharPrevW intermixed arguments
     
    2629 99-09-23: Jens Wiessner <wiessnej@rfi.de>
    2730        - CRTDLL: Added stubs, implemented some stubs
    28         - IMAGEHLP, IMM32, MSACM32, MSVFW32, OLEDLG, 
    29           OLECLI32, OLESVR32, PSAPI, RASPI32
    30                   Added dprintfs.
     31        - IMAGEHLP, IMM32, MSACM32, MSVFW32, OLEDLG,
     32          OLECLI32, OLESVR32, PSAPI, RASPI32
     33                  Added dprintfs.
    3134
    3235 99-09-23: Sander van Leeuwen <sandervl@xs4all.nl>
    3336        - WINMM: Changed WinPostMsg calls into PostMessageA as win32 window
    34                 handles are not the same as PM handles anymore.
     37                handles are not the same as PM handles anymore.
    3538        - USER32: Adding desktop window class. When user32 is loaded, a desktop
    36                   window object is created.
    37                   GetDesktopWindow returns handle of this window.
    38                   Winhlp32 no longer crashes immediately, but briefly shows
    39                   it's window before quitting.
    40                   Create windows always with HWND_TOP. The if statement (hwndLinkAfter)
    41                   in the CreateWindowExA method of Win32BaseWindow class messes
    42                   up the Z-order of dialog controls (i.e. buttons in a group box)
     39                  window object is created.
     40                  GetDesktopWindow returns handle of this window.
     41                  Winhlp32 no longer crashes immediately, but briefly shows
     42                  it's window before quitting.
     43                  Create windows always with HWND_TOP. The if statement (hwndLinkAfter)
     44                  in the CreateWindowExA method of Win32BaseWindow class messes
     45                  up the Z-order of dialog controls (i.e. buttons in a group box)
    4346        - COMDLG32: Fixed all common dialogs. (translate our handle to real PM handle)
    44        
     47
    4548 99-09-22: David Raison <djr@lemur.co.uk>
    4649        - KERNEL32: Return "Service Pack 3" as CSD string in GetVersionExA/W
     
    4851 99-09-22: Yuri Dario <mc6530@mclink.it>
    4952        - MISC: Fixed WINELIB macro's in wingdi.h, added fixes to headers
    50                 for VAC 3.6.5
     53                for VAC 3.6.5
    5154        - ODINCRT: Also link with SOMLIB (VAC 3.6.5)
    5255        - CRTDLL: Compilation fix for VAC 3.6.5
     
    5760 99-09-22: Rene Pronk <R.Pronk@twi.tudelft.nl>
    5861        - USER32: Changed WM_CHAR PM handling to generate WM_(SYS)KEYUP/DOWN
    59                   messages.
    60                   Note: Not complete as TranslateMessage doesn't translate
    61                         ascii keys to WM_CHAR messages.
     62                  messages.
     63                  Note: Not complete as TranslateMessage doesn't translate
     64                        ascii keys to WM_CHAR messages.
    6265
    6366 99-09-22: Sander van Leeuwen <sandervl@xs4all.nl>
    6467        - USER32: Removed GetDesktopWindow fix
    65                   Ported getNextDlgTabItem & getDlgItem
     68                  Ported getNextDlgTabItem & getDlgItem
    6669
    6770 99-09-21: Daniela Engert <dani@ngrt.de>
  • TabularUnified trunk/src/user32/oslibwin.cpp

    r1010 r1039  
    1 /* $Id: oslibwin.cpp,v 1.4 1999-09-22 14:58:23 dengert Exp $ */
     1/* $Id: oslibwin.cpp,v 1.5 1999-09-25 09:27:07 dengert Exp $ */
    22/*
    33 * Window API wrappers for OS/2
     
    656656//******************************************************************************
    657657//******************************************************************************
     658BOOL OSLibWinMapWindowPoints (HWND hwndFrom, HWND hwndTo, OSLIBPOINT *pptl, ULONG num)
     659{
     660   return WinMapWindowPoints (hwndFrom, hwndTo, (PPOINTL)pptl, num);
     661}
     662//******************************************************************************
     663//******************************************************************************
  • TabularUnified trunk/src/user32/oslibwin.h

    r1000 r1039  
    1 /* $Id: oslibwin.h,v 1.3 1999-09-21 17:04:27 dengert Exp $ */
     1/* $Id: oslibwin.h,v 1.4 1999-09-25 09:27:07 dengert Exp $ */
    22/*
    33 * Window API wrappers for OS/2
     
    240240BOOL  OSLibWinEndEnumWindows(HWND hwndEnum);
    241241BOOL  OSLibWinQueryWindowProcess(HWND hwnd, ULONG *pid, ULONG *tid);
     242BOOL  OSLibWinMapWindowPoints (HWND hwndFrom, HWND hwndTo, OSLIBPOINT *pptl, ULONG num);
    242243
    243244#endif //__OSLIBWIN_H__
  • TabularUnified trunk/src/user32/pmwindow.cpp

    r1005 r1039  
    1 /* $Id: pmwindow.cpp,v 1.5 1999-09-22 08:58:35 sandervl Exp $ */
     1/* $Id: pmwindow.cpp,v 1.6 1999-09-25 09:27:07 dengert Exp $ */
    22/*
    33 * Win32 Window Managment Code for OS/2
     
    7777     (PSZ)WIN32_STDCLASS,               /* Window class name            */
    7878     (PFNWP)Win32WindowProc,            /* Address of window procedure  */
    79      CS_SIZEREDRAW | CS_HITTEST,
     79     CS_SIZEREDRAW | CS_HITTEST | CS_MOVENOTIFY,
    8080     NROF_WIN32WNDBYTES)) {
    8181        dprintf(("WinRegisterClass Win32BaseWindow failed"));
     
    269269            win32wnd->setEraseBkgnd (!erased, !erased);
    270270        }
     271        break;
     272    }
     273
     274    case WM_MOVE:
     275    {
     276        if (!win32wnd->isFrameWindow()) break;
     277
     278        HWND      hFrame = win32wnd->getOS2FrameWindowHandle();
     279        SWP       swp, swpo;
     280        WINDOWPOS wp;
     281        ULONG     parentHeight = 0;
     282        RECTL     rcl;
     283
     284        WinQueryWindowRect (hwnd, &rcl);
     285        WinMapWindowPoints (hwnd, hFrame, (PPOINTL)&rcl, 2);
     286        swp.x  = swpo.x  = rcl.xLeft;
     287        swp.y  = swpo.y  = rcl.yBottom;
     288        swp.cx = swpo.cx = rcl.xRight - rcl.xLeft;
     289        swp.cy = swpo.cy = rcl.yTop   - rcl.yBottom;
     290        swp.fl = SWP_MOVE | SWP_NOREDRAW;
     291        swp.hwnd             = hwnd;
     292        swp.hwndInsertBehind = NULLHANDLE;
     293
     294        OSLibMapSWPtoWINDOWPOS(&swp, &wp, &swpo, NULLHANDLE, hFrame);
     295
     296        wp.flags &= ~SWP_NOMOVE_W;
     297        wp.hwnd = win32wnd->getWindowHandle();
     298        win32wnd->setWindowRect(wp.x, wp.y, wp.x + wp.cx, wp.y + wp.cy);
     299        win32wnd->setClientRect(swpo.x, swpo.y, swpo.x + swpo.cx, swpo.y + swpo.cy);
     300        win32wnd->MsgPosChanged((LPARAM)&wp);
    271301        break;
    272302    }
  • TabularUnified trunk/src/user32/user32.cpp

    r1036 r1039  
    1 /* $Id: user32.cpp,v 1.29 1999-09-24 22:45:27 sandervl Exp $ */
     1/* $Id: user32.cpp,v 1.30 1999-09-25 09:27:08 dengert Exp $ */
    22
    33/*
     
    12421242//******************************************************************************
    12431243//******************************************************************************
    1244 BOOL WIN32API ScreenToClient( HWND arg1, LPPOINT  arg2)
     1244BOOL WIN32API ScreenToClient (HWND hwnd, LPPOINT pt)
    12451245{
    12461246#ifdef DEBUG
    12471247    WriteLog("USER32:  ScreenToClient\n");
    12481248#endif
    1249     return O32_ScreenToClient(arg1, arg2);
     1249    Win32BaseWindow *wnd;
     1250    PRECT rcl;
     1251
     1252    if (!hwnd) return (TRUE);
     1253    wnd = Win32BaseWindow::GetWindowFromHandle (hwnd);
     1254    if (!wnd) return (TRUE);
     1255
     1256    rcl   = wnd->getClientRect();
     1257    pt->y = ScreenHeight - pt->y;
     1258    OSLibWinMapWindowPoints (OSLIB_HWND_DESKTOP, wnd->getOS2WindowHandle(), (OSLIBPOINT *)pt, 1);
     1259    pt->y = (rcl->bottom - rcl->top) - pt->y;
     1260    return (TRUE);
    12501261}
    12511262//******************************************************************************
  • TabularUnified trunk/src/user32/win32wbase.cpp

    r1036 r1039  
    1 /* $Id: win32wbase.cpp,v 1.10 1999-09-24 22:45:27 sandervl Exp $ */
     1/* $Id: win32wbase.cpp,v 1.11 1999-09-25 09:27:07 dengert Exp $ */
    22/*
    33 * Win32 Window Base Class for OS/2
     
    12421242        WPARAM     wp   = SIZE_RESTORED;
    12431243
    1244         if (!(wpos->flags & SWP_NOCLIENTMOVE))
     1244        if (!(wpos->flags & SWP_NOMOVE) && !(wpos->flags & SWP_NOCLIENTMOVE))
    12451245            SendMessageA(WM_MOVE, 0, MAKELONG(rectClient.left, rectClient.top));
    12461246
    1247         if (!(wpos->flags & SWP_NOCLIENTSIZE))
     1247        if (!(wpos->flags & SWP_NOSIZE) && !(wpos->flags & SWP_NOCLIENTSIZE))
    12481248        {
    12491249            if (dwStyle & WS_MAXIMIZE) wp = SIZE_MAXIMIZED;
  • TabularUnified trunk/src/user32/window.cpp

    r1036 r1039  
    1 /* $Id: window.cpp,v 1.7 1999-09-24 22:45:28 sandervl Exp $ */
     1/* $Id: window.cpp,v 1.8 1999-09-25 09:27:08 dengert Exp $ */
    22/*
    33 * Win32 window apis for OS/2
    44 *
    55 * Copyright 1999 Sander van Leeuwen
     6 * Copyright 1999 Daniela Engert (dani@ngrt.de)
    67 *
    78 * Parts based on Wine Windows code (windows\win.c)
     
    778779//******************************************************************************
    779780//******************************************************************************
    780 BOOL WIN32API ClientToScreen( HWND arg1, PPOINT  arg2)
    781 {
    782 #ifdef DEBUG
    783 ////    WriteLog("USER32:  ClientToScreen\n");
    784 #endif
    785     return O32_ClientToScreen(arg1, arg2);
     781BOOL WIN32API ClientToScreen (HWND hwnd, PPOINT pt)
     782{
     783#ifdef DEBUG
     784   WriteLog("USER32:  ClientToScreen\n");
     785#endif
     786    Win32BaseWindow *wnd;
     787    PRECT rcl;
     788
     789    if (!hwnd) return (TRUE);
     790    wnd = Win32BaseWindow::GetWindowFromHandle (hwnd);
     791    if (!wnd) return (TRUE);
     792
     793    rcl  = wnd->getClientRect();
     794    pt->y = (rcl->bottom - rcl->top) - pt->y;
     795    OSLibWinMapWindowPoints (wnd->getOS2WindowHandle(), OSLIB_HWND_DESKTOP, (OSLIBPOINT *)pt, 1);
     796    pt->y = ScreenHeight - pt->y;
     797    return (TRUE);
    786798}
    787799//******************************************************************************
     
    11521164//******************************************************************************
    11531165//******************************************************************************
     1166
Note: See TracChangeset for help on using the changeset viewer.