Changeset 2185 for trunk/src/user32/button.cpp
- Timestamp:
- Dec 21, 1999, 6:03:46 PM (26 years ago)
- File:
-
- 1 edited
-
trunk/src/user32/button.cpp (modified) (11 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/user32/button.cpp
r2160 r2185 1 /* $Id: button.cpp,v 1.2 3 1999-12-20 16:45:16cbratschi Exp $ */1 /* $Id: button.cpp,v 1.24 1999-12-21 17:03:42 cbratschi Exp $ */ 2 2 /* File: button.cpp -- Button type widgets 3 3 * … … 7 7 * Copyright (c) 1999 Christoph Bratschi 8 8 * 9 * WINE version: 991 0319 * WINE version: 991212 10 10 * 11 11 * Status: complete … … 156 156 infoPtr->state = BUTTON_UNCHECKED; 157 157 infoPtr->hFont = 0; 158 infoPtr->hImage = NULL;158 infoPtr->hImage = 0; 159 159 SetInfoPtr(hwnd,(DWORD)infoPtr); 160 160 … … 349 349 if (wParam == VK_SPACE) 350 350 { 351 BUTTONINFO* infoPtr = (BUTTONINFO*)GetInfoPtr(hwnd); 352 351 353 SendMessageA(hwnd,BM_SETSTATE,TRUE,0); 352 SetFocus(hwnd); 353 SetCapture(hwnd); 354 infoPtr->state |= BUTTON_BTNPRESSED; 354 355 } 355 356 … … 364 365 DWORD dwStyle = GetWindowLongA(hwnd,GWL_STYLE); 365 366 366 ReleaseCapture(); 367 if (!(infoPtr->state & BUTTON_BTNPRESSED)) return 0; 368 infoPtr->state &= BUTTON_NSTATES; 367 369 if (!(infoPtr->state & BUTTON_HIGHLIGHTED)) return 0; 368 370 SendMessageA(hwnd,BM_SETSTATE,FALSE,0); … … 383 385 } 384 386 BUTTON_SendNotify(hwnd,BN_CLICKED); 385 } else if (wParam != VK_TAB) ReleaseCapture();387 } 386 388 387 389 return 0; … … 490 492 return (HICON)infoPtr->hImage; 491 493 default: 492 return NULL;494 return (HICON)0; 493 495 } 494 496 } … … 784 786 } 785 787 if ( ((dwStyle & BS_ICON) || (dwStyle & BS_BITMAP) ) && 786 (infoPtr->hImage != NULL) )788 (infoPtr->hImage != 0) ) 787 789 { 788 790 int yOffset, xOffset; … … 831 833 if(xOffset < 0 || yOffset < 0) 832 834 { 833 HRGN hBitmapRgn = NULL;835 HRGN hBitmapRgn = 0; 834 836 hBitmapRgn = CreateRectRgn( 835 837 rc.left + xBorderOffset, rc.top +yBorderOffset, … … 868 870 if(xOffset < 0 || yOffset < 0) 869 871 { 870 SelectClipRgn(hDC, NULL);872 SelectClipRgn(hDC, 0); 871 873 } 872 874 } … … 916 918 * instead of a radion button. 917 919 */ 918 if (infoPtr->hImage !=NULL)920 if (infoPtr->hImage != 0) 919 921 { 920 922 BOOL bHighLighted = ((infoPtr->state & BUTTON_HIGHLIGHTED) ||
Note:
See TracChangeset
for help on using the changeset viewer.
