Changeset 7683 for trunk/src/user32/button.cpp
- Timestamp:
- Dec 26, 2001, 12:35:39 PM (24 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/user32/button.cpp
r7409 r7683 1 /* $Id: button.cpp,v 1.4 4 2001-11-21 11:51:37sandervl Exp $ */1 /* $Id: button.cpp,v 1.45 2001-12-26 11:35:38 sandervl Exp $ */ 2 2 /* File: button.cpp -- Button type widgets 3 3 * … … 1028 1028 if (infoPtr->hFont) SelectObject( hDC, infoPtr->hFont ); 1029 1029 1030 /* GetControlBrush16 sends WM_CTLCOLORBTN, plus it returns default brush 1031 * if parent didn't return valid one. So we kill two hares at once 1032 */ 1033 hBrush = GetControlBrush( hwnd, hDC, CTLCOLOR_BTN ); 1034 1035 /* In order to make things right, draw the rectangle background! */ 1036 if ( !(infoPtr->state & BUTTON_HASFOCUS) && (action == ODA_DRAWENTIRE) ) 1037 { 1038 colour = GetBkColor(hDC); 1039 hPen = CreatePen( PS_SOLID, 1, colour ); 1040 if ( hPen ) 1041 { 1042 hOldBrush = SelectObject( hDC, hBrush ); 1043 hOldPen = SelectObject( hDC, hPen ); 1044 Rectangle( hDC, client.left, client.top, client.right, client.bottom ); 1045 SelectObject( hDC, hOldPen ); 1046 SelectObject( hDC, hOldBrush ); 1047 DeleteObject( hPen ); 1048 } 1049 } 1030 #ifdef __WIN32OS2__ 1031 //(Auto)Check, (Auto)Radio & (Auto)3State buttons send WM_CTLCOLORSTATIC 1032 //instead of WM_CTLCOLORBTN (verified in NT4) 1033 hBrush = SendMessageW( GetParent(hwnd), WM_CTLCOLORSTATIC, hDC, (LPARAM)hwnd ); 1034 if (!hBrush) /* did the app forget to call defwindowproc ? */ 1035 hBrush = DefWindowProcW( GetParent(hwnd), WM_CTLCOLORSTATIC, hDC, (LPARAM)hwnd ); 1036 #endif 1050 1037 1051 1038 if (dwStyle & BS_LEFTTEXT) … … 1077 1064 { 1078 1065 UINT state; 1066 1067 /* Since WM_ERASEBKGND does nothing, first prepare background */ 1068 if (action == ODA_SELECT) FillRect( hDC, &rbox, hBrush ); 1069 else FillRect( hDC, &client, hBrush ); 1079 1070 1080 1071 if (((dwStyle & 0x0f) == BS_RADIOBUTTON) ||
Note:
See TracChangeset
for help on using the changeset viewer.