Ignore:
Timestamp:
May 2, 2000, 10:50:53 PM (25 years ago)
Author:
sandervl
Message:

RDW_FRAME support for GetDCEx; added wine dialog change; added extra logging

File:
1 edited

Legend:

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

    r3060 r3482  
    1 /* $Id: win32dlg.cpp,v 1.47 2000-03-09 19:05:39 sandervl Exp $ */
     1/* $Id: win32dlg.cpp,v 1.48 2000-05-02 20:50:51 sandervl Exp $ */
    22/*
    33 * Win32 Dialog Code for OS/2
     
    7676    if (dlgInfo.style & DS_SETFONT)
    7777    {
    78         /* The font height must be negative as it is a point size */
    79         /* (see CreateFont() documentation in the Windows SDK).   */
    80         hUserFont = CreateFontW(-(dlgInfo.pointSize*3)/2, 0, 0, 0,
     78          /* The font height must be negative as it is a point size */
     79          /* and must be converted to pixels first */
     80          /* (see CreateFont() documentation in the Windows SDK).   */
     81        HDC dc = GetDC(0);
     82        int pixels = dlgInfo.pointSize * GetDeviceCaps(dc , LOGPIXELSY)/72;
     83        ReleaseDC(0, dc);
     84
     85        hUserFont = CreateFontW(-pixels, 0, 0, 0,
    8186                            dlgInfo.weight, dlgInfo.italic, FALSE,
    8287                            FALSE, DEFAULT_CHARSET, 0, 0, PROOF_QUALITY,
     
    125130            INT dX, dY;
    126131
    127             if( !(dlgInfo.style & DS_ABSALIGN) )
     132            if( !(dlgInfo.style & DS_ABSALIGN) && owner)
    128133                ClientToScreen(owner, (POINT *)&rect );
    129134
     
    232237        hwndFocus = GetNextDlgTabItem( getWindowHandle(), 0, FALSE );
    233238
    234         if (SendInternalMessageA(WM_INITDIALOG, (WPARAM)hwndFocus, param))
    235              SetFocus(hwndFocus);
     239        HWND hwndPreInitFocus = GetFocus();
     240        if(SendInternalMessageA(WM_INITDIALOG, (WPARAM)hwndFocus, param)) {
     241                SetFocus(hwndFocus);
     242        }
     243        else
     244        {
     245                /* If the dlgproc has returned FALSE (indicating handling of keyboard focus)
     246                   but the focus has not changed, set the focus where we expect it. */
     247                if ( (getStyle() & WS_VISIBLE) && ( GetFocus() == hwndPreInitFocus ) )
     248                        SetFocus( hwndFocus );
     249        }
    236250
    237251        if (dlgInfo.style & WS_VISIBLE && !(getStyle() & WS_VISIBLE))
Note: See TracChangeset for help on using the changeset viewer.