Changeset 2204 for trunk/src/user32/button.cpp
- Timestamp:
- Dec 26, 1999, 6:30:20 PM (26 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/user32/button.cpp
r2185 r2204 1 /* $Id: button.cpp,v 1.2 4 1999-12-21 17:03:42cbratschi Exp $ */1 /* $Id: button.cpp,v 1.25 1999-12-26 17:30:14 cbratschi Exp $ */ 2 2 /* File: button.cpp -- Button type widgets 3 3 * … … 219 219 BUTTONINFO* infoPtr = (BUTTONINFO*)GetInfoPtr(hwnd); 220 220 DWORD dwStyle = GetWindowLongA(hwnd,GWL_STYLE); 221 221 DWORD style = dwStyle & 0x0F; 222 223 if (style == BS_GROUPBOX) return 0; 222 224 SetCapture(hwnd); 223 225 SetFocus(hwnd); … … 234 236 BUTTONINFO* infoPtr = (BUTTONINFO*)GetInfoPtr(hwnd); 235 237 DWORD dwStyle = GetWindowLongA(hwnd,GWL_STYLE); 238 DWORD style = dwStyle & 0x0F; 236 239 RECT rect; 237 240 POINT pt; 238 241 242 if (style == BS_GROUPBOX) return 0; 239 243 pt.x = LOWORD(lParam); 240 244 pt.y = HIWORD(lParam); … … 460 464 static LRESULT BUTTON_SetStyle(HWND hwnd,WPARAM wParam,LPARAM lParam) 461 465 { 462 DWORD dwStyle = GetWindowLongA(hwnd,GWL_STYLE) ;466 DWORD dwStyle = GetWindowLongA(hwnd,GWL_STYLE),newStyle; 463 467 464 468 if ((wParam & 0x0f) >= MAX_BTN_TYPE) return 0; 465 dwStyle = (dwStyle & 0xfffffff0) | (wParam & 0x0000000f); 466 SetWindowLongA(hwnd,GWL_STYLE,dwStyle); 467 PAINT_BUTTON(hwnd,dwStyle & 0x0f,ODA_DRAWENTIRE); 469 newStyle = (dwStyle & 0xfffffff0) | (wParam & 0x0000000f); 470 471 if (newStyle != dwStyle) 472 { 473 SetWindowLongA(hwnd,GWL_STYLE,newStyle); 474 PAINT_BUTTON(hwnd,newStyle & 0x0f,ODA_DRAWENTIRE); 475 } 468 476 469 477 return 0; … … 542 550 { 543 551 BUTTONINFO* infoPtr = (BUTTONINFO*)GetInfoPtr(hwnd); 544 DWORD style = GetWindowLongA(hwnd,GWL_STYLE) & 0x0 f;552 DWORD style = GetWindowLongA(hwnd,GWL_STYLE) & 0x0F; 545 553 546 554 if (wParam)
Note:
See TracChangeset
for help on using the changeset viewer.