Changeset 22094 for branches/swt/src
- Timestamp:
- Mar 31, 2015, 5:56:55 PM (11 years ago)
- File:
-
- 1 edited
-
branches/swt/src/user32/button.cpp (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/swt/src/user32/button.cpp
r9974 r22094 186 186 { 187 187 DWORD style = GetWindowLongA(hwnd,GWL_STYLE) & 0x0f; 188 //SvL: TODO: NT does something extra for ownerdrawn buttons; check this 188 //SvL: TODO: NT does something extra for ownerdrawn buttons; check this 189 189 if(style == BS_OWNERDRAW) { 190 190 return DefWindowProcA(hwnd, WM_ERASEBKGND, wParam, lParam); … … 590 590 if (wParam > maxCheckState[style]) wParam = maxCheckState[style]; 591 591 #ifndef __WIN32OS2__ 592 //Must clear WS_TABSTOP of control that is already disabled or else 593 //multiple control can have this style ((auto)radiobutton) and 592 //Must clear WS_TABSTOP of control that is already disabled or else 593 //multiple control can have this style ((auto)radiobutton) and 594 594 //GetNextDlgTabItem will return the wrong one 595 595 //Happens in Opera preferences dialog (multimedia) where all autoradio … … 781 781 else format = defHorz; 782 782 783 /* 783 784 if (dwStyle & BS_TOP) format |= DT_TOP; 784 785 else if (dwStyle & BS_VCENTER) format |= DT_VCENTER; 785 786 else if (dwStyle & BS_BOTTOM) format |= DT_BOTTOM; 786 787 else format |= defVert; 787 788 */ 789 790 /* 791 * BS_CENTER is not a single bit-flag, but is actually BS_LEFT | BS_RIGHT. 792 * So we need an extra compare to distinguish it. 793 * TODO: Scan for more occurences like this and other multi-bit flags 794 */ 795 if ((dwStyle & BS_CENTER) == BS_LEFT) format = DT_LEFT; 796 else if ((dwStyle & BS_CENTER) == BS_CENTER) format = DT_CENTER; 797 else if (((dwStyle & BS_RIGHT) == BS_RIGHT) || ((dwExStyle & WS_EX_RIGHT) == BS_RIGHT)) format = DT_RIGHT; 798 else format = defHorz; 788 799 if (!(dwStyle & BS_MULTILINE)) format |= DT_SINGLELINE; 789 800 … … 1182 1193 1183 1194 if (dwStyle & WS_DISABLED) { 1184 DrawDisabledText(hDC,text,&rc,format); 1195 DrawDisabledText(hDC,text,&rc,format); 1185 1196 } 1186 1197 else
Note:
See TracChangeset
for help on using the changeset viewer.
