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

EndDialog fix

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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}
Note: See TracChangeset for help on using the changeset viewer.