Changeset 1203 for trunk/src/user32/button.cpp
- Timestamp:
- Oct 8, 1999, 11:26:08 PM (26 years ago)
- File:
-
- 1 edited
-
trunk/src/user32/button.cpp (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/user32/button.cpp
r1184 r1203 1 /* $Id: button.cpp,v 1. 4 1999-10-08 12:10:26cbratschi Exp $ */1 /* $Id: button.cpp,v 1.5 1999-10-08 21:23:07 cbratschi Exp $ */ 2 2 /* File: button.cpp -- Button type widgets 3 3 * … … 6 6 * Copyright (C) 1994 Alexandre Julliard 7 7 * Copyright (c) 1999 Christoph Bratschi 8 * 9 * WINE version: 990923 8 10 */ 9 11 … … 467 469 dwStyle &= ~WS_TABSTOP; 468 470 469 if (oldStyle != dwStyle) SetWindowLongA(hwnd,GWL_STYLE,dwStyle);471 //if (oldStyle != dwStyle) SetWindowLongA(hwnd,GWL_STYLE,dwStyle); 470 472 } 471 473 infoPtr->state = (infoPtr->state & ~3) | wParam; … … 930 932 if (action == ODA_DRAWENTIRE || action == ODA_SELECT) 931 933 { 932 HDC hMemDC = CreateCompatibleDC( hDC ); 933 int x = 0, y = 0; 934 delta = (rbox.bottom - rbox.top - checkBoxHeight) >> 1; 935 936 if (action == ODA_SELECT) FillRect( hDC, &rbox, hBrush ); 937 else FillRect( hDC, &client, hBrush ); 938 939 if (infoPtr->state & BUTTON_HIGHLIGHTED) x += 2 * checkBoxWidth; 940 if (infoPtr->state & (BUTTON_CHECKED | BUTTON_3STATE)) x += checkBoxWidth; 934 UINT state; 935 941 936 if (((dwStyle & 0x0f) == BS_RADIOBUTTON) || 942 ((dwStyle & 0x0f) == BS_AUTORADIOBUTTON)) y += checkBoxHeight; 943 else if (infoPtr->state & BUTTON_3STATE) y += 2 * checkBoxHeight; 944 945 SelectObject( hMemDC, hbitmapCheckBoxes ); 946 BitBlt( hDC, rbox.left, rbox.top + delta, checkBoxWidth, 947 checkBoxHeight, hMemDC, x, y, SRCCOPY ); 948 DeleteDC( hMemDC ); 937 ((dwStyle & 0x0f) == BS_AUTORADIOBUTTON)) state = DFCS_BUTTONRADIO; 938 else if (infoPtr->state & BUTTON_3STATE) state = DFCS_BUTTON3STATE; 939 else state = DFCS_BUTTONCHECK; 940 941 if (infoPtr->state & (BUTTON_CHECKED | BUTTON_3STATE)) state |= DFCS_CHECKED; 942 943 if (infoPtr->state & BUTTON_HIGHLIGHTED) state |= DFCS_PUSHED; 944 945 if (dwStyle & WS_DISABLED) state |= DFCS_INACTIVE; 946 947 DrawFrameControl( hDC, &rbox, DFC_BUTTON, state ); 949 948 950 949 if( text && action != ODA_SELECT ) … … 960 959 DrawTextA( hDC, text, -1, &rtext, 961 960 DT_SINGLELINE | DT_VCENTER ); 962 textLen = 0; /* skip DrawText() below */963 961 } 964 962 }
Note:
See TracChangeset
for help on using the changeset viewer.
