Ignore:
Timestamp:
Oct 7, 1999, 11:28:02 AM (26 years ago)
Author:
sandervl
Message:

EB's fixes + scrollbar changes

File:
1 edited

Legend:

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

    r1148 r1159  
    1 /* $Id: win32wbase.cpp,v 1.25 1999-10-06 07:56:37 sandervl Exp $ */
     1/* $Id: win32wbase.cpp,v 1.26 1999-10-07 09:28:01 sandervl Exp $ */
    22/*
    33 * Win32 Window Base Class for OS/2
     
    126126  horzScrollInfo     = NULL;
    127127  vertScrollInfo     = NULL;
    128 
     128  hwndHorzScroll     = 0;
     129  hwndVertScroll     = 0;
    129130}
    130131//******************************************************************************
     
    160161        horzScrollInfo = NULL;
    161162  }
     163  //TODO: Destroy windows if they're not associated with our window anymore (showwindow false)?
     164//  hwndHorzScroll
     165//  hwndVertScroll
     166
    162167}
    163168//******************************************************************************
     
    475480#endif
    476481
     482  if (cs->style & WS_HSCROLL)
     483  {
     484        hwndHorzScroll = OSLibWinQueryScrollBarHandle(OS2HwndFrame, OSLIB_HSCROLL);
     485  }
     486
     487  if (cs->style & WS_VSCROLL) {
     488        hwndVertScroll = OSLibWinQueryScrollBarHandle(OS2HwndFrame, OSLIB_VSCROLL);
     489  }
     490
    477491  fakeWinBase.hwndThis     = OS2Hwnd;
    478492  fakeWinBase.pWindowClass = windowClass;
     
    491505        }
    492506  }
    493   else  windowId = (UINT)cs->hMenu;
     507  else
     508  {
     509        setWindowId((DWORD)cs->hMenu);
     510  }
    494511
    495512  //Set icon from class
     
    12581275    case SB_HORZ:
    12591276        if(horzScrollInfo) {
    1260             horzScrollInfo->CurVal = OSLibWinGetScrollPos(OS2HwndFrame, OSLIB_HSCROLL);
     1277            horzScrollInfo->CurVal = OSLibWinGetScrollPos(OS2HwndFrame, hwndHorzScroll);
    12611278            return horzScrollInfo;
    12621279        }
     
    12641281    case SB_VERT:
    12651282        if(vertScrollInfo) {
    1266             vertScrollInfo->CurVal = OSLibWinGetScrollPos(OS2HwndFrame, OSLIB_VSCROLL);
     1283            vertScrollInfo->CurVal = OSLibWinGetScrollPos(OS2HwndFrame, hwndVertScroll);
    12671284            return vertScrollInfo;
    12681285        }
     
    12771294{
    12781295  SCROLLBAR_INFO *infoPtr;
     1296  HWND            hwndScroll;
    12791297  ULONG           scrollType;
    12801298  int             new_flags;
     
    12861304        }
    12871305        infoPtr = horzScrollInfo;
     1306        hwndScroll = hwndHorzScroll;
    12881307        scrollType = OSLIB_HSCROLL;
    12891308        break;
     
    12931312        }
    12941313        infoPtr = vertScrollInfo;
     1314        hwndScroll = hwndVertScroll;
    12951315        scrollType = OSLIB_VSCROLL;
    12961316        break;
     
    13091329        {
    13101330            infoPtr->Page = info->nPage;
    1311             OSLibWinSetScrollPageSize(OS2HwndFrame, scrollType, info->nPage, infoPtr->MaxVal, fRedraw);
     1331            OSLibWinSetScrollPageSize(OS2HwndFrame, hwndScroll, info->nPage, infoPtr->MaxVal, fRedraw);
    13121332        }
    13131333    }
     
    13191339        {
    13201340            infoPtr->CurVal = info->nPos;
    1321             OSLibWinSetScrollPos(OS2HwndFrame, scrollType, info->nPos, fRedraw);
     1341            OSLibWinSetScrollPos(OS2HwndFrame, hwndScroll, info->nPos, fRedraw);
    13221342        }
    13231343    }
     
    13411361                infoPtr->MaxVal = info->nMax;
    13421362
    1343                 OSLibWinSetScrollRange(OS2HwndFrame, scrollType, info->nMin, info->nMax, fRedraw);
     1363                OSLibWinSetScrollRange(OS2HwndFrame, hwndScroll, info->nMin, info->nMax, fRedraw);
    13441364            }
    13451365        }
     
    23812401        case GWL_HWNDPARENT:
    23822402                return SetParent((HWND)value);
    2383 
    23842403        case GWL_ID:
    23852404                oldval = getWindowId();
     
    24602479//******************************************************************************
    24612480//******************************************************************************
     2481void Win32BaseWindow::setWindowId(DWORD id)
     2482{
     2483   windowId = id;
     2484   OSLibSetWindowID(OS2HwndFrame, id);
     2485}
     2486//******************************************************************************
     2487//******************************************************************************
    24622488Win32BaseWindow *Win32BaseWindow::GetWindowFromHandle(HWND hwnd)
    24632489{
Note: See TracChangeset for help on using the changeset viewer.