Ignore:
Timestamp:
Feb 17, 2001, 3:49:26 PM (25 years ago)
Author:
sandervl
Message:

activate, tab and ischild bugfixes

File:
1 edited

Legend:

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

    r5083 r5146  
    1 /* $Id: win32wbase.cpp,v 1.234 2001-02-10 10:31:31 sandervl Exp $ */
     1/* $Id: win32wbase.cpp,v 1.235 2001-02-17 14:49:26 sandervl Exp $ */
    22/*
    33 * Win32 Window Base Class for OS/2
     
    494494        return FALSE;
    495495    }
     496    if(OSLibWinSetWindowULong(OS2Hwnd, OFFSET_WIN32FLAGS, 0) == FALSE) {
     497        dprintf(("WM_CREATE: WinSetWindowULong2 %X failed!!", OS2Hwnd));
     498        SetLastError(ERROR_OUTOFMEMORY); //TODO: Better error
     499        return FALSE;
     500    }
    496501
    497502    if (HOOK_IsHooked( WH_CBT ))
     
    706711            if (getStyle() & (WS_MINIMIZE | WS_MAXIMIZE))
    707712            {
    708                         RECT newPos;
    709                         UINT swFlag = (getStyle() & WS_MINIMIZE) ? SW_MINIMIZE : SW_MAXIMIZE;
     713                        RECT newPos;
     714                        UINT swFlag = (getStyle() & WS_MINIMIZE) ? SW_MINIMIZE : SW_MAXIMIZE;
    710715                setStyle(getStyle() & ~(WS_MAXIMIZE | WS_MINIMIZE));
    711                         MinMaximize(swFlag, &newPos);
     716                        MinMaximize(swFlag, &newPos);
    712717                swFlag = ((getStyle() & WS_CHILD) || GetActiveWindow()) ? SWP_NOACTIVATE | SWP_NOZORDER | SWP_FRAMECHANGED
    713718                                                                        : SWP_NOZORDER | SWP_FRAMECHANGED;
     
    26832688{
    26842689    if(getParent()) {
    2685           return getParent()->getWindowHandle() == hwndParent;
    2686     }
    2687     else  return 0;
     2690         if(getParent()->getWindowHandle() == hwndParent)
     2691             return TRUE;
     2692
     2693         return getParent()->IsChild(hwndParent);
     2694    }
     2695    else return 0;
    26882696}
    26892697//******************************************************************************
     
    34603468//  dprintf2(("Win32BaseWindow::GetWindowFromOS2Handle: not an Odin os2 window %x", hwnd));
    34613469    return 0;
    3462 }
    3463 //******************************************************************************
    3464 //******************************************************************************
    3465 HWND Win32BaseWindow::getNextDlgTabItem(HWND hwndCtrl, BOOL fPrevious)
    3466 {
    3467  Win32BaseWindow *child, *nextchild, *lastchild;
    3468  HWND retvalue;
    3469 
    3470     if (hwndCtrl)
    3471     {
    3472         child = GetWindowFromHandle(hwndCtrl);
    3473         if (!child)
    3474         {
    3475             retvalue = 0;
    3476             goto END;
    3477         }
    3478         /* Make sure hwndCtrl is a top-level child */
    3479         while ((child->getStyle() & WS_CHILD) && (child->getParent() != this))
    3480         {
    3481             child = child->getParent();
    3482             if(child == NULL) break;
    3483         }
    3484 
    3485         if (!child || (child->getParent() != this))
    3486         {
    3487             retvalue = 0;
    3488             goto END;
    3489         }
    3490     }
    3491     else
    3492     {
    3493         /* No ctrl specified -> start from the beginning */
    3494         child = (Win32BaseWindow *)getFirstChild();
    3495         if (!child)
    3496         {
    3497             retvalue = 0;
    3498             goto END;
    3499         }
    3500 
    3501         if (!fPrevious)
    3502         {
    3503             while (child->getNextChild())
    3504             {
    3505                 child = (Win32BaseWindow *)child->getNextChild();
    3506             }
    3507         }
    3508     }
    3509 
    3510     lastchild = child;
    3511     nextchild = (Win32BaseWindow *)child->getNextChild();
    3512     while (TRUE)
    3513     {
    3514         if (!nextchild) nextchild = (Win32BaseWindow *)getFirstChild();
    3515 
    3516         if (child == nextchild) break;
    3517 
    3518         if ((nextchild->getStyle() & WS_TABSTOP) && (nextchild->getStyle() & WS_VISIBLE) &&
    3519             !(nextchild->getStyle() & WS_DISABLED))
    3520         {
    3521             lastchild = nextchild;
    3522             if (!fPrevious) break;
    3523         }
    3524         nextchild = (Win32BaseWindow *)nextchild->getNextChild();
    3525     }
    3526     retvalue = lastchild->getWindowHandle();
    3527 
    3528 END:
    3529     return retvalue;
    35303470}
    35313471//******************************************************************************
Note: See TracChangeset for help on using the changeset viewer.