Ignore:
Timestamp:
May 11, 2001, 10:39:46 AM (24 years ago)
Author:
sandervl
Message:

client/frame rewrite

File:
1 edited

Legend:

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

    r5473 r5685  
    1 /* $Id: win32dlg.cpp,v 1.61 2001-04-04 09:32:25 sandervl Exp $ */
     1/* $Id: win32dlg.cpp,v 1.62 2001-05-11 08:39:44 sandervl Exp $ */
    22/*
    33 * Win32 Dialog Code for OS/2
    44 *
    5  * Copyright 1999 Sander van Leeuwen (sandervl@xs4all.nl) (Wine port & OS/2 adaption)
     5 * Copyright 1999-2001 Sander van Leeuwen (sandervl@xs4all.nl) (Wine port & OS/2 adaption)
    66 *
    77 * Based on Wine code (990815; windows\dialog.c)
     
    2424#include "controls.h"
    2525#include "syscolor.h"
     26#include "hook.h"
    2627#include <math.h>
    2728#include <unicode.h>
     
    317318        topOwner->setModalDialogOwner(TRUE);
    318319        hwndOldDialog = topOwner->getOS2HwndModalDialog();
    319         topOwner->setOS2HwndModalDialog(OS2Hwnd);
     320        topOwner->setOS2HwndModalDialog(OS2HwndFrame);
    320321        ShowWindow(SW_SHOW);
    321322
     
    328329        while (TRUE)
    329330        {
    330           if (!OSLibWinPeekMsg(&msg,0,0,0,PM_NOREMOVE))
     331          if (!PeekMessageA(&msg,0,0,0,PM_NOREMOVE))
    331332          {
    332333                if(!(getStyle() & DS_NOIDLEMSG))
    333334                    topOwner->SendMessageA(WM_ENTERIDLE,MSGF_DIALOGBOX,getWindowHandle());
    334                 OSLibWinGetMsg(&msg,0,0,0);
     335                GetMessageA(&msg,0,0,0);
    335336          }
    336           else  OSLibWinPeekMsg(&msg,0,0,0,PM_REMOVE);
     337          else  PeekMessageA(&msg,0,0,0,PM_REMOVE);
     338
     339          /* Call message filters */
     340          if (HOOK_IsHooked( WH_SYSMSGFILTER ) || HOOK_IsHooked( WH_MSGFILTER ))
     341          {
     342            LPMSG pmsg = (LPMSG)HeapAlloc( GetProcessHeap(), 0, sizeof(MSG) );
     343            if (pmsg)
     344            {
     345                BOOL ret;
     346                *pmsg = msg;
     347                ret = (HOOK_CallHooksA( WH_SYSMSGFILTER, MSGF_DIALOGBOX, 0,
     348                                          (LPARAM) pmsg ) ||
     349                       HOOK_CallHooksA( WH_MSGFILTER, MSGF_DIALOGBOX, 0,
     350                                          (LPARAM) pmsg ));
     351                       
     352                HeapFree( GetProcessHeap(), 0, pmsg );
     353                if (ret)
     354                {
     355                    /* Message filtered -> remove it from the queue */
     356                    /* if it's still there. */
     357                    continue;
     358                }
     359            }
     360          }
    337361
    338362          if(msg.message == WM_QUIT)
Note: See TracChangeset for help on using the changeset viewer.