Changeset 1299 for trunk/src


Ignore:
Timestamp:
Oct 14, 1999, 9:31:32 PM (26 years ago)
Author:
sandervl
Message:

Window rectange fixes + partly implemented CopyImage

Location:
trunk/src/user32
Files:
5 edited

Legend:

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

    r1196 r1299  
    1 /* $Id: loadres.cpp,v 1.8 1999-10-08 19:34:25 dengert Exp $ */
     1/* $Id: loadres.cpp,v 1.9 1999-10-14 19:31:29 sandervl Exp $ */
    22
    33/*
     
    439439  return(hRet);
    440440}
    441 //******************************************************************************
    442 //******************************************************************************
     441/******************************************************************************
     442 * CopyImage32 [USER32.61]  Creates new image and copies attributes to it
     443 *
     444 * PARAMS
     445 *    hnd      [I] Handle to image to copy
     446 *    type     [I] Type of image to copy
     447 *    desiredx [I] Desired width of new image
     448 *    desiredy [I] Desired height of new image
     449 *    flags    [I] Copy flags
     450 *
     451 * RETURNS
     452 *    Success: Handle to newly created image
     453 *    Failure: NULL
     454 *
     455 * FIXME: implementation still lacks nearly all features, see LR_*
     456 * defines in windows.h
     457 *
     458 */
     459HICON WINAPI CopyImage( HANDLE hnd, UINT type, INT desiredx,
     460                             INT desiredy, UINT flags )
     461{
     462    dprintf(("CopyImage %x %d (%d,%d) %x", hnd, type, desiredx, desiredy, flags));
     463    switch (type)
     464    {
     465//      case IMAGE_BITMAP:
     466//              return BITMAP_CopyBitmap(hnd);
     467        case IMAGE_ICON:
     468                return CopyIcon(hnd);
     469        case IMAGE_CURSOR:
     470                return CopyCursor(hnd);
     471        default:
     472                dprintf(("CopyImage: Unsupported type"));
     473    }
     474    return 0;
     475}
     476//******************************************************************************
     477//******************************************************************************
  • trunk/src/user32/oslibwin.cpp

    r1297 r1299  
    1 /* $Id: oslibwin.cpp,v 1.28 1999-10-14 18:27:57 sandervl Exp $ */
     1/* $Id: oslibwin.cpp,v 1.29 1999-10-14 19:31:30 sandervl Exp $ */
    22/*
    33 * Window API wrappers for OS/2
     
    881881  OSLibWinConvertStyle(dwStyle, &dwExStyle, &OSWinStyle, &OSFrameStyle, &borderWidth, &borderHeight);
    882882
     883  OSWinStyle = OSWinStyle & ~(WS_TABSTOP | WS_GROUP | WS_CLIPCHILDREN);
     884
    883885  WinSetWindowULong(hwnd, QWL_STYLE,
    884886                    (WinQueryWindowULong(hwnd, QWL_STYLE) & ~0xffff0000) |
  • trunk/src/user32/pmwindow.cpp

    r1297 r1299  
    1 /* $Id: pmwindow.cpp,v 1.27 1999-10-14 18:27:58 sandervl Exp $ */
     1/* $Id: pmwindow.cpp,v 1.28 1999-10-14 19:31:31 sandervl Exp $ */
    22/*
    33 * Win32 Window Managment Code for OS/2
     
    298298                hParent = win32wnd->getParent()->getOS2WindowHandle();
    299299            else
    300                 hFrame = win32wnd->getOS2FrameWindowHandle();
     300                hFrame = WinQueryWindow(hwnd, QW_PARENT);
    301301        }
    302302        OSLibMapSWPtoWINDOWPOS(pswp, &wp, pswpo, hParent, hFrame);
    303303
    304304        SWP swpFrame;
    305         WinQueryWindowPos(win32wnd->getOS2FrameWindowHandle(), &swpFrame);
     305        WinQueryWindowPos(WinQueryWindow(hwnd, QW_PARENT), &swpFrame);
    306306        dprintf(("WINDOWPOSCHANGE %x %x %x (%d,%d) (%d,%d)", win32wnd->getWindowHandle(), win32wnd->getOS2FrameWindowHandle(),
    307307                         swpFrame.fl,swpFrame.x, swpFrame.y, swpFrame.cx, swpFrame.cy));
    308308        POINTL point;
     309
    309310        point.x = swpFrame.x;
    310311        point.y = swpFrame.y;
    311         WinMapWindowPoints(win32wnd->getOS2FrameWindowHandle(), HWND_DESKTOP,
    312                            &point, 1);
    313 
     312        if(win32wnd->getParent() != NULL)
     313        {
     314                WinMapWindowPoints(WinQueryWindow(hwnd, QW_PARENT), HWND_DESKTOP,
     315                                   &point, 1);
     316        }
     317        point.y = OSLibQueryScreenHeight() - point.y - swpFrame.cy;
    314318        win32wnd->setWindowRect(point.x, point.y, point.x+swpFrame.cx, point.y+swpFrame.cy);
    315319        win32wnd->setClientRect(pswpo->x, pswpo->y, pswpo->x + pswpo->cx, pswpo->y + pswpo->cy);
  • trunk/src/user32/user32.cpp

    r1267 r1299  
    1 /* $Id: user32.cpp,v 1.41 1999-10-13 16:02:42 phaller Exp $ */
     1/* $Id: user32.cpp,v 1.42 1999-10-14 19:31:31 sandervl Exp $ */
    22
    33/*
     
    23172317#endif
    23182318
    2319 /* Resource Functions */
    2320 
    2321 HANDLE WIN32API CopyImage(HANDLE hImage, UINT uType, int cxDesired, int cyDesired, UINT fuFlags)
    2322 {
    2323 #ifdef DEBUG
    2324   WriteLog("USER32:  CopyImage, not implemented\n");
    2325 #endif
    2326   switch(uType) {
    2327     case IMAGE_BITMAP:
    2328     case IMAGE_CURSOR:
    2329     case IMAGE_ICON:
    2330     default:
    2331 #ifdef DEBUG
    2332         WriteLog("USER32:  CopyImage, unknown type\n");
    2333 #endif
    2334         return(NULL);
    2335   }
    2336   return(NULL);
    2337 }
    2338 
    23392319/* Icon Functions */
    23402320
  • trunk/src/user32/win32wbase.cpp

    r1297 r1299  
    1 /* $Id: win32wbase.cpp,v 1.42 1999-10-14 18:27:59 sandervl Exp $ */
     1/* $Id: win32wbase.cpp,v 1.43 1999-10-14 19:31:32 sandervl Exp $ */
    22/*
    33 * Win32 Window Base Class for OS/2
     
    19631963    }
    19641964
     1965#if 0
     1966    if(showstate & SWPOS_SHOW && (getStyle() & WS_VISIBLE) == 0) {
     1967        SetWindowLongA(GWL_STYLE, getStyle() | WS_VISIBLE);
     1968    }
     1969#endif
    19651970    BOOL rc = OSLibWinShowWindow(OS2HwndFrame, showstate);
    19661971    return rc;
Note: See TracChangeset for help on using the changeset viewer.