Changeset 22097 for branches/swt/src/user32/button.cpp
- Timestamp:
- May 14, 2015, 9:55:51 PM (11 years ago)
- File:
-
- 1 edited
-
branches/swt/src/user32/button.cpp (modified) (11 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/swt/src/user32/button.cpp
r22096 r22097 16 16 #include <string.h> 17 17 #include <stdlib.h> 18 #include <stdio.h> 18 19 #include <os2win.h> 19 20 #include "controls.h" … … 531 532 static LRESULT BUTTON_SetStyle(HWND hwnd,WPARAM wParam,LPARAM lParam) 532 533 { 534 __con_debug(2,"USER32::BUTTON_SetStyle(hwnd=%08X,wParam=%08X,lParam=%08X\n",hwnd,wParam,lParam); 533 535 DWORD dwStyle = GetWindowLongA(hwnd,GWL_STYLE),newStyle; 534 536 535 537 if ((wParam & 0x0F) >= MAX_BTN_TYPE) return 0; 536 538 newStyle = (dwStyle & 0xFFFFFFF0) | (wParam & 0x0000000F); 539 __con_debug(2,"USER32::BUTTON_SetStyle(newStyle=%08X\n",newStyle); 537 540 538 541 if (newStyle != dwStyle) … … 775 778 { 776 779 INT format = 0; 777 780 __con_debug(2,"USER32::BUTTON_GetTextFormat: dwStyle=%08X, dwExStyle=%08X, dh=%d, dv=%d\n", 781 dwStyle,dwExStyle,defHorz,defVert); 778 782 /* 779 783 * BS_CENTER is not a single bit-flag, but is actually BS_LEFT | BS_RIGHT. … … 806 810 BOOL pushedState ) 807 811 { 812 __con_debug(2,"\n%s\n","USER32::BUTTON_DrawPushButton"); 808 813 RECT rc, focus_rect; 809 814 HPEN hOldPen; … … 811 816 BUTTONINFO *infoPtr = (BUTTONINFO *)GetInfoPtr(hwnd); 812 817 DWORD dwStyle = GetWindowLongA(hwnd,GWL_STYLE); 818 __con_debug(2,"USER32::BUTTON_DrawPushButton: dwStyle=%08X\n",dwStyle); 813 819 int xBorderOffset, yBorderOffset; 814 820 xBorderOffset = yBorderOffset = 0; … … 817 823 818 824 GetClientRect( hwnd, &rc ); 819 825 __con_debug(2,"USER32::BUTTON_DrawPushButton: l=%d, r=%d, t=%d, b=%d\n", 826 rc.left,rc.right,rc.top,rc.bottom); 820 827 /* Send WM_CTLCOLOR to allow changing the font (the colors are fixed) */ 821 828 if (infoPtr->hFont) SelectObject( hDC, infoPtr->hFont ); … … 830 837 InflateRect( &rc, -1, -1 ); 831 838 } 832 839 __con_debug(2,"(USER32::BUTTON_DrawPushButton: l=%d, r=%d, t=%d, b=%d\n", 840 rc.left,rc.right,rc.top,rc.bottom); 833 841 UINT uState = DFCS_BUTTONPUSH; 834 842 … … 845 853 DrawFrameControl( hDC, &rc, DFC_BUTTON, uState ); 846 854 InflateRect( &rc, -2, -2 ); 847 855 __con_debug(2,"(USER32::BUTTON_DrawPushButton: l=%d, r=%d, t=%d, b=%d\n", 856 rc.left,rc.right,rc.top,rc.bottom); 848 857 focus_rect = rc; 849 858 … … 853 862 rc.top += 2; 854 863 } 855 864 __con_debug(2,"(USER32::BUTTON_DrawPushButton: l=%d, r=%d, t=%d, b=%d\n", 865 rc.left,rc.right,rc.top,rc.bottom); 856 866 857 867 /* draw button label, if any: … … 859 869 * In win9x we don't show text if there is a bitmap or icon. 860 870 * I don't know about win31 so I leave it as it was for win31. 861 * Dennis Bj örklund 12 Jul, 99871 * Dennis Björklund 12 Jul, 99 862 872 */ 863 873 textLen = GetWindowTextLengthA(hwnd); … … 865 875 { 866 876 INT format = BUTTON_GetTextFormat(dwStyle,GetWindowLongA(hwnd,GWL_EXSTYLE),DT_CENTER,DT_VCENTER); 877 __con_debug(2,"(USER32::BUTTON_DrawPushButton: format=%d\n",format); 867 878 868 879 textLen++;
Note:
See TracChangeset
for help on using the changeset viewer.
