return FALSE;
if (Style & WS_THICKFRAME)
return TRUE;
+ Style &= WS_CAPTION;
if (Style == WS_DLGFRAME || Style == WS_CAPTION)
return TRUE;
return FALSE;
oldTextColor = SetTextColor(hdc, textColor);
oldBkMode = SetBkMode(hdc, TRANSPARENT);
- DrawTextW(hdc, pszText, iCharCount, &rt, dwTextFlags);
+ DrawThemeText(hTheme, hdc, iPartId, iStateId, pszText, iCharCount, dwTextFlags, dwTextFlags, pRect);
SetBkMode(hdc, oldBkMode);
SetTextColor(hdc, oldTextColor);
{
RECT rcPart;
INT ButtonWidth, ButtonHeight, iPartId;
-
- ButtonHeight = GetSystemMetrics( pcontext->wi.dwExStyle & WS_EX_TOOLWINDOW ? SM_CYSMSIZE : SM_CYSIZE);
- ButtonWidth = GetSystemMetrics( pcontext->wi.dwExStyle & WS_EX_TOOLWINDOW ? SM_CXSMSIZE : SM_CXSIZE);
+ SIZE ButtonSize;
switch(buttonId)
{
return;
}
+ GetThemePartSize(pcontext->theme, pcontext->hDC, iPartId, 0, NULL, TS_MIN, &ButtonSize);
+
+ ButtonHeight = GetSystemMetrics( pcontext->wi.dwExStyle & WS_EX_TOOLWINDOW ? SM_CYSMSIZE : SM_CYSIZE);
+ ButtonWidth = MulDiv(ButtonSize.cx, ButtonHeight, ButtonSize.cy);
+
ButtonHeight -= 4;
ButtonWidth -= 4;
prcCurrent->right - prcCurrent->left, Height, PATCOPY);
PatBlt(context->hDC, prcCurrent->left, prcCurrent->top,
Width, prcCurrent->bottom - prcCurrent->top, PATCOPY);
- PatBlt(context->hDC, prcCurrent->left, prcCurrent->bottom,
+ PatBlt(context->hDC, prcCurrent->left, prcCurrent->bottom - 1,
prcCurrent->right - prcCurrent->left, -Height, PATCOPY);
- PatBlt(context->hDC, prcCurrent->right, prcCurrent->top,
+ PatBlt(context->hDC, prcCurrent->right - 1, prcCurrent->top,
-Width, prcCurrent->bottom - prcCurrent->top, PATCOPY);
InflateRect(prcCurrent, -Width, -Height);
prcCurrent->right - prcCurrent->left, Height, PATCOPY);
PatBlt(context->hDC, prcCurrent->left, prcCurrent->top,
Width, prcCurrent->bottom - prcCurrent->top, PATCOPY);
- PatBlt(context->hDC, prcCurrent->left, prcCurrent->bottom,
+ PatBlt(context->hDC, prcCurrent->left, prcCurrent->bottom - 1,
prcCurrent->right - prcCurrent->left, -Height, PATCOPY);
- PatBlt(context->hDC, prcCurrent->right, prcCurrent->top,
+ PatBlt(context->hDC, prcCurrent->right - 1, prcCurrent->top,
-Width, prcCurrent->bottom - prcCurrent->top, PATCOPY);
InflateRect(prcCurrent, -Width, -Height);
TrackMouseEvent(&tme);
}
- /* Dont do any drawing if the hit test wasn't changed */
- if (ht == pcontext->lastHitTest)
- return 0;
-
ThemeInitDrawContext(&context, hWnd, 0);
if (context.wi.dwStyle & WS_SYSMENU)
{
POINT ClientPoint;
WINDOWINFO wi;
+ wi.cbSize = sizeof(wi);
GetWindowInfo(hWnd, &wi);
if (!PtInRect(&wi.rcWindow, Point))
//
case WM_NCUAHDRAWFRAME:
case WM_NCACTIVATE:
+
+ if ((GetWindowLongW(hWnd, GWL_STYLE) & WS_CAPTION) != WS_CAPTION)
+ return TRUE;
+
ThemeHandleNCPaint(hWnd, (HRGN)1);
return TRUE;
case WM_NCMOUSEMOVE:
if (!context.theme)
return E_FAIL;
context.Active = TRUE;
+ context.wi.cbSize = sizeof(context.wi);
if (!GetWindowInfo(hwndDummy, &context.wi))
return E_FAIL;
context.wi.dwStyle |= WS_VISIBLE;