Changeset 1724 for trunk/src/user32/button.cpp
- Timestamp:
- Nov 13, 1999, 5:42:43 PM (26 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/user32/button.cpp
r1525 r1724 1 /* $Id: button.cpp,v 1.1 6 1999-10-30 18:40:43cbratschi Exp $ */1 /* $Id: button.cpp,v 1.17 1999-11-13 16:42:40 cbratschi Exp $ */ 2 2 /* File: button.cpp -- Button type widgets 3 3 * … … 7 7 * Copyright (c) 1999 Christoph Bratschi 8 8 * 9 * WINE version: 99 09239 * WINE version: 991031 10 10 */ 11 11 … … 201 201 static LRESULT BUTTON_LButtonDown(HWND hwnd,WPARAM wParam,LPARAM lParam) 202 202 { 203 BUTTONINFO* infoPtr = (BUTTONINFO*)GetInfoPtr(hwnd); 204 203 205 SetCapture(hwnd); 204 206 SetFocus(hwnd); 205 207 SendMessageA(hwnd,BM_SETSTATE,TRUE,0); 208 infoPtr->state |= BUTTON_BTNPRESSED; 206 209 207 210 return 0; … … 217 220 pt.y = HIWORD(lParam); 218 221 222 if (!(infoPtr->state & BUTTON_BTNPRESSED)) return 0; 223 infoPtr->state &= BUTTON_NSTATES; 224 if (!(infoPtr->state & BUTTON_HIGHLIGHTED)) 225 { 226 ReleaseCapture(); 227 return 0; 228 } 229 SendMessageA(hwnd,BM_SETSTATE,FALSE,0); 219 230 ReleaseCapture(); 220 if (!(infoPtr->state & BUTTON_HIGHLIGHTED)) return 0;221 SendMessageA(hwnd,BM_SETSTATE,FALSE,0);222 231 GetClientRect(hwnd,&rect); 223 232 if (PtInRect(&rect,pt)) … … 246 255 } 247 256 257 static LRESULT BUTTON_CaptureChanged(HWND hwnd,WPARAM wParam,LPARAM lParam) 258 { 259 BUTTONINFO* infoPtr = (BUTTONINFO*)GetInfoPtr(hwnd); 260 261 if (infoPtr->state & BUTTON_BTNPRESSED) 262 { 263 infoPtr->state &= BUTTON_NSTATES; 264 if (infoPtr->state & BUTTON_HIGHLIGHTED) 265 SendMessageA( hwnd, BM_SETSTATE, FALSE, 0 ); 266 } 267 268 return 0; 269 } 270 248 271 static LRESULT BUTTON_MouseMove(HWND hwnd,WPARAM wParam,LPARAM lParam) 249 272 { … … 542 565 case WM_LBUTTONUP: 543 566 return BUTTON_LButtonUp(hwnd,wParam,lParam); 567 568 case WM_CAPTURECHANGED: 569 return BUTTON_CaptureChanged(hwnd,wParam,lParam); 544 570 545 571 case WM_MOUSEMOVE: … … 1074 1100 1075 1101 SetBkColor( hDC, GetSysColor( COLOR_BTNFACE ) ); 1076 FillRect( hDC, &dis.rcItem, GetSysColorBrush( COLOR_BTNFACE ) );1077 1102 1078 1103 dprintf(("OWNERDRAW button %x, enabled %d", hwnd, !(dwStyle & WS_DISABLED)));
Note:
See TracChangeset
for help on using the changeset viewer.