Changeset 1281 for trunk/src


Ignore:
Timestamp:
Oct 14, 1999, 11:22:43 AM (26 years ago)
Author:
sandervl
Message:

Window creation rewrite + bugfixes. NOT WORKING CORRECTLY YET..

Location:
trunk/src/user32
Files:
9 edited

Legend:

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

    r1267 r1281  
    1 /* $Id: dc.cpp,v 1.12 1999-10-13 16:02:41 phaller Exp $ */
     1/* $Id: dc.cpp,v 1.13 1999-10-14 09:22:38 sandervl Exp $ */
    22
    33/*
     
    3333#include "dcdata.h"
    3434
    35 
    3635ODINDEBUGCHANNEL(USER32-DC)
    37 
    3836
    3937#undef SEVERITY_ERROR
     
    666664   }
    667665
    668    if (wnd->isFrameWindow())
    669    {
     666//   if (wnd->isFrameWindow())
     667//   {
    670668//      WinSendMsg( hwnd, /* WM_DRAW */ 0x20D, (MPARAM)hps, MPVOID );
    671669      selectClientArea(wnd, pHps, &rect);
    672    }
     670//   }
    673671
    674672   if (hPS_ownDC == 0)
  • trunk/src/user32/listbox.cpp

    r1265 r1281  
    1 /* $Id: listbox.cpp,v 1.4 1999-10-13 14:24:24 sandervl Exp $ */
     1/* $Id: listbox.cpp,v 1.5 1999-10-14 09:22:39 sandervl Exp $ */
    22/*
    33 * Listbox controls
     
    201201    else
    202202    {
    203         info.nMin  = 0;
    204         info.nMax = descr->nb_items - 1;
    205 //        info.nPos  = descr->top_item;
    206         info.nPos = descr->selected_item - 1;
     203        info.nPos  = descr->top_item;
     204
    207205        info.nPage = LISTBOX_GetCurrentPageSize( hwnd, descr );
    208206        info.fMask = SIF_RANGE | SIF_POS | SIF_PAGE;
     207        info.nMin  = 0;
     208//        info.nMax = descr->nb_items - info.nPage;
     209        info.nMax = descr->nb_items;
     210
    209211        if (descr->style & LBS_DISABLENOSCROLL)
    210212            info.fMask |= SIF_DISABLENOSCROLL;
  • trunk/src/user32/oslibwin.cpp

    r1265 r1281  
    1 /* $Id: oslibwin.cpp,v 1.26 1999-10-13 14:24:25 sandervl Exp $ */
     1/* $Id: oslibwin.cpp,v 1.27 1999-10-14 09:22:40 sandervl Exp $ */
    22/*
    33 * Window API wrappers for OS/2
     
    4848 HWND  hwndClient;
    4949
    50   if(dwFrameStyle)
    51         dprintf(("FRAME:    WinCreateWindow %x %x %x %s", hwndParent, dwWinStyle, dwFrameStyle, pszName));
    52   else  dprintf(("WinCreateWindow %x %x %x %s", hwndParent, dwWinStyle, dwFrameStyle, pszName));
     50  dprintf(("WinCreateWindow %x %x %x %s", hwndParent, dwWinStyle, dwFrameStyle, pszName));
    5351
    5452  if(pszName && *pszName == 0) {
     
    6260  }
    6361
    64   if(dwFrameStyle || hwndParent == HWND_DESKTOP) {
    65         ULONG dwClientStyle;
    66 
     62  ULONG dwClientStyle;
     63
     64//  if(dwFrameStyle || hwndParent == HWND_DESKTOP) {
    6765        dwClientStyle = dwWinStyle & ~(WS_TABSTOP | WS_GROUP);
    68 //        if(pszName)
    69 //                dwFrameStyle |= FCF_TITLEBAR;
    7066
    7167        dwFrameStyle |= FCF_NOBYTEALIGN;
    72         if (hwndParent == HWND_DESKTOP) dwFrameStyle |= FCF_TASKLIST | FCF_NOMOVEWITHOWNER;
     68        if (hwndParent == HWND_DESKTOP && dwFrameStyle & FCF_TITLEBAR)
     69                dwFrameStyle |= FCF_TASKLIST | FCF_NOMOVEWITHOWNER;
     70
    7371        dwWinStyle   &= ~WS_CLIPCHILDREN;
    7472
     
    8482        dprintf(("OSLibWinCreateWindow: (FRAME) WinCreateStdWindow failed (%x)", WinGetLastError(GetThreadHAB())));
    8583        return 0;
     84#if 0
    8685  }
    8786  hwndClient = WinCreateWindow(hwndParent, WIN32_STDCLASS, pszName, dwWinStyle, 0, 0, 0, 0,
     
    9089  *hwndFrame = hwndClient;
    9190  return hwndClient;
     91#endif
    9292}
    9393//******************************************************************************
     
    144144    if(dwStyle & WS_BORDER_W)
    145145    {
    146       *OSFrameStyle |= FCF_SIZEBORDER;
     146      *OSFrameStyle |= FCF_BORDER;
    147147      *borderHeight = *borderWidth = 1;
    148148    }
     
    182182  }
    183183
     184  //Clear certain frame bits when the window doesn't have a titlebar
     185  if(!(*OSFrameStyle & FCF_TITLEBAR)) {
     186        *OSFrameStyle &= ~(FCF_MINBUTTON|FCF_MAXBUTTON|FCF_SYSMENU);
     187  }
    184188  return TRUE;
    185189}
  • trunk/src/user32/pmwindow.cpp

    r1256 r1281  
    1 /* $Id: pmwindow.cpp,v 1.25 1999-10-12 14:47:22 sandervl Exp $ */
     1/* $Id: pmwindow.cpp,v 1.26 1999-10-14 09:22:40 sandervl Exp $ */
    22/*
    33 * Win32 Window Managment Code for OS/2
     
    168168MRESULT EXPENTRY Win32WindowProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
    169169{
    170  POSTMSG_PACKET *postmsg;
    171  OSLIBPOINT      point, ClientPoint;
    172  Win32BaseWindow    *win32wnd;
    173  APIRET          rc;
     170 POSTMSG_PACKET  *postmsg;
     171 OSLIBPOINT       point, ClientPoint;
     172 Win32BaseWindow *win32wnd;
     173 APIRET           rc;
    174174
    175175  //Restore our FS selector
     
    190190    //OS/2 msgs
    191191    case WM_CREATE:
     192    {
     193     THDB *thdb = GetThreadTHDB();
     194
     195        if(thdb == NULL || thdb->newWindow == 0)
     196            goto createfail;
     197
    192198        //Processing is done in after WinCreateWindow returns
    193199        dprintf(("OS2: WM_CREATE %x", hwnd));
     200        win32wnd = (Win32BaseWindow *)thdb->newWindow;
     201
     202        if(win32wnd->MsgCreate(WinQueryWindow(hwnd, QW_PARENT), hwnd) == FALSE)
     203        {
     204            delete win32wnd;
     205            RestoreOS2TIB();
     206            return (MRESULT)TRUE; //discontinue window creation
     207        }
     208    createfail:
    194209        RestoreOS2TIB();
    195210        return (MRESULT)FALSE;
     211    }
    196212
    197213    case WM_QUIT:
     
    285301        }
    286302        OSLibMapSWPtoWINDOWPOS(pswp, &wp, pswpo, hParent, hFrame);
     303
     304        SWP swpFrame;
     305        WinQueryWindowPos(win32wnd->getOS2FrameWindowHandle(), &swpFrame);
     306        dprintf(("WINDOWPOSCHANGE %x %x %x (%d,%d) (%d,%d)", win32wnd->getWindowHandle(), win32wnd->getOS2FrameWindowHandle(),
     307                         swpFrame.fl,swpFrame.x, swpFrame.y, swpFrame.cx, swpFrame.cy));
     308
     309        RECTL rect;
     310        WinQueryWindowRect(win32wnd->getOS2FrameWindowHandle(), &rect);
     311        dprintf(("WINDOWPOSCHANGE %x %x (%d,%d) (%d,%d)", win32wnd->getWindowHandle(), win32wnd->getOS2FrameWindowHandle(),
     312                         rect.xLeft, rect.yBottom, rect.xRight, rect.yTop));
    287313
    288314        win32wnd->setWindowRect(wp.x, wp.y, wp.x + wp.cx, wp.y + wp.cy);
  • trunk/src/user32/win32dlg.cpp

    r1265 r1281  
    1 /* $Id: win32dlg.cpp,v 1.13 1999-10-13 14:24:26 sandervl Exp $ */
     1/* $Id: win32dlg.cpp,v 1.14 1999-10-14 09:22:41 sandervl Exp $ */
    22/*
    33 * Win32 Dialog Code for OS/2
     
    169169
    170170    fIsDialog = TRUE;
    171     CreateWindowExA(&cs, classAtom);
    172 
    173     if(!isUnicode) {
    174         if(cs.lpszName) FreeAsciiString((LPSTR)cs.lpszName);
    175         if(HIWORD(cs.lpszClass)) {
    176                 FreeAsciiString((LPSTR)cs.lpszClass);
    177         }
    178     }
    179 
    180     if (!getWindowHandle())
     171    Win32DlgProc = dlgProc;
     172
     173    this->tmpParam       = param;
     174    this->tmpDlgTemplate = (LPSTR)dlgTemplate;
     175
     176    if (CreateWindowExA(&cs, classAtom) == FALSE)
    181177    {
    182178        if (hUserFont) DeleteObject( hUserFont );
    183179        if (hMenu) DestroyMenu( hMenu );
     180        SetLastError(ERROR_OUTOFMEMORY); //TODO: Wrong error
    184181        return;
     182    }
     183    SetLastError(0);
     184    return;
     185}
     186//******************************************************************************
     187//******************************************************************************
     188Win32Dialog::~Win32Dialog()
     189{
     190    if (hUserFont) DeleteObject( hUserFont );
     191    if (hMenu) DestroyMenu( hMenu );
     192}
     193//******************************************************************************
     194//******************************************************************************
     195ULONG Win32Dialog::MsgCreate(HWND hwndFrame, HWND hwndClient)
     196{
     197 CREATESTRUCTA  *cs = tmpcs;  //pointer to CREATESTRUCT used in CreateWindowExA method
     198 LPARAM       param = tmpParam;
     199 LPSTR  dlgTemplate = tmpDlgTemplate;
     200
     201    Win32BaseWindow::MsgCreate(hwndFrame, hwndClient);
     202
     203    if(!isUnicode) {
     204        if(cs->lpszName) FreeAsciiString((LPSTR)cs->lpszName);
     205        if(HIWORD(cs->lpszClass)) {
     206                FreeAsciiString((LPSTR)cs->lpszClass);
     207        }
    185208    }
    186209
    187210//TODO:
    188211//    wndPtr->helpContext = helpId;
    189     Win32DlgProc = dlgProc;
    190212
    191213    if (hUserFont)
     
    193215
    194216    /* Create controls */
    195     if (createControls(dlgTemplate, hInst))
     217    if (createControls(dlgTemplate, hInstance))
    196218    {
    197219        dprintf(("********* DIALOG CONTROLS CREATED ************"));
     
    199221        hwndFocus = GetNextDlgTabItem( getWindowHandle(), 0, FALSE );
    200222
    201     if (SendMessageA(WM_INITDIALOG, (WPARAM)hwndFocus, param ))
     223        if (SendMessageA(WM_INITDIALOG, (WPARAM)hwndFocus, param))
    202224             SetFocus(hwndFocus);
    203225
     
    207229            ::UpdateWindow( getWindowHandle() );
    208230        }
    209     SetLastError(0);
     231        SetLastError(0);
    210232        dprintf(("********* DIALOG CREATED ************"));
    211         return;
     233        return TRUE;
    212234    }
    213235    dprintf(("********* DIALOG CREATION FAILED! ************"));
    214     DestroyWindow();
    215 }
    216 //******************************************************************************
    217 //******************************************************************************
    218 Win32Dialog::~Win32Dialog()
    219 {
    220     if (hUserFont) DeleteObject( hUserFont );
    221     if (hMenu) DestroyMenu( hMenu );
    222 
     236    return FALSE;
    223237}
    224238/***********************************************************************
     
    10971111//******************************************************************************
    10981112//******************************************************************************
    1099 ULONG Win32Dialog::MsgOS2Create(HWND hwndOS2, ULONG initParam)
    1100 {
    1101     OS2Hwnd = hwndOS2;
    1102     return win32wndproc(Win32Hwnd, WM_CREATE, 0, initParam);
    1103 }
    1104 //******************************************************************************
    1105 //******************************************************************************
    11061113LONG Win32Dialog::SetWindowLongA(int index, ULONG value)
    11071114{
  • trunk/src/user32/win32dlg.h

    r1240 r1281  
    1 /* $Id: win32dlg.h,v 1.2 1999-10-10 08:59:41 sandervl Exp $ */
     1/* $Id: win32dlg.h,v 1.3 1999-10-14 09:22:41 sandervl Exp $ */
    22/*
    33 * Win32 Dialog Code for OS/2
     
    7373         BOOL   endDialog(int retval);
    7474
    75 virtual  ULONG  MsgOS2Create(HWND hwndOS2, ULONG initParam);
     75virtual  ULONG  MsgCreate(HWND hwndFrame, HWND hwndClient);
    7676
    7777virtual  LONG   SetWindowLongA(int index, ULONG value);
     
    113113        DWORD   dialogFlags;
    114114
     115        DWORD   tmpParam;       //set in ctor, used in MsgCreate method
     116        LPSTR   tmpDlgTemplate; //set in ctor, used in MsgCreate method
    115117private:
    116118 static BOOL    fInitialized;
  • trunk/src/user32/win32wbase.cpp

    r1265 r1281  
    1 /* $Id: win32wbase.cpp,v 1.40 1999-10-13 14:24:27 sandervl Exp $ */
     1/* $Id: win32wbase.cpp,v 1.41 1999-10-14 09:22:42 sandervl Exp $ */
    22/*
    33 * Win32 Window Base Class for OS/2
     
    4040#include "pmframe.h"
    4141#include "win32wdesktop.h"
     42#include <wprocess.h>
    4243
    4344#define HAS_DLGFRAME(style,exStyle) \
     
    9697{
    9798  isUnicode        = FALSE;
    98   fCreated         = FALSE;
    9999  fFirstShow       = TRUE;
    100100  fIsDialog        = FALSE;
    101101  fInternalMsg     = FALSE;
     102  fNoSizeMsg       = FALSE;
    102103
    103104  windowNameA      = NULL;
     
    203204{
    204205 char  buffer[256];
    205  INT   sw = SW_SHOW;
    206206 POINT maxSize, maxPos, minTrack, maxTrack;
    207207
     
    210210#endif
    211211
     212    sw = SW_SHOW;
    212213    SetLastError(0);
    213214
     
    463464  rectClient        = rectWindow;
    464465
    465 //CB: dwOSFrameStyle handled by OSLibWinConvertStyle
    466 //    OSLibWinCreateWindow: perhaps problems
    467 //    shouldn't we always use a frame? -> no problems with scrollbars
    468 
    469466  if(HIWORD(cs->lpszName))
    470467  {
     
    474471  }
    475472
     473  //copy pointer of CREATESTRUCT for usage in MsgCreate method
     474  tmpcs = cs;
     475
     476  //Store our window object pointer in thread local memory, so PMWINDOW.CPP can retrieve it
     477  THDB *thdb = GetThreadTHDB();
     478
     479  if(thdb == NULL) {
     480        dprintf(("Window creation failed - thdb == NULL")); //this is VERY bad
     481        ExitProcess(666);
     482        return FALSE;
     483  }
     484
     485  thdb->newWindow = (ULONG)this;
     486
    476487  OS2Hwnd = OSLibWinCreateWindow((getParent()) ? getParent()->getOS2WindowHandle() : OSLIB_HWND_DESKTOP,
    477488                                 dwOSWinStyle, dwOSFrameStyle, (char *)windowNameA,
     
    485496        return FALSE;
    486497  }
     498  SetLastError(0);
     499  return TRUE;
     500}
     501//******************************************************************************
     502//******************************************************************************
     503BOOL Win32BaseWindow::MsgCreate(HWND hwndFrame, HWND hwndClient)
     504{
     505 POINT maxPos;
     506 CREATESTRUCTA  *cs = tmpcs;  //pointer to CREATESTRUCT used in CreateWindowExA method
     507
     508  OS2Hwnd      = hwndClient;
     509  OS2HwndFrame = hwndFrame;
     510//  if(!isFrameWindow())
     511//        OS2HwndFrame = hwndClient;
    487512
    488513  if(OSLibWinSetWindowULong(OS2Hwnd, OFFSET_WIN32WNDPTR, (ULONG)this) == FALSE) {
     
    523548#endif
    524549
    525   if (cs->style & WS_HSCROLL)
     550  if (dwStyle & WS_HSCROLL)
    526551  {
    527552        hwndHorzScroll = OSLibWinQueryScrollBarHandle(OS2HwndFrame, OSLIB_HSCROLL);
    528         OSLibWinShowScrollBar(OS2HwndFrame, hwndHorzScroll, OSLIB_HSCROLL, FALSE, TRUE);
    529   }
    530 
    531   if (cs->style & WS_VSCROLL) {
     553//        OSLibWinShowScrollBar(OS2HwndFrame, hwndHorzScroll, OSLIB_HSCROLL, FALSE, TRUE);
     554  }
     555
     556  if (dwStyle & WS_VSCROLL) {
    532557        hwndVertScroll = OSLibWinQueryScrollBarHandle(OS2HwndFrame, OSLIB_VSCROLL);
    533         OSLibWinShowScrollBar(OS2HwndFrame, hwndVertScroll, OSLIB_VSCROLL, FALSE, TRUE);
     558//        OSLibWinShowScrollBar(OS2HwndFrame, hwndVertScroll, OSLIB_VSCROLL, FALSE, TRUE);
    534559  }
    535560
     
    558583  if(windowClass->getIcon())
    559584        SetIcon(windowClass->getIcon());
    560 
    561   if(getParent()) {
    562         SetWindowPos(getParent()->getWindowHandle(), rectClient.left, rectClient.top,
    563                      rectClient.right-rectClient.left,
    564                      rectClient.bottom-rectClient.top,
    565                      SWP_NOACTIVATE | SWP_NOZORDER );
    566   }
    567   else {
    568         SetWindowPos(HWND_TOP, rectClient.left, rectClient.top,
    569                      rectClient.right-rectClient.left,
    570                      rectClient.bottom-rectClient.top,
    571                      SWP_NOACTIVATE);
    572   }
    573585
    574586  //Subclass frame
     
    580592  }
    581593
    582   //Get the client window rectangle
    583   GetClientRect(Win32Hwnd, &rectClient);
    584 
    585594  /* Send the WM_CREATE message
    586595   * Perhaps we shouldn't allow width/height changes as well.
     
    589598  maxPos.x = rectWindow.left; maxPos.y = rectWindow.top;
    590599
     600  fNoSizeMsg = TRUE;
     601  if(getParent()) {
     602        SetWindowPos(getParent()->getWindowHandle(), rectClient.left, rectClient.top,
     603                     rectClient.right-rectClient.left,
     604                     rectClient.bottom-rectClient.top,
     605                     SWP_NOACTIVATE | SWP_NOZORDER );
     606  }
     607  else {
     608        SetWindowPos(HWND_TOP, rectClient.left, rectClient.top,
     609                     rectClient.right-rectClient.left,
     610                     rectClient.bottom-rectClient.top,
     611                     SWP_NOACTIVATE);
     612  }
     613  fNoSizeMsg = FALSE;
     614
    591615  if(SendMessageA(WM_NCCREATE, 0, (LPARAM)cs) )
    592616  {
    593         fCreated = TRUE; //Allow WM_SIZE messages now
    594617        SendNCCalcSize(FALSE, &rectWindow, NULL, NULL, 0, &rectClient );
    595618
     
    604627                SendMessageA(WM_MOVE, 0, MAKELONG( rectClient.left, rectClient.top ) );
    605628            }
     629
    606630            if (cs->style & WS_VISIBLE) ShowWindow( sw );
    607631
     
    617641  }
    618642  dprintf(("Window creation FAILED (NCCREATE cancelled creation)"));
    619   fCreated = FALSE;
    620   OSLibWinSetWindowULong(OS2Hwnd, OFFSET_WIN32WNDPTR, 0);
    621   OSLibWinSetWindowULong(OS2Hwnd, OFFSET_WIN32PM_MAGIC, 0);
    622   DestroyWindow();
    623643  SetLastError(ERROR_OUTOFMEMORY); //TODO: Better error
    624644  return FALSE;
    625 }
    626 //******************************************************************************
    627 //******************************************************************************
    628 ULONG Win32BaseWindow::MsgCreate(HWND hwndOS2, ULONG initParam)
    629 {
    630   OS2Hwnd = hwndOS2;
    631   return SendInternalMessageA(WM_CREATE, 0, initParam);
    632645}
    633646//******************************************************************************
     
    680693{
    681694    dprintf(("MsgPosChanging"));
    682 #if 1
    683     if(fCreated == FALSE) {
     695    if(fNoSizeMsg)
    684696        return 1;
    685     }
    686 #endif
     697
    687698    return SendInternalMessageA(WM_WINDOWPOSCHANGING, 0, lp);
    688699}
     
    692703{
    693704    dprintf(("MsgPosChanged"));
    694 #if 1
    695     if(fCreated == FALSE) {
     705    if(fNoSizeMsg)
    696706        return 1;
    697     }
    698 #endif
     707
    699708    return SendInternalMessageA(WM_WINDOWPOSCHANGED, 0, lp);
    700709}
     
    704713{
    705714    dprintf(("MsgMove to (%d,%d)", x, y));
    706     if(fCreated == FALSE) {
     715    if(fNoSizeMsg)
    707716        return 1;
    708     }
    709717
    710718    return SendInternalMessageA(WM_MOVE, 0, MAKELONG((USHORT)x, (USHORT)y));
     
    755763{
    756764 WORD fwSizeType = 0;
    757 
    758     if(fCreated == FALSE) {//Solitaire crashes if it receives a WM_SIZE during CreateWindowEx (normal or our fault?)
    759         return 1;
    760     }
    761765
    762766    if(fMinimize) {
     
    11151119}
    11161120//******************************************************************************
     1121//******************************************************************************
     1122BOOL Win32BaseWindow::isFrameWindow()
     1123{
     1124    if((getParent() == NULL || getParent() == windowDesktop) && ((dwStyle & WS_CAPTION) == WS_CAPTION))
     1125        return TRUE;
     1126
     1127    return FALSE;
     1128}
     1129//******************************************************************************
    11171130//TODO: Not complete (flags)
    11181131//******************************************************************************
     
    11761189        {
    11771190            infoPtr->Page = info->nPage;
     1191            dprintf(("SetScrollInfo: Set pagesize to %d", info->nPage));
    11781192            OSLibWinSetScrollPageSize(OS2HwndFrame, hwndScroll, info->nPage, infoPtr->MaxVal, fRedraw);
    11791193        }
     
    11861200        {
    11871201            infoPtr->CurVal = info->nPos;
     1202            dprintf(("SetScrollInfo: Set scroll position to %d", info->nPos));
    11881203            OSLibWinSetScrollPos(OS2HwndFrame, hwndScroll, info->nPos, fRedraw);
    11891204        }
     
    12081223                infoPtr->MaxVal = info->nMax;
    12091224
     1225                dprintf(("SetScrollInfo: Set scroll range to (%d,%d)", info->nMin, info->nMax));
    12101226                OSLibWinSetScrollRange(OS2HwndFrame, hwndScroll, info->nMin, info->nMax, fRedraw);
    12111227            }
     
    19842000       {
    19852001           hParent = getParent()->getOS2WindowHandle();
    1986            OSLibWinQueryWindowPos(isFrameWindow() ? OS2HwndFrame:OS2Hwnd, &swpOld);
    19872002       }
    1988        else
    1989            OSLibWinQueryWindowPos(OS2HwndFrame, &swpOld);
     2003       OSLibWinQueryWindowPos(OS2HwndFrame, &swpOld);
    19902004   }
    19912005
     
    19942008      return TRUE;
    19952009
    1996    if ((swp.fl & SWPOS_ZORDER) && (swp.hwndInsertBehind > HWNDOS_BOTTOM))
     2010//   if ((swp.fl & SWPOS_ZORDER) && (swp.hwndInsertBehind > HWNDOS_BOTTOM))
     2011   if ((swp.hwndInsertBehind > HWNDOS_BOTTOM))
    19972012   {
    1998       Win32BaseWindow *wndBehind = Win32BaseWindow::GetWindowFromHandle(swp.hwndInsertBehind);
    1999       swp.hwndInsertBehind   = wndBehind->getOS2WindowHandle();
     2013        Win32BaseWindow *wndBehind = Win32BaseWindow::GetWindowFromHandle(swp.hwndInsertBehind);
     2014        if(wndBehind) {
     2015            swp.hwndInsertBehind   = wndBehind->getOS2WindowHandle();
     2016        }
     2017        else {
     2018            dprintf(("ERROR: SetWindowPos: hwndInsertBehind %x invalid!",swp.hwndInsertBehind));
     2019            swp.hwndInsertBehind = 0;
     2020        }
    20002021   }
     2022#if 0
    20012023   if (isFrameWindow())
    20022024   {
     
    20152037   }
    20162038   else
    2017       swp.hwnd = OS2Hwnd;
     2039#endif
     2040      swp.hwnd = OS2HwndFrame;
    20182041
    20192042   dprintf (("WinSetWindowPos %x %x (%d,%d)(%d,%d) %x", swp.hwnd, swp.hwndInsertBehind, swp.x, swp.y, swp.cx, swp.cy, swp.fl));
  • trunk/src/user32/win32wbase.h

    r1265 r1281  
    1 /* $Id: win32wbase.h,v 1.21 1999-10-13 14:24:28 sandervl Exp $ */
     1/* $Id: win32wbase.h,v 1.22 1999-10-14 09:22:42 sandervl Exp $ */
    22/*
    33 * Win32 Window Base Class for OS/2
     
    6161virtual        ~Win32BaseWindow();
    6262
    63 virtual  ULONG  MsgCreate(HWND hwndOS2, ULONG initParam);
     63virtual  ULONG  MsgCreate(HWND hwndFrame, HWND hwndClient);
    6464         ULONG  MsgQuit();
    6565         ULONG  MsgClose();
     
    106106 Win32WndClass *getWindowClass()                { return windowClass; };
    107107
    108          BOOL   isFrameWindow()                 { return OS2Hwnd != OS2HwndFrame; };
     108         BOOL   isFrameWindow();
    109109virtual  BOOL   isMDIClient();
    110110
     
    242242
    243243        BOOL    isIcon;
    244         BOOL    fCreated;
    245244        BOOL    fFirstShow;
    246245        BOOL    fIsDialog;
    247246        BOOL    fInternalMsg;           //Used to distinguish between messages
    248247                                        //sent by PM and those sent by apps
     248        BOOL    fNoSizeMsg;
    249249
    250250        PVOID   pOldFrameProc;
     
    266266        RECT    rectWindow;
    267267        RECT    rectClient;
     268
     269CREATESTRUCTA  *tmpcs; //temporary pointer to CREATESTRUCT used in CreateWindowEx
     270        ULONG   sw;    //set in CreateWindowExA, used in MsgCreate method
    268271
    269272SCROLLBAR_INFO *vertScrollInfo;
  • trunk/src/user32/winprop.cpp

    r1231 r1281  
    1 /* $Id: winprop.cpp,v 1.3 1999-10-09 18:16:58 sandervl Exp $ */
     1/* $Id: winprop.cpp,v 1.4 1999-10-14 09:22:43 sandervl Exp $ */
    22/*
    33 * Win32 Property apis for OS/2
     
    114114#ifdef DEBUG
    115115    if(HIWORD(arg2) != 0)
    116          dprintf(("USER32: RemovePropA %S\n", arg2));
     116         dprintf(("USER32: RemovePropA %s\n", arg2));
    117117    else dprintf(("USER32: RemovePropA %X\n", arg2));
    118118#endif
    119     return O32_RemoveProp(window->getWindowHandle(), arg2);
     119    return O32_RemoveProp(window->getOS2WindowHandle(), arg2);
    120120}
    121121//******************************************************************************
     
    150150#ifdef DEBUG
    151151    if(HIWORD(arg2) != 0)
    152          dprintf(("USER32: SetPropA %S to %x\n", arg2, arg3));
     152         dprintf(("USER32: SetPropA %s to %x\n", arg2, arg3));
    153153    else dprintf(("USER32: SetPropA %X to %x\n", arg2, arg3));
    154154#endif
    155     return O32_SetProp(window->getWindowHandle(), arg2, arg3);
     155    return O32_SetProp(window->getOS2WindowHandle(), arg2, arg3);
    156156}
    157157//******************************************************************************
Note: See TracChangeset for help on using the changeset viewer.