Ignore:
Timestamp:
Jun 28, 2002, 2:38:00 PM (23 years ago)
Author:
sandervl
Message:

Removed focus fix from 2001-11-20; controls of child dialogs can receive input focus (CVP wizard dialogs)

File:
1 edited

Legend:

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

    r7801 r8797  
    1 /* $Id: win32dlg.cpp,v 1.76 2002-02-05 17:59:00 sandervl Exp $ */
     1/* $Id: win32dlg.cpp,v 1.77 2002-06-28 12:38:00 sandervl Exp $ */
    22/*
    33 * Win32 Dialog Code for OS/2
     
    265265        if(SendMessageA(getWindowHandle(), WM_INITDIALOG, (WPARAM)hwndFocus, param))
    266266        {
    267             //SvL: Experiments in NT4 show that dialogs that are children don't
    268             //     receive focus. Not sure if this is always true. (couldn't
    269             //     find any remarks about this in the SDK docs)
    270             if(!(getStyle() & WS_CHILD))
     267            /* check where the focus is again,
     268             * some controls status might have changed in WM_INITDIALOG */
     269            hwndFocus = GetNextDlgTabItem( getWindowHandle(), 0, FALSE );
     270            if(hwndFocus) {
     271                SetFocus(hwndFocus);
     272            }
     273        }
     274        else
     275        {
     276            /* If the dlgproc has returned FALSE (indicating handling of keyboard focus)
     277               but the focus has not changed, set the focus where we expect it. */
     278            if ( (getStyle() & WS_VISIBLE) && ( GetFocus() == hwndPreInitFocus ) )
    271279            {
    272                 /* check where the focus is again,
    273                  * some controls status might have changed in WM_INITDIALOG */
    274                 hwndFocus = GetNextDlgTabItem( getWindowHandle(), 0, FALSE );
    275                 if(GetFocus() != hwndFocus) {
    276                     SetFocus(hwndFocus);
    277                 }
    278             }
    279         }
    280         else
    281         {
    282             //SvL: Experiments in NT4 show that dialogs that are children don't
    283             //     receive focus. Not sure if this is always true. (couldn't
    284             //     find any remarks about this in the SDK docs)
    285             if(!(getStyle() & WS_CHILD))
    286             {
    287                 /* If the dlgproc has returned FALSE (indicating handling of keyboard focus)
    288                    but the focus has not changed, set the focus where we expect it. */
    289                 if ( (getStyle() & WS_VISIBLE) && ( GetFocus() == hwndPreInitFocus ) )
     280                hwndFocus = GetNextDlgTabItem( getWindowHandle(), 0, FALSE);
     281                if( hwndFocus )
    290282                    SetFocus( hwndFocus );
    291283            }
Note: See TracChangeset for help on using the changeset viewer.