Ignore:
Timestamp:
Dec 28, 1999, 6:04:24 PM (26 years ago)
Author:
cbratschi
Message:

* empty log message *

File:
1 edited

Legend:

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

    r2221 r2228  
    1 /* $Id: button.cpp,v 1.26 1999-12-27 22:53:51 cbratschi Exp $ */
     1/* $Id: button.cpp,v 1.27 1999-12-28 17:04:22 cbratschi Exp $ */
    22/* File: button.cpp -- Button type widgets
    33 *
     
    125125  DWORD dwStyle = GetWindowLongA(hwnd,GWL_STYLE);
    126126
    127   if (dwStyle & BS_NOTIFY && !wParam) BUTTON_SendNotify(hwnd,BN_DISABLE);
     127  if ((dwStyle & BS_NOTIFY) && !wParam) BUTTON_SendNotify(hwnd,BN_DISABLE);
    128128
    129129  //PAINT_BUTTON(hwnd,dwStyle & 0x0f,ODA_DRAWENTIRE);
     
    151151    } else checkBoxWidth = checkBoxHeight = 0;
    152152  }
    153   if (style < 0L || style >= MAX_BTN_TYPE) return -1; /* abort */
     153  if ((style < 0L) || (style >= MAX_BTN_TYPE)) return -1; /* abort */
    154154
    155155  infoPtr = (BUTTONINFO*)malloc(sizeof(BUTTONINFO));
     
    409409  if (dwStyle & BS_NOTIFY) BUTTON_SendNotify(hwnd,BN_SETFOCUS);
    410410
    411   if ((style == BS_AUTORADIOBUTTON || style == BS_RADIOBUTTON) &&
     411  if (((style == BS_AUTORADIOBUTTON) || (style == BS_RADIOBUTTON)) &&
    412412      (GetCapture() != hwnd) && !(SendMessageA(hwnd,BM_GETCHECK,0,0) & BST_CHECKED))
    413413  {
     
    484484  HANDLE oldHbitmap = infoPtr->hImage;
    485485
    486   if (dwStyle & BS_BITMAP || dwStyle & BS_ICON) infoPtr->hImage = (HANDLE)lParam;
     486  if ((dwStyle & BS_BITMAP) || (dwStyle & BS_ICON)) infoPtr->hImage = (HANDLE)lParam;
    487487
    488488  return oldHbitmap;
     
    529529        dwStyle &= ~WS_TABSTOP;
    530530
    531       //if (oldStyle != dwStyle) SetWindowLongA(hwnd,GWL_STYLE,dwStyle);
     531      if (oldStyle != dwStyle) SetWindowLongA(hwnd,GWL_STYLE,dwStyle);
    532532    }
    533533    infoPtr->state = (infoPtr->state & ~3) | wParam;
     
    775775     */
    776776    textLen = GetWindowTextLengthA(hwnd);
    777     if (textLen > 0 && (!(dwStyle & (BS_ICON|BS_BITMAP))))
     777    if ((textLen > 0) && (!(dwStyle & (BS_ICON|BS_BITMAP))))
    778778    {
    779779        INT format = BUTTON_GetTextFormat(dwStyle,DT_CENTER,DT_VCENTER);
     
    885885    SelectObject( hDC, hOldBrush );
    886886
    887     if (infoPtr->state & BUTTON_HASFOCUS && IsWindowEnabled(hwnd))
     887    if ((infoPtr->state & BUTTON_HASFOCUS) && IsWindowEnabled(hwnd))
    888888    {
    889889        InflateRect( &focus_rect, -1, -1 );
     
    980980      GetWindowTextA(hwnd,text,textLen);
    981981    }
    982     if (action == ODA_DRAWENTIRE || action == ODA_SELECT)
     982    if ((action == ODA_DRAWENTIRE) || (action == ODA_SELECT))
    983983    {
    984984        UINT state;
Note: See TracChangeset for help on using the changeset viewer.