Ignore:
Timestamp:
Oct 29, 1999, 6:06:56 PM (26 years ago)
Author:
cbratschi
Message:

scrollbar updates

File:
1 edited

Legend:

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

    r1491 r1511  
    1 /* $Id: oslibwin.cpp,v 1.37 1999-10-28 15:20:25 sandervl Exp $ */
     1/* $Id: oslibwin.cpp,v 1.38 1999-10-29 16:06:55 cbratschi Exp $ */
    22/*
    33 * Window API wrappers for OS/2
     
    926926//******************************************************************************
    927927//******************************************************************************
     928HWND OSLibWinQueryObjectWindow(VOID)
     929{
     930  return WinQueryObjectWindow(HWND_DESKTOP);
     931}
     932//******************************************************************************
     933//******************************************************************************
    928934BOOL OSLibWinShowScrollBar(HWND hwndParent, HWND hwndScroll, int scrollBar,
    929935                           BOOL fShow, BOOL fForceChange)
    930936{
     937   HWND hwndObj = WinQueryObjectWindow(HWND_DESKTOP),hwndCurPar = WinQueryWindow(hwndScroll,QW_PARENT);
     938
    931939   if(hwndScroll == NULL) {
    932940        dprintf(("OSLibWinShowScrollBar: scrollbar %d (parent %x) not found!", scrollBar, hwndParent));
     
    934942   }
    935943
    936    if(fShow != WinIsWindowVisible(hwndScroll) || fForceChange)
     944   if ((fShow && hwndCurPar == hwndObj) || (!fShow && hwndCurPar != hwndObj) || fForceChange)
    937945   {
    938          WinSetParent(hwndScroll, fShow ? hwndParent : HWND_OBJECT, FALSE);
     946     //CB: bug: winhlp32: hide vert scrollbar on maximize doesn't update the frame
     947         WinSetParent(hwndScroll,fShow ? hwndParent:HWND_OBJECT,FALSE);
    939948         WinSendMsg(hwndParent, WM_UPDATEFRAME,
    940949                    MPFROMLONG( ( scrollBar == OSLIB_VSCROLL ) ? FCF_VERTSCROLL
    941950                                                               : FCF_HORZSCROLL),
    942951                    MPVOID );
    943 
    944          WinShowWindow(hwndScroll, fShow);
    945952   }
    946953   return TRUE;
     
    10491056                    OSWinStyle);
    10501057
     1058  //CB: bug: it doesn't work with child windows!
     1059
    10511060  if(OSFrameStyle & FCF_TITLEBAR)
    10521061  {
Note: See TracChangeset for help on using the changeset viewer.