Ignore:
Timestamp:
Dec 1, 1999, 7:23:29 PM (26 years ago)
Author:
cbratschi
Message:

enhanced edit control

File:
1 edited

Legend:

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

    r1828 r1922  
    1 /* $Id: scroll.cpp,v 1.25 1999-11-24 18:21:37 cbratschi Exp $ */
     1/* $Id: scroll.cpp,v 1.26 1999-12-01 18:23:28 cbratschi Exp $ */
    22/*
    33 * Scrollbar control
     
    8383      {
    8484        Win32BaseWindow *win32wnd = Win32BaseWindow::GetWindowFromHandle(hwnd);
     85
    8586        if (!win32wnd) return 0;
    86         if (nBar == SB_HORZ) return  Win32BaseWindow::OS2ToWin32Handle(win32wnd->getHorzScrollHandle());
    87         else return  Win32BaseWindow::OS2ToWin32Handle(win32wnd->getVertScrollHandle());
     87        if (nBar == SB_HORZ)
     88          return  (win32wnd->getStyle() & WS_HSCROLL) ? Win32BaseWindow::OS2ToWin32Handle(win32wnd->getHorzScrollHandle()):0;
     89        else
     90          return (win32wnd->getStyle() & WS_VSCROLL) ? Win32BaseWindow::OS2ToWin32Handle(win32wnd->getVertScrollHandle()):0;
    8891      }
     92
    8993    case SB_CTL:
    9094      return hwnd;
     
    14221426        {
    14231427          action = SA_SSI_HIDE;
     1428          infoPtr->flags = 0;
    14241429          goto done;
    14251430        }
     
    16301635        dprintf(("ShowScrollBar window not found!"));
    16311636        SetLastError(ERROR_INVALID_WINDOW_HANDLE);
    1632         return 0;
     1637        return FALSE;
    16331638      }
    16341639
     
    16631668  {
    16641669    Win32BaseWindow *window = Win32BaseWindow::GetWindowFromHandle(hwnd);
     1670
    16651671    if(!window)
    16661672    {
     
    16741680      BOOL rc = FALSE;
    16751681
    1676       if (nBar == SB_VERT || nBar == SB_BOTH)
     1682      if ((nBar == SB_VERT || nBar == SB_BOTH) && window->getStyle() & WS_VSCROLL)
    16771683      {
    16781684        HWND hwndScroll =  Win32BaseWindow::OS2ToWin32Handle(window->getVertScrollHandle());
     
    16901696        }
    16911697      }
    1692       if (nBar == SB_HORZ || (rc && nBar == SB_BOTH))
     1698      if ((nBar == SB_HORZ || (rc && nBar == SB_BOTH)) && window->getStyle() & WS_HSCROLL)
    16931699      {
    1694         HWND hwndScroll =  Win32BaseWindow::OS2ToWin32Handle(window->getVertScrollHandle());
     1700        HWND hwndScroll =  Win32BaseWindow::OS2ToWin32Handle(window->getHorzScrollHandle());
    16951701
    16961702        infoPtr = SCROLL_GetInfoPtr(hwndScroll,SB_VERT);
Note: See TracChangeset for help on using the changeset viewer.