71#define STATE_GWL_OFFSET 0
72#define BUTTON_HFONT_GWL_OFFSET (sizeof(LONG))
73#define HIMAGE_GWL_OFFSET (BUTTON_HFONT_GWL_OFFSET+sizeof(HFONT))
74#define BUTTON_UISTATE_GWL_OFFSET (HIMAGE_GWL_OFFSET+sizeof(HFONT))
75#define NB_EXTRA_BYTES (BUTTON_UISTATE_GWL_OFFSET+sizeof(LONG_PTR))
78#define BUTTON_NSTATES 0x0F
79#define BUTTON_BTNPRESSED 0x40
80#define BUTTON_UNKNOWN2 0x20
81#define BUTTON_UNKNOWN3 0x10
83#define BUTTON_BMCLICK 0x100
86#define BUTTON_NOTIFY_PARENT(hWnd, code) \
88 TRACE("notification " #code " sent to hwnd=%p\n", GetParent(hWnd)); \
89 SendMessageW(GetParent(hWnd), WM_COMMAND, \
90 MAKEWPARAM(GetWindowLongPtrW((hWnd),GWLP_ID), (code)), \
102#define MAX_BTN_TYPE 16
228 prevflags = get_ui_state(
hwnd);
230 if (prevflags !=
flags)
266 ERR(
"Wrong window class for Button! fnId 0x%x\n",pWnd->
fnid);
314 button_update_uistate(
hWnd, unicode );
580 if (
state & BUTTON_BMCLICK)
588 if (!(
state & BUTTON_BMCLICK))
break;
589 state &= ~BUTTON_BMCLICK;
624 else style &= ~WS_TABSTOP;
652 case WM_UPDATEUISTATE:
658 if (button_update_uistate(
hWnd, unicode))
707 style &= ~BS_TYPEMASK;
791 if (get_ui_state(
hwnd) & UISF_HIDEACCEL)
803 r.right =
r.left + bm.bmWidth;
804 r.bottom =
r.top + bm.bmHeight;
814 r.right =
r.left + bm.bmWidth;
815 r.bottom =
r.top + bm.bmHeight;
832 case DT_LEFT:
r.left++;
r.right++;
break;
835 r.right =
r.left +
n;
break;
838 r.left =
r.right -
n;
844 case DT_TOP:
r.top++;
r.bottom++;
break;
851 r.bottom =
r.top +
n;
break;
854 r.top =
r.bottom -
n;
945 UINT dtFlags, uState;
993 else if (pushedState)
1010 if (dtFlags == (
UINT)-1L)
1026 if (!(get_ui_state(
hwnd) & UISF_HIDEFOCUS))
1052 int delta, text_offset, checkBoxWidth, checkBoxHeight;
1094 rtext.
right -= checkBoxWidth + text_offset;;
1099 rtext.
left += checkBoxWidth + text_offset;;
1100 rbox.
right = checkBoxWidth;
1112 if (dtFlags != (
UINT)-1L)
1134 delta = rbox.
bottom - rbox.
top - checkBoxHeight;
1138 rbox.
bottom = rbox.
top + checkBoxHeight;
1140 rbox.
top -= -delta/2 + 1;
1141 rbox.
bottom = rbox.
top + checkBoxHeight;
1145 rbox.
top = rbox.
bottom - checkBoxHeight;
1147 rbox.
bottom += -delta/2 + 1;
1148 rbox.
top = rbox.
bottom - checkBoxHeight;
1152 int ofs = (delta / 2);
1154 rbox.
top = rbox.
bottom - checkBoxHeight;
1155 }
else if (delta < 0) {
1156 int ofs = (-delta / 2);
1157 rbox.
top -= ofs + 1;
1158 rbox.
bottom = rbox.
top + checkBoxHeight;
1165 if (dtFlags == (
UINT)-1L)
1175 if (!(get_ui_state(
hwnd) & UISF_HIDEFOCUS))
1205 if (!sibling)
break;
1213 }
while (sibling !=
start);
1249 rcFrame.
top += (
tm.tmHeight / 2) - 1;
1255 if (dtFlags != (
UINT)-1L)
1305 if (!(get_ui_state(
hwnd) & UISF_HIDEFOCUS))
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
LRESULT WINAPI ButtonWndProcA(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
LRESULT WINAPI ButtonWndProcW(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
#define HeapFree(x, y, z)
#define ValidateHwnd(hwnd)
static void cleanup(void)
unsigned short(__cdecl typeof(TIFFCurrentDirectory))(struct tiff *)
GLdouble GLdouble GLdouble r
DWORD NTAPI NtUserAlterWindowStyle(HWND hWnd, DWORD Index, LONG NewValue)
BOOL NTAPI NtUserSetWindowFNID(HWND hWnd, WORD fnID)
static DWORD *static HFONT(WINAPI *pCreateFontIndirectExA)(const ENUMLOGFONTEXDVA *)
INT WINAPI DrawTextW(HDC hdc, LPCWSTR str, INT count, LPRECT rect, UINT flags)
#define BS_AUTORADIOBUTTON
_Out_opt_ int _Out_opt_ int * cy
COLORREF WINAPI SetDCPenColor(_In_ HDC hdc, _In_ COLORREF crColor)
HBRUSH FASTCALL GetControlColor(PWND pwndParent, PWND pwnd, HDC hdc, UINT CtlMsg)
BOOL WINAPI GetTextMetricsW(_In_ HDC, _Out_ LPTEXTMETRICW)
HGDIOBJ WINAPI GetStockObject(_In_ int)
int WINAPI GetObjectW(_In_ HANDLE h, _In_ int c, _Out_writes_bytes_opt_(c) LPVOID pv)
int WINAPI GetDeviceCaps(_In_opt_ HDC, _In_ int)
BOOL WINAPI GetCharWidthW(_In_ HDC hdc, _In_ UINT iFirst, _In_ UINT iLast, _Out_writes_(iLast+1 - iFirst) LPINT lpBuffer)
HGDIOBJ WINAPI SelectObject(_In_ HDC, _In_ HGDIOBJ)
int WINAPI FillRect(HDC, LPCRECT, HBRUSH)
BOOL WINAPI Rectangle(_In_ HDC, _In_ int, _In_ int, _In_ int, _In_ int)
int WINAPI SetBkMode(_In_ HDC, _In_ int)
COLORREF WINAPI SetTextColor(_In_ HDC, _In_ COLORREF)
int WINAPI SelectClipRgn(_In_ HDC, _In_opt_ HRGN)
HWND WINAPI SetCapture(_In_ HWND hWnd)
#define BST_INDETERMINATE
int WINAPI ReleaseDC(_In_opt_ HWND, _In_ HDC)
DWORD WINAPI GetSysColor(_In_ int)
BOOL WINAPI IsWindow(_In_opt_ HWND)
#define WM_CTLCOLORSTATIC
#define GetWindowLongPtrW
BOOL WINAPI ReleaseCapture(void)
#define COLOR_WINDOWFRAME
LRESULT WINAPI DefWindowProcW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
LRESULT WINAPI DefWindowProcA(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
BOOL WINAPI GetIconInfo(_In_ HICON, _Out_ PICONINFO)
#define WM_CAPTURECHANGED
BOOL WINAPI DrawFrameControl(_In_ HDC, _Inout_ LPRECT, _In_ UINT, _In_ UINT)
HBRUSH WINAPI GetSysColorBrush(_In_ int)
LONG WINAPI GetWindowLongW(_In_ HWND, _In_ int)
#define DLGC_UNDEFPUSHBUTTON
HWND WINAPI GetCapture(void)
#define WM_SYSCOLORCHANGE
#define DLGC_DEFPUSHBUTTON
BOOL WINAPI PtInRect(_In_ LPCRECT, _In_ POINT)
HWND WINAPI GetNextDlgGroupItem(_In_ HWND, _In_opt_ HWND, _In_ BOOL)
#define DFCS_BUTTON3STATE
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)
BOOL WINAPI DrawEdge(_In_ HDC, _Inout_ LPRECT, _In_ UINT, _In_ UINT)
HWND WINAPI SetFocus(_In_opt_ HWND)
BOOL WINAPI EndPaint(_In_ HWND, _In_ const PAINTSTRUCT *)
BOOL WINAPI IntersectRect(_Out_ LPRECT, _In_ LPCRECT, _In_ LPCRECT)
HDC WINAPI GetDC(_In_opt_ HWND)
BOOL WINAPI IsWindowEnabled(_In_ HWND)
HWND WINAPI GetParent(_In_ HWND)
BOOL WINAPI OffsetRect(_Inout_ LPRECT, _In_ int, _In_ int)
BOOL WINAPI DrawFocusRect(_In_ HDC, _In_ LPCRECT)
BOOL WINAPI InvalidateRect(_In_opt_ HWND, _In_opt_ LPCRECT, _In_ BOOL)
HDC WINAPI BeginPaint(_In_ HWND, _Out_ LPPAINTSTRUCT)
INT WINAPI InternalGetWindowText(_In_ HWND hWnd, _Out_writes_to_(cchMaxCount, return+1) LPWSTR pString, _In_ int cchMaxCount)
#define SetWindowLongPtrW
BOOL WINAPI InflateRect(_Inout_ LPRECT, _In_ int, _In_ int)
BOOL WINAPI DrawStateW(_In_ HDC, _In_opt_ HBRUSH, _In_opt_ DRAWSTATEPROC, _In_ LPARAM, _In_ WPARAM, _In_ int, _In_ int, _In_ int, _In_ int, _In_ UINT)
BOOL(CALLBACK * DRAWSTATEPROC)(HDC, LPARAM, WPARAM, int, int)
BOOL WINAPI IsWindowVisible(_In_ HWND)
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
BOOL WINAPI SetRect(_Out_ LPRECT, _In_ int, _In_ int, _In_ int, _In_ int)