Ignore:
Timestamp:
Dec 21, 1999, 6:03:46 PM (26 years ago)
Author:
cbratschi
Message:

WINE 991212, WM_SETREDRAW fix, MDI work

File:
1 edited

Legend:

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

    r2160 r2185  
    1 /* $Id: button.cpp,v 1.23 1999-12-20 16:45:16 cbratschi Exp $ */
     1/* $Id: button.cpp,v 1.24 1999-12-21 17:03:42 cbratschi Exp $ */
    22/* File: button.cpp -- Button type widgets
    33 *
     
    77 * Copyright (c) 1999 Christoph Bratschi
    88 *
    9  * WINE version: 991031
     9 * WINE version: 991212
    1010 *
    1111 * Status: complete
     
    156156  infoPtr->state = BUTTON_UNCHECKED;
    157157  infoPtr->hFont = 0;
    158   infoPtr->hImage = NULL;
     158  infoPtr->hImage = 0;
    159159  SetInfoPtr(hwnd,(DWORD)infoPtr);
    160160
     
    349349  if (wParam == VK_SPACE)
    350350  {
     351    BUTTONINFO* infoPtr = (BUTTONINFO*)GetInfoPtr(hwnd);
     352
    351353    SendMessageA(hwnd,BM_SETSTATE,TRUE,0);
    352     SetFocus(hwnd);
    353     SetCapture(hwnd);
     354    infoPtr->state |= BUTTON_BTNPRESSED;
    354355  }
    355356
     
    364365    DWORD dwStyle = GetWindowLongA(hwnd,GWL_STYLE);
    365366
    366     ReleaseCapture();
     367    if (!(infoPtr->state & BUTTON_BTNPRESSED)) return 0;
     368    infoPtr->state &= BUTTON_NSTATES;
    367369    if (!(infoPtr->state & BUTTON_HIGHLIGHTED)) return 0;
    368370    SendMessageA(hwnd,BM_SETSTATE,FALSE,0);
     
    383385    }
    384386    BUTTON_SendNotify(hwnd,BN_CLICKED);
    385   } else if (wParam != VK_TAB) ReleaseCapture();
     387  }
    386388
    387389  return 0;
     
    490492      return (HICON)infoPtr->hImage;
    491493    default:
    492       return NULL;
     494      return (HICON)0;
    493495  }
    494496}
     
    784786    }
    785787    if ( ((dwStyle & BS_ICON) || (dwStyle & BS_BITMAP) ) &&
    786          (infoPtr->hImage != NULL) )
     788         (infoPtr->hImage != 0) )
    787789    {
    788790        int yOffset, xOffset;
     
    831833        if(xOffset < 0 || yOffset < 0)
    832834        {
    833             HRGN hBitmapRgn = NULL;
     835            HRGN hBitmapRgn = 0;
    834836            hBitmapRgn = CreateRectRgn(
    835837                rc.left + xBorderOffset, rc.top +yBorderOffset,
     
    868870        if(xOffset < 0 || yOffset < 0)
    869871        {
    870             SelectClipRgn(hDC, NULL);
     872            SelectClipRgn(hDC, 0);
    871873        }
    872874    }
     
    916918     * instead of a radion button.
    917919     */
    918     if (infoPtr->hImage!=NULL)
     920    if (infoPtr->hImage != 0)
    919921    {
    920922        BOOL bHighLighted = ((infoPtr->state & BUTTON_HIGHLIGHTED) ||
Note: See TracChangeset for help on using the changeset viewer.