Changeset 1258 for trunk/src


Ignore:
Timestamp:
Oct 12, 1999, 8:14:56 PM (26 years ago)
Author:
sandervl
Message:

Lots of changes again

Location:
trunk/src/user32
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/user32/Makefile

    r1256 r1258  
    1 # $Id: Makefile,v 1.29 1999-10-12 14:47:21 sandervl Exp $
     1# $Id: Makefile,v 1.30 1999-10-12 18:14:53 sandervl Exp $
    22
    33#
     
    8282button.obj: button.cpp $(PDWIN32_INCLUDE)\win\button.h
    8383static.obj: static.cpp $(PDWIN32_INCLUDE)\win\static.h
    84 scroll.obj: scroll.cpp $(PDWIN32_INCLUDE)\win\scroll.h win32wbase.h
     84scroll.obj: scroll.cpp $(PDWIN32_INCLUDE)\win\scroll.h win32wbase.h oslibwin.h
    8585listbox.obj: listbox.cpp $(PDWIN32_INCLUDE)\win\combo.h
    8686combo.obj: combo.cpp $(PDWIN32_INCLUDE)\win\combo.h
  • trunk/src/user32/button.cpp

    r1243 r1258  
    1 /* $Id: button.cpp,v 1.8 1999-10-10 11:26:34 cbratschi Exp $ */
     1/* $Id: button.cpp,v 1.9 1999-10-12 18:14:53 sandervl Exp $ */
    22/* File: button.cpp -- Button type widgets
    33 *
     
    257257  }
    258258
    259   return 0;
     259  return 1; //SvL: Bugfix -> PMWINDOW expects non-zero return value if
     260            //               we want to restore the default mouse cursor
    260261}
    261262
  • trunk/src/user32/edit.cpp

    r1203 r1258  
    1 /* $Id: edit.cpp,v 1.2 1999-10-08 21:24:07 cbratschi Exp $ */
     1/* $Id: edit.cpp,v 1.3 1999-10-12 18:14:54 sandervl Exp $ */
    22/*
    33 *      Edit control
     
    32163216
    32173217        if (GetCapture() != hwnd)
    3218                 return 0;
     3218                return 1; //SvL: Bugfix
    32193219
    32203220        /*
     
    32283228        e = EDIT_CharFromPos(hwnd, es, x, y, &after_wrap);
    32293229        EDIT_EM_SetSel(hwnd, es, es->selection_start, e, after_wrap);
    3230         return 0;
     3230
     3231        return 1; //SvL: Bugfix -> PMWINDOW expects non-zero return value if
     3232                  //               we want to restore the default mouse cursor
    32313233}
    32323234
  • trunk/src/user32/listbox.cpp

    r1203 r1258  
    1 /* $Id: listbox.cpp,v 1.2 1999-10-08 21:24:40 cbratschi Exp $ */
     1/* $Id: listbox.cpp,v 1.3 1999-10-12 18:14:55 sandervl Exp $ */
    22/*
    33 * Listbox controls
     
    186186    {
    187187        info.nMin  = 0;
    188         info.nMax  = (descr->nb_items - 1) / descr->page_size;
     188        info.nMax = (descr->nb_items - 1) / descr->page_size;
    189189        info.nPos  = descr->top_item / descr->page_size;
    190190        info.nPage = descr->width / descr->column_width;
     
    201201    {
    202202        info.nMin  = 0;
    203         info.nMax  = descr->nb_items - 1;
    204         info.nPos  = descr->top_item;
     203        info.nMax = descr->nb_items - 1;
     204//        info.nPos  = descr->top_item;
     205        info.nPos = descr->selected_item - 1;
    205206        info.nPage = LISTBOX_GetCurrentPageSize( hwnd, descr );
    206207        info.fMask = SIF_RANGE | SIF_POS | SIF_PAGE;
    207208        if (descr->style & LBS_DISABLENOSCROLL)
    208209            info.fMask |= SIF_DISABLENOSCROLL;
    209         SetScrollInfo( hwnd, SB_VERT, &info, TRUE );
     210
     211        if(info.nMax > (INT)info.nPage) {
     212            ShowScrollBar(hwnd, SB_VERT, TRUE);
     213            EnableScrollBar(hwnd, SB_VERT, ESB_ENABLE_BOTH);           
     214            SetScrollInfo( hwnd, SB_VERT, &info, TRUE );
     215        }
     216        else {
     217            ShowScrollBar(hwnd, SB_VERT, FALSE);
     218            EnableScrollBar(hwnd, SB_VERT, ESB_DISABLE_BOTH);           
     219        }
    210220
    211221        if (descr->horz_extent)
     
    25502560            LISTBOX_HandleMouseMove( hwnd, descr, (INT16)LOWORD(lParam),
    25512561                                     (INT16)HIWORD(lParam) );
    2552         return 0;
     2562        return 1; //SvL: Bugfix -> PMWINDOW expects non-zero return value if
     2563                  //               we want to restore the default mouse cursor
     2564
    25532565    case WM_LBUTTONUP:
    25542566        return LISTBOX_HandleLButtonUp( hwnd, descr );
  • trunk/src/user32/oslibwin.cpp

    r1256 r1258  
    1 /* $Id: oslibwin.cpp,v 1.22 1999-10-12 14:47:22 sandervl Exp $ */
     1/* $Id: oslibwin.cpp,v 1.23 1999-10-12 18:14:55 sandervl Exp $ */
    22/*
    33 * Window API wrappers for OS/2
     
    622622            y = parentHeight - y - pswpOld->cy;
    623623         }
     624         else     y = parentHeight - y - cy;
    624625      }
    625 
     626      else     y = parentHeight - y - cy;
     627 
    626628      if (flags & SWP_SIZE)
    627629      {
     
    635637      }
    636638
    637       y = parentHeight - y - cy;
    638 
    639       if ((pswpOld->x == x) && (pswpOld->y == y))
     639       if ((pswpOld->x == x) && (pswpOld->y == y))
    640640         flags &= ~SWP_MOVE;
    641641
     
    738738//******************************************************************************
    739739//******************************************************************************
    740 BOOL OSLibWinShowScrollBar(HWND hwndParent, HWND hwndScroll, int scrollBar, BOOL fShow)
     740BOOL OSLibWinShowScrollBar(HWND hwndParent, HWND hwndScroll, int scrollBar,
     741                           BOOL fShow, BOOL fForceChange)
    741742{
    742743   if(hwndScroll == NULL) {
     
    745746   }
    746747
    747    if(fShow != WinIsWindowVisible(hwndScroll))
     748   if(fShow != WinIsWindowVisible(hwndScroll) || fForceChange)
    748749   {
    749750         WinSetParent(hwndScroll, fShow ? hwndParent : HWND_OBJECT, FALSE);
  • trunk/src/user32/oslibwin.h

    r1248 r1258  
    1 /* $Id: oslibwin.h,v 1.13 1999-10-11 16:04:51 cbratschi Exp $ */
     1/* $Id: oslibwin.h,v 1.14 1999-10-12 18:14:56 sandervl Exp $ */
    22/*
    33 * Window API wrappers for OS/2
     
    260260#define OSLIB_VSCROLL   1
    261261BOOL  OSLibWinEnableScrollBar(HWND hwndParent, int scrollBar, BOOL fEnable);
    262 BOOL  OSLibWinShowScrollBar(HWND hwndParent, HWND hwndScroll, int scrollBar, BOOL fShow);
     262BOOL  OSLibWinShowScrollBar(HWND hwndParent, HWND hwndScroll, int scrollBar, BOOL fShow, BOOL fForceChange = FALSE);
    263263HWND  OSLibWinQueryScrollBarHandle(HWND hwndParent, int scrollBar);
    264264ULONG OSLibWinGetScrollPos(HWND hwndParent, HWND hwndScroll);
  • trunk/src/user32/win32wbase.cpp

    r1256 r1258  
    1 /* $Id: win32wbase.cpp,v 1.37 1999-10-12 14:47:23 sandervl Exp $ */
     1/* $Id: win32wbase.cpp,v 1.38 1999-10-12 18:14:56 sandervl Exp $ */
    22/*
    33 * Win32 Window Base Class for OS/2
     
    510510  {
    511511        hwndHorzScroll = OSLibWinQueryScrollBarHandle(OS2HwndFrame, OSLIB_HSCROLL);
     512        OSLibWinShowScrollBar(OS2HwndFrame, hwndHorzScroll, OSLIB_HSCROLL, FALSE, TRUE);
    512513  }
    513514
    514515  if (cs->style & WS_VSCROLL) {
    515516        hwndVertScroll = OSLibWinQueryScrollBarHandle(OS2HwndFrame, OSLIB_VSCROLL);
     517        OSLibWinShowScrollBar(OS2HwndFrame, hwndVertScroll, OSLIB_VSCROLL, FALSE, TRUE);
    516518  }
    517519
     
    14241426            {
    14251427                new_flags = ESB_DISABLE_BOTH;
    1426                 //TODO:
     1428//               *action |= SA_SSI_REFRESH;
    14271429            }
    14281430            else if (nBar != SB_CTL)
    14291431            {
    1430                 //TODO
     1432//                *action = SA_SSI_HIDE;
    14311433                goto done;
    14321434            }
     
    14341436        else  /* Show and enable scroll-bar */
    14351437        {
    1436             //TODO
    14371438            new_flags = 0;
     1439//            if (nBar != SB_CTL)
     1440//                *action |= SA_SSI_SHOW;
    14381441        }
    14391442
Note: See TracChangeset for help on using the changeset viewer.