|
|
Definition at line 165 of file theme_combo.c.
Referenced by BUTTON_Paint(), OnPaint(), TAB_DeselectAll(), and THEMING_ComboSubclassProc().
{
PAINTSTRUCT ps;
HDC hDC;
COMBOBOXINFO cbi;
DWORD dwStyle = GetWindowLongW (hwnd, GWL_STYLE);
hDC = (hParamDC) ? hParamDC
: BeginPaint( hwnd, &ps);
TRACE("hdc=%p\n", hDC);
if( hDC && !(state & STATE_NOREDRAW) )
{
RECT frameRect;
int buttonState;
cbi.cbSize = sizeof (cbi);
SendMessageW (hwnd, CB_GETCOMBOBOXINFO, 0, (LPARAM)&cbi);
if ((dwStyle & CBS_DROPDOWNLIST) != CBS_SIMPLE)
GetClientRect (hwnd, &frameRect);
else
{
CopyRect (&frameRect, &cbi.rcItem);
InflateRect(&frameRect,
EDIT_CONTROL_PADDING + COMBO_XBORDERSIZE,
EDIT_CONTROL_PADDING + COMBO_YBORDERSIZE);
}
DrawThemeBackground (theme, hDC, 0,
IsWindowEnabled (hwnd) ? CBXS_NORMAL : CBXS_DISABLED, &frameRect, NULL);
if (cbi.stateButton != STATE_SYSTEM_INVISIBLE)
{
if (!IsWindowEnabled (hwnd))
buttonState = CBXS_DISABLED;
else if (cbi.stateButton == STATE_SYSTEM_PRESSED)
buttonState = CBXS_PRESSED;
else if (state & STATE_HOT)
buttonState = CBXS_HOT;
else
buttonState = CBXS_NORMAL;
DrawThemeBackground (theme, hDC, CP_DROPDOWNBUTTON, buttonState,
&cbi.rcButton, NULL);
}
if ((dwStyle & CBS_DROPDOWNLIST) == CBS_DROPDOWNLIST)
paint_text (hwnd, hDC, dwStyle, &cbi);
}
if( !hParamDC )
EndPaint(hwnd, &ps);
return 0;
}
|