Changeset 7765 for trunk/src


Ignore:
Timestamp:
Jan 12, 2002, 3:09:54 PM (24 years ago)
Author:
sandervl
Message:

CreateFakeWindowEx changes + added DestroyFakeWindow

Location:
trunk/src/user32
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/user32/USER32.DEF

    r7762 r7765  
    1 ; $Id: USER32.DEF,v 1.68 2002-01-12 09:55:51 sandervl Exp $
     1; $Id: USER32.DEF,v 1.69 2002-01-12 14:09:30 sandervl Exp $
    22
    33LIBRARY USER32 INITINSTANCE TERMINSTANCE
     
    698698
    699699    _CreateFakeWindowEx@8                                        @2028 NONAME
     700    _DestroyFakeWindow@4                                         @2035 NONAME
    700701    _checkOrigin@4                                               @2029 NONAME
    701702
  • trunk/src/user32/oslibwin.cpp

    r7669 r7765  
    1 /* $Id: oslibwin.cpp,v 1.111 2001-12-22 12:12:06 sandervl Exp $ */
     1/* $Id: oslibwin.cpp,v 1.112 2002-01-12 14:09:30 sandervl Exp $ */
    22/*
    33 * Window API wrappers for OS/2
     
    357357{
    358358  return WinDestroyWindow(hwnd);
     359}
     360//******************************************************************************
     361//******************************************************************************
     362BOOL  OSLibWinQueryWindowClientRect(HWND hwndOS2, PRECT pRect)
     363{
     364 BOOL     rc;
     365 RECTLOS2 rectl;
     366
     367  rc = WinQueryWindowRect(hwndOS2, (PRECTL)&rectl);
     368  if(rc) {
     369        pRect->left   = 0;
     370        pRect->right  = rectl.xRight - rectl.xLeft;
     371        pRect->top    = 0;
     372        pRect->bottom = rectl.yTop - rectl.yBottom;
     373  }
     374  else  memset(pRect, 0, sizeof(RECT));
     375  return rc;
    359376}
    360377//******************************************************************************
  • trunk/src/user32/oslibwin.h

    r7500 r7765  
    1 /* $Id: oslibwin.h,v 1.62 2001-11-30 13:53:50 sandervl Exp $ */
     1/* $Id: oslibwin.h,v 1.63 2002-01-12 14:09:31 sandervl Exp $ */
    22/*
    33 * Window API wrappers for OS/2
     
    7474HWND OSLibWinWindowFromID(HWND hwndParent,ULONG id);
    7575BOOL OSLibWinSetFocus(HWND hwndDeskTop,HWND hwndNewFocus, BOOL activate);
    76 ULONG OSLibGetWindowHeight(HWND hwnd); //for point transformation
    7776
    7877extern ULONG ScreenHeight, ScreenWidth;
     
    239238#define RELATIVE_TO_SCREEN 1
    240239BOOL  OSLibWinQueryWindowRect(Win32BaseWindow *window, PRECT pRect, int RelativeTo = RELATIVE_TO_WINDOW);
     240ULONG OSLibGetWindowHeight(HWND hwnd); //for point transformation
     241
     242BOOL  OSLibWinQueryWindowClientRect(HWND hwnd, PRECT pRect);
     243
    241244BOOL  OSLibWinCalcFrameRect(HWND hwnd, RECT *pRect, BOOL fClient);
    242245BOOL  OSLibGetMinMaxInfo(HWND hwndFrame, MINMAXINFO *pMinMax);
  • trunk/src/user32/win32wbase.cpp

    r7762 r7765  
    1 /* $Id: win32wbase.cpp,v 1.310 2002-01-12 09:55:51 sandervl Exp $ */
     1/* $Id: win32wbase.cpp,v 1.311 2002-01-12 14:09:31 sandervl Exp $ */
    22/*
    33 * Win32 Window Base Class for OS/2
     
    111111                     : GenericObject(&windows, &critsect), ChildWindow(&critsect)
    112112{
    113   Init();
     113    Init();
    114114}
    115115//******************************************************************************
     
    143143    dwOldStyle = dwStyle;
    144144    dwExStyle  = 0;
     145
     146    //We pretend this window has no parent and won't change size
     147    //(dangerous assumption!!)
     148    OSLibWinQueryWindowClientRect(OS2Hwnd, &rectClient);
     149    rectWindow = rectClient;
     150
     151    fFakeWindow = TRUE;
    145152}
    146153//******************************************************************************
     
    149156                     : GenericObject(&windows, &critsect), ChildWindow(&critsect)
    150157{
    151   Init();
    152   this->isUnicode = isUnicode;
    153   CreateWindowExA(lpCreateStructA, classAtom);
     158    Init();
     159    this->isUnicode = isUnicode;
     160    CreateWindowExA(lpCreateStructA, classAtom);
    154161}
    155162//******************************************************************************
     
    171178  fVisibleRegionChanged = FALSE;
    172179  fEraseBkgndFlag  = TRUE;
     180  fFakeWindow      = FALSE;
    173181
    174182  state            = STATE_INIT;
     
    315323    if(owner && !fDestroyAll) {
    316324        RELEASE_WNDOBJ(owner);
    317     }
    318     if(windowClass) {
    319         RELEASE_CLASSOBJ(windowClass);
    320325    }
    321326}
  • trunk/src/user32/win32wbase.h

    r7762 r7765  
    1 /* $Id: win32wbase.h,v 1.137 2002-01-12 09:55:52 sandervl Exp $ */
     1/* $Id: win32wbase.h,v 1.138 2002-01-12 14:09:31 sandervl Exp $ */
    22/*
    33 * Win32 Window Base Class for OS/2
     
    429429                 fMinMaxChange:1,        //set when switching between min/max/restored state
    430430                 fVisibleRegionChanged:1, //set when visible region has changed -> erase background must be sent during next BeginPaint
    431                  fEraseBkgndFlag:1;
     431                 fEraseBkgndFlag:1,
     432                 fFakeWindow:1;
    432433
    433434        ULONG   state;
  • trunk/src/user32/window.cpp

    r7762 r7765  
    1 /* $Id: window.cpp,v 1.114 2002-01-12 09:55:52 sandervl Exp $ */
     1/* $Id: window.cpp,v 1.115 2002-01-12 14:09:32 sandervl Exp $ */
    22/*
    33 * Win32 window apis for OS/2
     
    281281    RELEASE_WNDOBJ(window);
    282282    return hwnd;
     283}
     284//******************************************************************************
     285//******************************************************************************
     286ODINFUNCTION1(BOOL, DestroyFakeWindow,
     287              HWND, hwnd)
     288{
     289  Win32BaseWindow *window;
     290
     291    window = Win32BaseWindow::GetWindowFromHandle(hwnd);
     292    if(!window) {
     293        dprintf(("DestroyFakeWindow, window %x not found", hwnd));
     294        SetLastError(ERROR_INVALID_WINDOW_HANDLE);
     295        return 0;
     296    }
     297    delete window;
     298    return TRUE;
    283299}
    284300//******************************************************************************
Note: See TracChangeset for help on using the changeset viewer.