Ignore:
Timestamp:
Sep 5, 1999, 5:53:10 PM (26 years ago)
Author:
sandervl
Message:

More dialog update

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/user32/new/win32dlg.cpp

    r833 r835  
    1 /* $Id: win32dlg.cpp,v 1.4 1999-09-05 12:03:33 sandervl Exp $ */
     1/* $Id: win32dlg.cpp,v 1.5 1999-09-05 15:53:09 sandervl Exp $ */
    22/*
    33 * Win32 Dialog Code for OS/2
     
    1818#include <misc.h>
    1919#include <win32dlg.h>
     20#include "oslibmsg.h"
    2021
    2122//******************************************************************************
     
    214215    if (hMenu) DestroyMenu( hMenu );
    215216
     217}
     218/***********************************************************************
     219 *           DIALOG_DoDialogBox
     220 */
     221INT Win32Dialog::doDialogBox()
     222{
     223  Win32BaseWindow *topOwner;
     224  MSG msg;
     225  INT retval;
     226
     227    /* Owner must be a top-level window */
     228    if(getOwner() == NULL) {
     229        dprintf(("Dialog box has no owner!!!"));
     230        return -1;
     231    }
     232    topOwner = getOwner()->getTopParent();
     233    if(topOwner == NULL) {
     234        dprintf(("Dialog box has no top owner!!!"));
     235        return -1;
     236    }
     237
     238    if (!dialogFlags & DF_END) /* was EndDialog called in WM_INITDIALOG ? */
     239    {
     240        topOwner->EnableWindow( FALSE );
     241        ShowWindow( SW_SHOW );
     242
     243        while (OSLibWinPeekMsg(&msg, getOS2FrameWindowHandle(), topOwner->getOS2FrameWindowHandle(),
     244                               0, 0, MSG_REMOVE))
     245//        while (OSLibWinPeekMsg(&msg, getWindowHandle(), owner, MSGF_DIALOGBOX,
     246//                                       MSG_REMOVE, !(getStyle() & DS_NOIDLEMSG), NULL ))
     247        {
     248            if (!IsDialogMessageA( getWindowHandle(), &msg))
     249            {
     250                TranslateMessage( &msg );
     251                DispatchMessageA( &msg );
     252            }
     253            if (dialogFlags & DF_END) break;
     254        }
     255        topOwner->EnableWindow( TRUE );
     256    }
     257    retval = idResult;
     258    DestroyWindow();
     259    return retval;
    216260}
    217261/***********************************************************************
Note: See TracChangeset for help on using the changeset viewer.