Ignore:
Timestamp:
Dec 14, 1999, 8:13:20 PM (26 years ago)
Author:
sandervl
Message:

MDI changes + WM_INITMENU support added + disabled experimental support for CS_PARENTDC style

File:
1 edited

Legend:

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

    r2016 r2076  
    1 /* $Id: dc.cpp,v 1.27 1999-12-07 20:43:39 sandervl Exp $ */
     1/* $Id: dc.cpp,v 1.28 1999-12-14 19:13:18 sandervl Exp $ */
    22
    33/*
     
    610610   if (hwnd)
    611611   {
    612       wnd = Win32BaseWindow::GetWindowFromHandle(hwnd);
    613       if (flags & DCX_WINDOW_W)
    614          hWindow = wnd->getOS2FrameWindowHandle();
    615       else
    616          hWindow = wnd->getOS2WindowHandle();
     612        wnd = Win32BaseWindow::GetWindowFromHandle(hwnd);
     613        if(wnd == NULL) {
     614                dprintf (("ERROR: User32: GetDCEx bad window handle %X!!!!!", hwnd));
     615                O32_SetLastError(ERROR_INVALID_WINDOW_HANDLE_W);
     616                return 0;
     617        }
     618//SvL: Experimental change (doesn't work right)
     619#if 0
     620        if(wnd->fHasParentDC() && wnd->getParent()) {
     621                wnd = wnd->getParent();
     622        }
     623#endif
     624        if (flags & DCX_WINDOW_W)
     625                hWindow = wnd->getOS2FrameWindowHandle();
     626        else
     627                hWindow = wnd->getOS2WindowHandle();
    617628   }
    618629   else
Note: See TracChangeset for help on using the changeset viewer.