Ignore:
Timestamp:
May 24, 2000, 9:30:08 PM (25 years ago)
Author:
sandervl
Message:

experimental WM_NCHITTEST generation (disabled) + MDI fixes

File:
1 edited

Legend:

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

    r2803 r3603  
    1 /* $Id: win32wmdichild.cpp,v 1.22 2000-02-16 14:28:24 sandervl Exp $ */
     1/* $Id: win32wmdichild.cpp,v 1.23 2000-05-24 19:30:08 sandervl Exp $ */
    22/*
    33 * Win32 MDI Child Window Class for OS/2
     
    9999
    100100    case WM_CHILDACTIVATE:
    101         client->childActivate(this);
     101        client->childActivate(this);
    102102        return 0;
    103103
     
    295295
    296296    /* this menu is needed to set a check mark in MDI_ChildActivate */
    297     AppendMenuA(client->getMDIMenu(), MF_STRING ,wIDmenu, lpstrDef );
     297    if(client->getMDIMenu())
     298        AppendMenuA(client->getMDIMenu(), MF_STRING ,wIDmenu, lpstrDef );
    298299
    299300    client->incNrActiveChildren();
     
    347348    if(newchild && GetLastError() == 0)
    348349    {
     350        /* All MDI child windows have the WS_EX_MDICHILD style */
     351        newchild->setExStyle(newchild->getExStyle() | WS_EX_MDICHILD);
     352
    349353        newchild->menuModifyItem();
    350354
     
    363367             * the SWP_SHOWWINDOW command.
    364368             */
    365             newchild->SetWindowLongA(GWL_STYLE, newchild->getStyle() & ~WS_VISIBLE);
     369            newchild->setStyle(newchild->getStyle() & ~WS_VISIBLE);
     370
    366371            if(showflag){
    367                 newchild->SetWindowPos(0, 0, 0, 0, 0, SWP_SHOWWINDOW | SWP_NOSIZE | SWP_NOMOVE );
     372                dprintf(("newchild->SetWindowPos active window %x", GetActiveWindow()));
     373                newchild->SetWindowPos(HWND_TOP, 0, 0, 0, 0, SWP_SHOWWINDOW | SWP_NOSIZE | SWP_NOMOVE );
     374                dprintf(("newchild->SetWindowPos active window %x", GetActiveWindow()));
    368375
    369376                /* Set maximized state here in case hwnd didn't receive WM_SIZE
     
    382389            else
    383390                /* needed, harmless ? */
    384                 newchild->SetWindowPos(0, 0, 0, 0, 0, SWP_NOACTIVATE | SWP_NOSIZE | SWP_NOMOVE );
     391                newchild->SetWindowPos(HWND_TOP, 0, 0, 0, 0, SWP_NOACTIVATE | SWP_NOSIZE | SWP_NOMOVE );
    385392
    386393        }
     
    389396    {
    390397        client->decNrActiveChildren();
    391         DeleteMenu(client->getMDIMenu(), wIDmenu,MF_BYCOMMAND);
     398        if(client->getMDIMenu()) {
     399                DeleteMenu(client->getMDIMenu(), wIDmenu,MF_BYCOMMAND);
     400        }
    392401
    393402        maximizedChild = client->getMaximizedChild();
Note: See TracChangeset for help on using the changeset viewer.