Ignore:
Timestamp:
May 22, 2000, 7:21:11 PM (25 years ago)
Author:
cbratschi
Message:

merged controls with Corel WINE 20000513, maximize/minimize fix

File:
1 edited

Legend:

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

    r3153 r3584  
    1 /* $Id: button.cpp,v 1.34 2000-03-18 16:13:25 cbratschi Exp $ */
     1/* $Id: button.cpp,v 1.35 2000-05-22 17:21:06 cbratschi Exp $ */
    22/* File: button.cpp -- Button type widgets
    33 *
     
    77 * Copyright (c) 1999 Christoph Bratschi
    88 *
    9  * Corel version: 20000317
     9 * Corel version: 20000513
    1010 * (WINE version: 20000130)
    1111 *
     
    924924    DWORD dwStyle = GetWindowLongA(hwnd,GWL_STYLE);
    925925    RECT rbox, rtext, client;
    926     HBRUSH hBrush;
     926    HBRUSH hBrush, hOldBrush;
     927    HPEN hPen, hOldPen;
     928    COLORREF colour;
    927929    int textLen, delta;
    928930    char* text = NULL;
     
    960962
    961963    hBrush = GetSysColorBrush(COLOR_BTNFACE);
     964
     965    /* In order to make things right, draw the rectangle background! */
     966    if ( !(infoPtr->state & BUTTON_HASFOCUS) && (action == ODA_DRAWENTIRE) )
     967    {
     968        colour = GetBkColor(hDC);
     969        hPen = CreatePen( PS_SOLID, 1, colour );
     970        if ( hPen )
     971        {
     972            hOldBrush = SelectObject( hDC, hBrush );
     973            hOldPen = SelectObject( hDC, hPen );
     974            Rectangle( hDC, client.left, client.top, client.right, client.bottom );
     975            SelectObject( hDC, hOldPen );
     976            SelectObject( hDC, hOldBrush );
     977            DeleteObject( hPen );
     978        }
     979    }
    962980
    963981    if (dwStyle & BS_LEFTTEXT)
Note: See TracChangeset for help on using the changeset viewer.