Changeset 7294 for trunk/src


Ignore:
Timestamp:
Nov 7, 2001, 4:36:10 PM (24 years ago)
Author:
sandervl
Message:

EndDialog fix

Location:
trunk/src/user32
Files:
4 edited

Legend:

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

    r7266 r7294  
    1 /* $Id: pmwindow.cpp,v 1.163 2001-10-29 13:54:39 achimha Exp $ */
     1/* $Id: pmwindow.cpp,v 1.164 2001-11-07 15:36:09 sandervl Exp $ */
    22/*
    33 * Win32 Window Managment Code for OS/2
     
    247247//******************************************************************************
    248248//CD notification window class
     249#define TIMERID_DRIVEPOLL       0x1717
    249250//******************************************************************************
    250251MRESULT EXPENTRY Win32CDWindowProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
     
    299300           drive[0]++;
    300301        }
    301         WinStartTimer(hab, hwnd, 17, 32*60);
    302 ////        WinStartTimer(hab, hwnd, 17, 32*3);
    303 ////        WinStartTimer(hab, hwnd, 17, 5000);
     302        WinStartTimer(hab, hwnd, TIMERID_DRIVEPOLL, 32*60);
     303////        WinStartTimer(hab, hwnd, TIMERID_DRIVEPOLL, 32*3);
     304////        WinStartTimer(hab, hwnd, TIMERID_DRIVEPOLL, 5000);
    304305        rc = (MRESULT)FALSE;
    305306        break;
     
    373374
    374375    case WM_DESTROY:
    375         WinStopTimer(hab, hwnd, 17);
     376        WinStopTimer(hab, hwnd, TIMERID_DRIVEPOLL);
    376377        break;
    377378
  • trunk/src/user32/scroll.cpp

    r7182 r7294  
    1 /* $Id: scroll.cpp,v 1.45 2001-10-24 09:53:14 sandervl Exp $ */
     1/* $Id: scroll.cpp,v 1.46 2001-11-07 15:36:10 sandervl Exp $ */
    22/*
    33 * Scrollbar control
     
    12691269    dprintf(("USER32: SetScrollInfo %x %d",hwnd,nBar));
    12701270
     1271    if(info == NULL) return 0; //Last error not changed (NT4, SP6)
     1272
    12711273    if (!(infoPtr = SCROLL_GetInfoPtr(hwnd,nBar))) return 0;
    12721274    if (info->fMask & ~(SIF_ALL | SIF_DISABLENOSCROLL)) return 0;
     
    13471349    {
    13481350      new_flags = infoPtr->flags;
    1349       if (infoPtr->MinVal >= infoPtr->MaxVal - MAX( infoPtr->Page-1, 0 ))
     1351      if (infoPtr->MinVal >= infoPtr->MaxVal - MAX( infoPtr->Page-1, 0))
    13501352      {
    13511353        /* Hide or disable scroll-bar */
     
    15391541  SCROLLBAR_INFO *infoPtr;
    15401542
     1543    dprintf(("GetScrollRange %x %d %x %x", hwnd, nBar, lpMin, lpMax));
    15411544    infoPtr = SCROLL_GetInfoPtr(hwnd,nBar);
    15421545    if (!infoPtr)
     
    16651668    return FALSE;
    16661669  }
     1670
     1671  dprintf(("GetScrollBarInfo %x %d %x", hwnd, idObject, psbi));
    16671672
    16681673  INT nBar,arrowSize;
  • trunk/src/user32/win32dlg.cpp

    r7241 r7294  
    1 /* $Id: win32dlg.cpp,v 1.71 2001-10-28 10:38:13 sandervl Exp $ */
     1/* $Id: win32dlg.cpp,v 1.72 2001-11-07 15:36:10 sandervl Exp $ */
    22/*
    33 * Win32 Dialog Code for OS/2
     
    10811081BOOL Win32Dialog::endDialog(int retval)
    10821082{
     1083    HWND hwnd = getWindowHandle();
     1084
    10831085    dialogFlags |= DF_END;
    10841086    idResult = retval;
    10851087
     1088//    BOOL wasEnabled = (dlgInfo.flags & DF_OWNERENABLED);
     1089
     1090//    if (wasEnabled && (owner = GetWindow( hwnd, GW_OWNER )))
     1091//        DIALOG_EnableOwner( owner );
     1092
     1093    /* Windows sets the focus to the dialog itself in EndDialog */
     1094
     1095    if (::IsChild(hwnd, GetFocus()))
     1096       ::SetFocus( hwnd );
     1097
     1098    /* Don't have to send a ShowWindow(SW_HIDE), just do
     1099       SetWindowPos with SWP_HIDEWINDOW as done in Windows */
     1100
     1101    ::SetWindowPos(hwnd, (HWND)0, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE
     1102                 | SWP_NOZORDER | SWP_NOACTIVATE | SWP_HIDEWINDOW);
     1103
     1104    /* unblock dialog loop */
     1105    PostMessageA(hwnd, WM_NULL, 0, 0);
    10861106    return TRUE;
    10871107}
  • trunk/src/user32/win32wbase.cpp

    r7241 r7294  
    1 /* $Id: win32wbase.cpp,v 1.297 2001-10-28 10:38:13 sandervl Exp $ */
     1/* $Id: win32wbase.cpp,v 1.298 2001-11-07 15:36:10 sandervl Exp $ */
    22/*
    33 * Win32 Window Base Class for OS/2
     
    24712471        return TRUE;
    24722472    }
     2473
    24732474#if 0
    24742475    /* Fix redundant flags */
     
    24832484    }
    24842485
    2485     if(cx < 0) cx = 0;
    2486     if(cy < 0) cy = 0;
     2486////    if(cx < 0) cx = 0;
     2487////    if(cy < 0) cy = 0;
    24872488
    24882489    if((rectWindow.right - rectWindow.left == cx) && (rectWindow.bottom - rectWindow.top == cy)) {
     
    25062507        }
    25072508    }
     2509    /* TODO: Check hwndInsertAfter */
     2510
    25082511#endif
    25092512
     
    26462649         wpos->y      = rectWindow.top;
    26472650    }
    2648 
     2651   
    26492652    WINDOWPOS wpOld = *wpos;
    2650     SendInternalMessageA(WM_WINDOWPOSCHANGING, 0, (LPARAM)wpos);
     2653    if(!(wpos->flags & SWP_NOSENDCHANGING))
     2654        SendInternalMessageA(WM_WINDOWPOSCHANGING, 0, (LPARAM)wpos);
    26512655
    26522656    if ((wpos->hwndInsertAfter != wpOld.hwndInsertAfter) ||
     
    34473451
    34483452  hwndActive = OSLibWinQueryActiveWindow();
    3449 
    34503453  return OS2ToWin32Handle(hwndActive);
    34513454}
Note: See TracChangeset for help on using the changeset viewer.